Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.45.0"
".": "0.46.0"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.46.0 (2025-03-07)

Full Changelog: [v0.45.0...v0.46.0](https://github.com/orbcorp/orb-java/compare/v0.45.0...v0.46.0)

### Features

* generate and publish docs ([#320](https://github.com/orbcorp/orb-java/issues/320)) ([44c1bcd](https://github.com/orbcorp/orb-java/commit/44c1bcdd24a8a5500c32b4a21376a2a3a110555c))


### Bug Fixes

* compilation error ([a4cfad1](https://github.com/orbcorp/orb-java/commit/a4cfad1e038849dcf0c81888d1acd9401cc28073))

## 0.45.0 (2025-03-07)

Full Changelog: [v0.44.0...v0.45.0](https://github.com/orbcorp/orb-java/compare/v0.44.0...v0.45.0)
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

<!-- 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/0.45.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/0.46.0)
[![javadoc](https://javadoc.io/badge2/com.withorb.api/orb-java/0.46.0/javadoc.svg)](https://javadoc.io/doc/com.withorb.api/orb-java/0.46.0)

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

The Orb Java SDK provides convenient access to the Orb REST API from applications written in Java.

The Orb Java SDK is similar to the Orb Kotlin SDK but with minor differences that make it more ergonomic for use in Java, such as `Optional` instead of nullable values, `Stream` instead of `Sequence`, and `CompletableFuture` instead of suspend functions.

The REST API documentation can be found on [docs.withorb.com](https://docs.withorb.com/reference/api-reference).
The REST API documentation can be found on [docs.withorb.com](https://docs.withorb.com/reference/api-reference). Javadocs are also available on [javadoc.io](https://javadoc.io/doc/com.withorb.api/orb-java/0.45.0).

## Installation

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

```kotlin
implementation("com.withorb.api:orb-java:0.45.0")
implementation("com.withorb.api:orb-java:0.46.0")
```

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

Expand Down
21 changes: 20 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
plugins {
id("org.jetbrains.dokka") version "2.0.0"
}

repositories {
mavenCentral()
}

allprojects {
group = "com.withorb.api"
version = "0.45.0" // x-release-please-version
version = "0.46.0" // x-release-please-version
}

subprojects {
apply(plugin = "org.jetbrains.dokka")
}

// Avoid race conditions between `dokkaJavadocCollector` and `dokkaJavadocJar` tasks
tasks.named("dokkaJavadocCollector").configure {
subprojects.flatMap { it.tasks }
.filter { it.project.name != "orb-java" && it.name == "dokkaJavadocJar" }
.forEach { mustRunAfter(it) }
}
8 changes: 8 additions & 0 deletions buildSrc/src/main/kotlin/orb.publish.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost

Expand All @@ -19,6 +21,12 @@ configure<MavenPublishBaseExtension> {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)

coordinates(project.group.toString(), project.name, project.version.toString())
configure(
KotlinJvm(
javadocJar = JavadocJar.Dokka("dokkaJavadoc"),
sourcesJar = true,
)
)

pom {
name.set("API Reference")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import java.time.ZoneOffset
import java.util.*
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
import kotlin.jvm.optionals.getOrNull

private const val SIGNATURE_HEADER = "X-Orb-Signature"
private const val TIMESTAMP_HEADER = "X-Orb-Timestamp"
Expand All @@ -40,7 +41,7 @@ class WebhookServiceImpl constructor(private val clientOptions: ClientOptions) :
override fun verifySignature(payload: String, headers: Headers, secret: String?) {
val webhookSecret =
secret
?: clientOptions.webhookSecret
?: clientOptions.webhookSecret().getOrNull()
?: throw OrbException(
"The webhook secret must either be set using the env var, ORB_WEBHOOK_SECRET, on the client class, or passed to this method"
)
Expand Down
21 changes: 21 additions & 0 deletions orb-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,24 @@ plugins {
dependencies {
api(project(":orb-java-client-okhttp"))
}

// Redefine `dokkaJavadoc` to:
// - Depend on the root project's task for merging the docs of all the projects
// - Forward that task's output to this task's output
tasks.named("dokkaJavadoc").configure {
actions.clear()

val dokkaJavadocCollector = rootProject.tasks["dokkaJavadocCollector"]
dependsOn(dokkaJavadocCollector)

val outputDirectory = project.layout.buildDirectory.dir("dokka/javadoc")
doLast {
copy {
from(dokkaJavadocCollector.outputs.files)
into(outputDirectory)
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}

outputs.dir(outputDirectory)
}
Loading