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
4 changes: 2 additions & 2 deletions .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
- name: Build Javadocs
run: gradle :sdk-aggregated-javadocs:javadoc
- name: Build Kotlin docs
run: gradle :dokkaHtmlMultiModule
run: gradle :dokkaGenerate

- name: Move stuff around
run: mkdir _site && mv ./sdk-aggregated-javadocs/build/docs/javadoc _site/javadocs && mv ./build/dokka/htmlMultiModule _site/ktdocs
run: mkdir _site && mv ./sdk-aggregated-javadocs/build/docs/javadoc _site/javadocs && mv ./build/dokka/html _site/ktdocs

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Build Javadocs
run: gradle :sdk-aggregated-javadocs:javadoc
- name: Build Kotlin docs
run: gradle :dokkaHtmlMultiModule
run: gradle :dokkaGenerate

event_file:
name: "Event File"
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This is the **Restate Java/Kotlin SDK** (`dev.restate`), a polyglot JVM SDK for
./gradlew spotlessApply # Auto-format all code
./gradlew spotlessCheck # Check formatting (runs in CI)
./gradlew :sdk-aggregated-javadocs:javadoc # Generate Java docs
./gradlew :dokkaHtmlMultiModule # Generate Kotlin docs
./gradlew :dokkaGenerate # Generate aggregated Kotlin docs (Dokka Gradle plugin v2)
```

### Before Submitting Changes
Expand Down
34 changes: 11 additions & 23 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,6 @@ plugins {
id(libs.plugins.spotless.get().pluginId) apply false
}

// Dokka is bringing in jackson unshaded, and it's messing up other plugins, so we override those
// here!
buildscript {
dependencies {
classpath("com.fasterxml.jackson.core:jackson-core:2.17.1")
classpath("com.fasterxml.jackson.core:jackson-databind:2.17.1")
classpath("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.17.1")
classpath("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.1")
classpath("com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20") {
exclude("com.fasterxml.jackson")
exclude("com.fasterxml.jackson.dataformat")
exclude("com.fasterxml.jackson.module")
}
}
}

val restateVersion = libs.versions.restate.get()

allprojects {
Expand Down Expand Up @@ -72,10 +55,13 @@ allprojects {
}
}

// Dokka configuration
subprojects
.filter {
!setOf(
// Dokka configuration (Dokka Gradle plugin v2). The root project is the aggregator: each
// documented module applies the Dokka plugin and is declared as a `dokka(project(...))`
// dependency, then `./gradlew :dokkaGenerate` produces the aggregated HTML under build/dokka/html.
val dokkaDocumentedProjects =
subprojects.filter {
it.name !in
setOf(
"sdk-api",
"sdk-api-gen",
"sdk-fake-api",
Expand All @@ -84,9 +70,11 @@ subprojects
"admin-client",
"test-services",
)
.contains(it.name)
}
.forEach { p -> p.plugins.apply("org.jetbrains.dokka") }

dokkaDocumentedProjects.forEach { p -> p.plugins.apply("org.jetbrains.dokka") }

dependencies { dokkaDocumentedProjects.forEach { add("dokka", project(it.path)) } }

nexusPublishing {
repositories {
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {


dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.10")
implementation("org.jetbrains.kotlin:kotlin-serialization:2.2.10")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.0")
implementation("org.jetbrains.kotlin:kotlin-serialization:2.3.0")
implementation("com.diffplug.spotless:spotless-plugin-gradle:8.2.0")
}
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Dokka Gradle plugin v2 (default since 2.1.0); set explicitly to opt out of the migration warning.
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled

org.gradle.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 \
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@
[plugins]
aggregate-javadoc = 'io.freefair.aggregate-javadoc:8.14'
dependency-license-report = 'com.github.jk1.dependency-license-report:2.9'
dokka = 'org.jetbrains.dokka:1.9.20'
dokka = 'org.jetbrains.dokka:2.2.0'
jib = 'com.google.cloud.tools.jib:3.4.5'
jsonschema2pojo = 'org.jsonschema2pojo:1.2.2'
nexus-publish = 'io.github.gradle-nexus.publish-plugin:1.3.0'
openapi-generator = 'org.openapi.generator:7.17.0'
openapi-generator = 'org.openapi.generator:7.23.0'
protobuf = 'com.google.protobuf:0.9.4'
shadow = 'com.gradleup.shadow:9.0.0-beta8'
spotless = 'com.diffplug.spotless:7.2.1'
Expand All @@ -267,7 +267,7 @@
junit = '5.14.1'
kotlinx-coroutines = '1.10.2'
kotlinx-serialization = '1.9.0'
ksp = '2.2.10-2.0.2'
ksp = '2.3.0'
log4j = '2.24.3'
micrometer = '1.14.14'
micrometer-context-propagation = '1.1.3'
Expand Down
4 changes: 2 additions & 2 deletions sdk-common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.jetbrains.dokka.gradle.AbstractDokkaTask
import org.jetbrains.dokka.gradle.tasks.DokkaGenerateTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand Down Expand Up @@ -87,5 +87,5 @@ tasks {
withType<JavaCompile>().configureEach { dependsOn(generateVersionClass) }
withType<KotlinCompile>().configureEach { dependsOn(generateVersionClass) }
withType<org.gradle.jvm.tasks.Jar>().configureEach { dependsOn(generateVersionClass) }
withType<AbstractDokkaTask>().configureEach { dependsOn(generateVersionClass) }
withType<DokkaGenerateTask>().configureEach { dependsOn(generateVersionClass) }
}
4 changes: 2 additions & 2 deletions sdk-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import org.gradle.kotlin.dsl.withType
import org.jetbrains.dokka.gradle.AbstractDokkaTask
import org.jetbrains.dokka.gradle.tasks.DokkaGenerateTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand Down Expand Up @@ -131,7 +131,7 @@ tasks {
withType<org.gradle.jvm.tasks.Jar>().configureEach {
dependsOn(generateJsonSchema2Pojo, generateProto)
}
withType<AbstractDokkaTask>().configureEach { dependsOn(generateJsonSchema2Pojo, generateProto) }
withType<DokkaGenerateTask>().configureEach { dependsOn(generateJsonSchema2Pojo, generateProto) }

getByName("jar") {
enabled = false
Expand Down
Loading