Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
83ddd55
feat(client): ensure compat with proguard
stainless-app[bot] Jul 29, 2025
cf6742e
feat: add retryable exception
stainless-app[bot] Jul 29, 2025
27da721
fix(client): r8 support
stainless-app[bot] Jul 31, 2025
9b4d208
chore(internal): reduce proguard ci logging
stainless-app[bot] Jul 31, 2025
0e68dd4
chore(internal): bump ci test timeout
stainless-app[bot] Jul 31, 2025
b42e5bb
codegen metadata
stainless-app[bot] Aug 29, 2025
76d269d
chore(internal): codegen related update
stainless-app[bot] Aug 29, 2025
13fc2ef
feat(api)!: define shared model ConversionRateConfig
stainless-app[bot] Sep 2, 2025
a6e527f
chore: fix formatting
dgellow Sep 2, 2025
e90f837
feat(api): api update
stainless-app[bot] Sep 2, 2025
b290b3a
fix(ci): use java-version 21 for publish step
stainless-app[bot] Sep 3, 2025
3e25650
feat: extract minimum composite to type
stainless-app[bot] Sep 3, 2025
3b2489b
feat(api): api update
stainless-app[bot] Sep 3, 2025
05b6a4e
feat(api): api update
stainless-app[bot] Sep 5, 2025
5d00bf2
feat(api): api update
stainless-app[bot] Sep 10, 2025
185acb8
chore(internal): codegen related update
stainless-app[bot] Sep 11, 2025
247937e
feat(api): api update
stainless-app[bot] Sep 12, 2025
3a4300a
chore(internal): codegen related update
stainless-app[bot] Sep 12, 2025
97bd293
chore(internal): codegen related update
stainless-app[bot] Sep 12, 2025
9bc6ac9
fix(client): incorrect `getPackageVersion` impl
stainless-app[bot] Sep 15, 2025
9c8977c
feat(api): api update
stainless-app[bot] Sep 16, 2025
427df35
feat(client): expose sleeper option
stainless-app[bot] Sep 19, 2025
5d37bc1
chore: improve formatter performance
stainless-app[bot] Sep 19, 2025
cf6fd19
feat(api): api update
stainless-app[bot] Sep 19, 2025
7e80bfe
chore(internal): change some comment formatting
stainless-app[bot] Sep 23, 2025
1764089
fix(client): deserialization of empty objects
stainless-app[bot] Sep 25, 2025
321aa41
feat(api): api update
stainless-app[bot] Sep 29, 2025
b3c5ffa
codegen metadata
stainless-app[bot] Sep 29, 2025
6aa1d53
feat(api): api update
stainless-app[bot] Sep 30, 2025
bf412bc
feat(api): api update
stainless-app[bot] Oct 3, 2025
617892e
feat(api): api update
stainless-app[bot] Oct 3, 2025
b5592a9
release: 1.10.0
stainless-app[bot] Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 27 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
lint:
timeout-minutes: 10
timeout-minutes: 15
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/orb-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
Expand All @@ -36,8 +36,33 @@ jobs:

- name: Run lints
run: ./scripts/lint

build:
timeout-minutes: 15
name: build
runs-on: ${{ github.repository == 'stainless-sdks/orb-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: |
8
21
cache: gradle

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build SDK
run: ./scripts/build

test:
timeout-minutes: 10
timeout-minutes: 15
name: test
runs-on: ${{ github.repository == 'stainless-sdks/orb-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-sonatype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
distribution: temurin
java-version: |
8
17
21
cache: gradle

- name: Set up Gradle
Expand All @@ -33,7 +33,7 @@ jobs:
export -- GPG_SIGNING_KEY_ID
printenv -- GPG_SIGNING_KEY | gpg --batch --passphrase-fd 3 --import 3<<< "$GPG_SIGNING_PASSWORD"
GPG_SIGNING_KEY_ID="$(gpg --with-colons --list-keys | awk -F : -- '/^pub:/ { getline; print "0x" substr($10, length($10) - 7) }')"
./gradlew publishAndReleaseToMavenCentral -Dorg.gradle.jvmargs="-Xmx8g" --stacktrace -PmavenCentralUsername="$SONATYPE_USERNAME" -PmavenCentralPassword="$SONATYPE_PASSWORD" --no-configuration-cache
./gradlew publishAndReleaseToMavenCentral --stacktrace -PmavenCentralUsername="$SONATYPE_USERNAME" -PmavenCentralPassword="$SONATYPE_PASSWORD" --no-configuration-cache
env:
SONATYPE_USERNAME: ${{ secrets.ORB_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.ORB_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
.gradle
.idea
.kotlin
build
build/
codegen.log
kls_database.db
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.9.0"
".": "1.10.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 118
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-4f31d46f5ba187fc4d702c9f9f1573dacb891edbd086f935707578d7c4f5fed8.yml
openapi_spec_hash: 25b1019f20a47b8af665aae5f8fd0025
config_hash: 5135e9237207028f293049a77428c775
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-26020bd285825dac04bf642a414ea07c786fc6e42ee6bbcf795e11f8db426519.yml
openapi_spec_hash: 897fedec83f0960539b3aa4ec0e3308d
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# Changelog

## 1.10.0 (2025-10-03)

Full Changelog: [v1.9.0...v1.10.0](https://github.com/orbcorp/orb-java/compare/v1.9.0...v1.10.0)

### ⚠ BREAKING CHANGES

* **api:** define shared model ConversionRateConfig

### Features

* add retryable exception ([cf6742e](https://github.com/orbcorp/orb-java/commit/cf6742e0ace7ef26c53fdf1c6ead9f742a326094))
* **api:** api update ([617892e](https://github.com/orbcorp/orb-java/commit/617892e6526e1717415bfa630529ffce50a70b96))
* **api:** api update ([bf412bc](https://github.com/orbcorp/orb-java/commit/bf412bca3a157a0e41fef19a5d915c095b09eda1))
* **api:** api update ([6aa1d53](https://github.com/orbcorp/orb-java/commit/6aa1d5370247b08c937ca7faa9fcacf5b21ed081))
* **api:** api update ([321aa41](https://github.com/orbcorp/orb-java/commit/321aa4197ce9dbc8601ec7578d0f70017e37c2f6))
* **api:** api update ([cf6fd19](https://github.com/orbcorp/orb-java/commit/cf6fd1990dc2781ebc0ab860b135ce4b90a58fa2))
* **api:** api update ([9c8977c](https://github.com/orbcorp/orb-java/commit/9c8977c14697c4907f13e29189a62c2aea441924))
* **api:** api update ([247937e](https://github.com/orbcorp/orb-java/commit/247937ebe3dba64b53c180a9a58460e10cde4a8c))
* **api:** api update ([5d00bf2](https://github.com/orbcorp/orb-java/commit/5d00bf2a8be3610043bbd620eb724d13788fc89a))
* **api:** api update ([05b6a4e](https://github.com/orbcorp/orb-java/commit/05b6a4e2d2e551b8b09168d2a8d6e34851fcd784))
* **api:** api update ([3b2489b](https://github.com/orbcorp/orb-java/commit/3b2489bdb730033a389ec76cc824df8eb351c678))
* **api:** api update ([e90f837](https://github.com/orbcorp/orb-java/commit/e90f837c716a2fe6955df54c844b4320a1a26d8b))
* **api:** define shared model ConversionRateConfig ([13fc2ef](https://github.com/orbcorp/orb-java/commit/13fc2efb464953fc534dbd09ed34b003c17a3d0d))
* **client:** ensure compat with proguard ([83ddd55](https://github.com/orbcorp/orb-java/commit/83ddd55a2e265b3f2426f47868bc5a596509e3a8))
* **client:** expose sleeper option ([427df35](https://github.com/orbcorp/orb-java/commit/427df355df00bafcdb972fbfb758f7cb0646aab6))
* extract minimum composite to type ([3e25650](https://github.com/orbcorp/orb-java/commit/3e256505b03e771aef66c8a435f27a6ec3b9e237))


### Bug Fixes

* **ci:** use java-version 21 for publish step ([b290b3a](https://github.com/orbcorp/orb-java/commit/b290b3a558d6f1b4419975855a22c0f0b8b055e2))
* **client:** deserialization of empty objects ([1764089](https://github.com/orbcorp/orb-java/commit/1764089476594bd942efe77f15d4744e6c0a01dd))
* **client:** ensure single timer is created per client ([427df35](https://github.com/orbcorp/orb-java/commit/427df355df00bafcdb972fbfb758f7cb0646aab6))
* **client:** incorrect `getPackageVersion` impl ([9bc6ac9](https://github.com/orbcorp/orb-java/commit/9bc6ac99cc3a432ddc30f43dda41d076f4197883))
* **client:** r8 support ([27da721](https://github.com/orbcorp/orb-java/commit/27da7219bb085292eba8cf247a8574689f922300))


### Chores

* fix formatting ([a6e527f](https://github.com/orbcorp/orb-java/commit/a6e527f946e40ebbfebc97c4eaeec1900845197a))
* improve formatter performance ([5d37bc1](https://github.com/orbcorp/orb-java/commit/5d37bc171ae17fbfb70c63743afde6b04e29ff1c))
* **internal:** bump ci test timeout ([0e68dd4](https://github.com/orbcorp/orb-java/commit/0e68dd443b79c48810c94749f88cfc2d9286a725))
* **internal:** change some comment formatting ([7e80bfe](https://github.com/orbcorp/orb-java/commit/7e80bfeb93b40dc060dd5947e8e37d4fb68a4955))
* **internal:** codegen related update ([97bd293](https://github.com/orbcorp/orb-java/commit/97bd293da263a5259bac93d2f9d9aeb0f10d5c65))
* **internal:** codegen related update ([3a4300a](https://github.com/orbcorp/orb-java/commit/3a4300ae19b4ad4c9f82056658d88013a35c992e))
* **internal:** codegen related update ([185acb8](https://github.com/orbcorp/orb-java/commit/185acb801fe845d8b33f741e1e1f1e07550fd92f))
* **internal:** codegen related update ([76d269d](https://github.com/orbcorp/orb-java/commit/76d269d0cba09f1150af878d603292b92e003241))
* **internal:** reduce proguard ci logging ([9b4d208](https://github.com/orbcorp/orb-java/commit/9b4d20849c0af2b5945f155aad5a91c338020f56))

## 1.9.0 (2025-07-26)

Full Changelog: [v1.8.0...v1.9.0](https://github.com/orbcorp/orb-java/compare/v1.8.0...v1.9.0)
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/1.9.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.withorb.api/orb-java)](https://central.sonatype.com/artifact/com.withorb.api/orb-java/1.10.0)

<!-- x-release-please-end -->

Expand All @@ -19,7 +19,7 @@ The REST API documentation can be found on [docs.withorb.com](https://docs.witho
### Gradle

```kotlin
implementation("com.withorb.api:orb-java:1.9.0")
implementation("com.withorb.api:orb-java:1.10.0")
```

### Maven
Expand All @@ -28,7 +28,7 @@ implementation("com.withorb.api:orb-java:1.9.0")
<dependency>
<groupId>com.withorb.api</groupId>
<artifactId>orb-java</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
</dependency>
```

Expand Down Expand Up @@ -231,6 +231,8 @@ The SDK throws custom unchecked exception types:

- [`OrbIoException`](orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbIoException.kt): I/O networking errors.

- [`OrbRetryableException`](orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbRetryableException.kt): Generic error indicating a failure that could be retried by the client.

- [`OrbInvalidDataException`](orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that's supposed to be required, but the API unexpectedly omitted it from the response.

- [`OrbException`](orb-java-core/src/main/kotlin/com/withorb/api/errors/OrbException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.
Expand Down Expand Up @@ -361,6 +363,12 @@ both of which will raise an error if the signature is invalid.
Note that the `body` parameter must be the raw JSON string sent from the server (do not parse it first).
The `.unwrap()` method can parse this JSON for you.

## ProGuard and R8

Although the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `orb-java-core` is published with a [configuration file](orb-java-core/src/main/resources/META-INF/proguard/orb-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).

ProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.

## Jackson

The SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.
Expand Down
14 changes: 13 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
allprojects {
group = "com.withorb.api"
version = "1.9.0" // x-release-please-version
version = "1.10.0" // x-release-please-version
}

subprojects {
// These are populated with dependencies by `buildSrc` scripts.
tasks.register("format") {
group = "Verification"
description = "Formats all source files."
}
tasks.register("lint") {
group = "Verification"
description = "Verifies all source files are formatted."
}
}
1 change: 0 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ repositories {
}

dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.0.2")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
implementation("com.vanniktech:gradle-maven-publish-plugin:0.28.0")
}
94 changes: 83 additions & 11 deletions buildSrc/src/main/kotlin/orb.java.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
import com.diffplug.gradle.spotless.SpotlessExtension
import org.gradle.api.tasks.testing.logging.TestExceptionFormat

plugins {
`java-library`
id("com.diffplug.spotless")
}

repositories {
mavenCentral()
}

configure<SpotlessExtension> {
java {
importOrder()
removeUnusedImports()
palantirJavaFormat()
toggleOffOn()
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
Expand Down Expand Up @@ -53,3 +42,86 @@ tasks.withType<Test>().configureEach {
exceptionFormat = TestExceptionFormat.FULL
}
}

val palantir by configurations.creating
dependencies {
palantir("com.palantir.javaformat:palantir-java-format:2.73.0")
}

fun registerPalantir(
name: String,
description: String,
) {
val javaName = "${name}Java"
tasks.register<JavaExec>(javaName) {
group = "Verification"
this.description = description

classpath = palantir
mainClass = "com.palantir.javaformat.java.Main"

// Avoid an `IllegalAccessError` on Java 9+.
jvmArgs(
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
)

// Use paths relative to the current module.
val argumentFile =
project.layout.buildDirectory.file("palantir-$name-args.txt").get().asFile
val lastRunTimeFile =
project.layout.buildDirectory.file("palantir-$name-last-run.txt").get().asFile

// Read the time when this task was last executed for this module (if ever).
val lastRunTime = lastRunTimeFile.takeIf { it.exists() }?.readText()?.toLongOrNull() ?: 0L

// Use a `fileTree` relative to the module's source directory.
val javaFiles = project.fileTree("src") { include("**/*.java") }

// Determine if any files need to be formatted or linted and continue only if there is at least
// one file.
onlyIf { javaFiles.any { it.lastModified() > lastRunTime } }

inputs.files(javaFiles)

doFirst {
// Create the argument file and set the preferred formatting style.
argumentFile.parentFile.mkdirs()
argumentFile.writeText("--palantir\n")

if (name == "lint") {
// For lint, do a dry run, so no files are modified. Set the exit code to 1 (instead of
// the default 0) if any files need to be formatted, indicating that linting has failed.
argumentFile.appendText("--dry-run\n")
argumentFile.appendText("--set-exit-if-changed\n")
} else {
// `--dry-run` and `--replace` (for in-place formatting) are mutually exclusive.
argumentFile.appendText("--replace\n")
}

// Write the modified files to the argument file.
javaFiles.filter { it.lastModified() > lastRunTime }
.forEach { argumentFile.appendText("${it.absolutePath}\n") }
}

doLast {
// Record the last execution time for later up-to-date checking.
lastRunTimeFile.writeText(System.currentTimeMillis().toString())
}

// Pass the argument file using the @ symbol
args = listOf("@${argumentFile.absolutePath}")

outputs.upToDateWhen { javaFiles.none { it.lastModified() > lastRunTime } }
}

tasks.named(name) {
dependsOn(tasks.named(javaName))
}
}

registerPalantir(name = "format", description = "Formats all Java source files.")
registerPalantir(name = "lint", description = "Verifies all Java source files are formatted.")
Loading
Loading