diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..8030eef4b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "gradle" + directory: "/" + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml new file mode 100644 index 000000000..c1491141a --- /dev/null +++ b/.github/workflows/dependency-submission.yml @@ -0,0 +1,22 @@ +name: Dependency Submission + +on: + push: + branches: [ 'main' ] + +permissions: + contents: write + +jobs: + dependency-submission: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@v4 \ No newline at end of file diff --git a/admin-client/build.gradle.kts b/admin-client/build.gradle.kts index 687f47bd2..03fc970fb 100644 --- a/admin-client/build.gradle.kts +++ b/admin-client/build.gradle.kts @@ -3,21 +3,20 @@ import org.openapitools.generator.gradle.plugin.tasks.GenerateTask plugins { `java-library` `java-conventions` - id("org.openapi.generator") version "7.5.0" + alias(libs.plugins.openapi.generator) `library-publishing-conventions` } description = "Code-generated Admin API client for Restate" dependencies { - implementation(platform(jacksonLibs.jackson.bom)) - implementation(jacksonLibs.jackson.core) - implementation(jacksonLibs.jackson.databind) - implementation(jacksonLibs.jackson.jsr310) + implementation(libs.jackson.core) + implementation(libs.jackson.databind) + implementation(libs.jackson.jsr310) // Required for the annotations - compileOnly("org.apache.tomcat:annotations-api:6.0.53") - compileOnly("com.google.code.findbugs:jsr305:3.0.2") + compileOnly(libs.tomcat.annotations) + compileOnly(libs.google.findbugs.jsr305) } // Add generated output to source sets diff --git a/build.gradle.kts b/build.gradle.kts index 367fcb3f2..4de4c1d2a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,10 +5,10 @@ plugins { id("org.jetbrains.dokka") version "1.9.20" // https://github.com/gradle/gradle/issues/20084#issuecomment-1060822638 - id(pluginLibs.plugins.spotless.get().pluginId) apply false + 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 +// Dokka is bringing in jackson unshaded, and it's messing up other plugins, so we override those // here! buildscript { dependencies { @@ -25,7 +25,6 @@ buildscript { } } -val protobufVersion = coreLibs.versions.protobuf.get() val restateVersion = libs.versions.restate.get() allprojects { diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 2e9e60a16..52b42a339 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -4,9 +4,9 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransf plugins { `java-conventions` `kotlin-conventions` - alias(kotlinLibs.plugins.ksp) + alias(libs.plugins.ksp) application - id("com.github.johnrengelman.shadow").version("8.1.1") + alias(libs.plugins.shadow) } dependencies { @@ -19,17 +19,15 @@ dependencies { implementation(project(":sdk-api-kotlin")) implementation(project(":sdk-serde-jackson")) - implementation(platform(jacksonLibs.jackson.bom)) - implementation(jacksonLibs.jackson.jsr310) - implementation(jacksonLibs.jackson.parameter.names) + implementation(libs.jackson.jsr310) + implementation(libs.jackson.parameter.names) - implementation(kotlinLibs.kotlinx.coroutines) - implementation(kotlinLibs.kotlinx.serialization.core) - implementation(kotlinLibs.kotlinx.serialization.json) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.serialization.core) + implementation(libs.kotlinx.serialization.json) - implementation(coreLibs.log4j.core) - implementation(platform(vertxLibs.vertx.bom)) - implementation(vertxLibs.vertx.core) + implementation(libs.log4j.core) + implementation(libs.vertx.core) } application { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 98c65a45f..110dd9fda 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,2 +1,70 @@ [versions] - restate = '1.3.0-SNAPSHOT' +jackson = "2.18.1" +victools-json-schema = "4.37.0" +ksp = "2.0.21-1.0.28" +protobuf = "4.28.3" +opentelemetry = "1.44.1" +vertx = "4.5.11" +dokka = "1.9.20" +kotlinx-serialization = "1.7.3" +kotlinx-coroutines = "1.9.0" +junit = "5.10.2" +spring-boot = "3.3.5" +log4j = "2.24.1" +restate = "1.3.0-SNAPSHOT" + +[libraries] +aws-lambda-core = "com.amazonaws:aws-lambda-java-core:1.2.3" +aws-lambda-events = "com.amazonaws:aws-lambda-java-events:3.11.5" +jackson-annotations = { module = "com.fasterxml.jackson.core:jackson-annotations", version.ref = "jackson" } +jackson-core = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jackson" } +jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson" } +jackson-jsr310 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", version.ref = "jackson" } +jackson-jdk8 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jdk8", version.ref = "jackson" } +jackson-parameter-names = { module = "com.fasterxml.jackson.module:jackson-module-parameter-names", version.ref = "jackson" } +handlebars = "com.github.jknack:handlebars:4.3.1" +victools-jsonschema-generator = { module = "com.github.victools:jsonschema-generator", version.ref = "victools-json-schema" } +victools-jsonschema-module-jackson = { module = "com.github.victools:jsonschema-module-jackson", version.ref = "victools-json-schema" } +google-findbugs-jsr305 = "com.google.code.findbugs:jsr305:3.0.2" +tink = "com.google.crypto.tink:tink:1.15.0" +ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" } +protobuf-java = { module = "com.google.protobuf:protobuf-java", version.ref = "protobuf" } +protobuf-kotlin = { module = "com.google.protobuf:protobuf-kotlin", version.ref = "protobuf" } +protobuf-protoc = { module = "com.google.protobuf:protoc", version.ref = "protobuf" } +jwt = "com.nimbusds:nimbus-jose-jwt:9.47" +opentelemetry-api = { module = "io.opentelemetry:opentelemetry-api", version.ref = "opentelemetry" } +opentelemetry-kotlin = { module = "io.opentelemetry:opentelemetry-extension-kotlin", version.ref = "opentelemetry" } +reactiverse-contextual-logging = "io.reactiverse:reactiverse-contextual-logging:1.2.1" +mutiny = "io.smallrye.reactive:mutiny:2.6.0" +vertx-core = { module = "io.vertx:vertx-core", version.ref = "vertx" } +vertx-junit5 = { module = "io.vertx:vertx-junit5", version.ref = "vertx" } +vertx-kotlin-coroutines = { module = "io.vertx:vertx-lang-kotlin-coroutines", version.ref = "vertx" } +log4j-api = { module = "org.apache.logging.log4j:log4j-api", version.ref = "log4j" } +log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" } +tomcat-annotations = "org.apache.tomcat:annotations-api:6.0.53" +assertj = "org.assertj:assertj-core:3.26.0" +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } +kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } +jspecify = "org.jspecify:jspecify:1.0.0" +junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" } +junit-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" } +slf4j-nop = "org.slf4j:slf4j-nop:1.7.32" +spring-boot-starter = { module = "org.springframework.boot:spring-boot-starter", version.ref = "spring-boot" } +spring-boot-starter-json = { module = "org.springframework.boot:spring-boot-starter-json", version.ref = "spring-boot" } +spring-boot-starter-test = { module = "org.springframework.boot:spring-boot-starter-test", version.ref = "spring-boot" } +testcontainers = "org.testcontainers:testcontainers:1.20.3" + +[plugins] +dependency-license-report = "com.github.jk1.dependency-license-report:2.0" +shadow = "com.github.johnrengelman.shadow:8.1.1" +jib = "com.google.cloud.tools.jib:3.2.1" +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } +protobuf = "com.google.protobuf:0.9.4" +aggregate-javadoc = "io.freefair.aggregate-javadoc:8.6" +gradle-nexus-publish-plugin = "io.github.gradle-nexus.publish-plugin:1.3.0" +spring-dependency-management = "io.spring.dependency-management:1.1.6" +dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } +jsonschema2pojo = "org.jsonschema2pojo:1.2.1" +openapi-generator = "org.openapi.generator:7.5.0" +spotless = "com.diffplug.spotless:6.25.0" \ No newline at end of file diff --git a/sdk-aggregated-javadocs/build.gradle.kts b/sdk-aggregated-javadocs/build.gradle.kts index 496113a52..7049e349f 100644 --- a/sdk-aggregated-javadocs/build.gradle.kts +++ b/sdk-aggregated-javadocs/build.gradle.kts @@ -1,4 +1,4 @@ -plugins { id("io.freefair.aggregate-javadoc") version "8.6" } +plugins { alias(libs.plugins.aggregate.javadoc) } rootProject.subprojects .filter { it.name != "examples" } diff --git a/sdk-api-gen-common/build.gradle.kts b/sdk-api-gen-common/build.gradle.kts index 459157274..af8636586 100644 --- a/sdk-api-gen-common/build.gradle.kts +++ b/sdk-api-gen-common/build.gradle.kts @@ -7,11 +7,11 @@ plugins { description = "Restate SDK API Gen Common" dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) - api("com.github.jknack:handlebars:4.3.1") + api(libs.handlebars) api(project(":sdk-common")) // We need it to silence the slf4j warning (coming from handlebars) - runtimeOnly("org.slf4j:slf4j-nop:1.7.32") + runtimeOnly(libs.slf4j.nop) } diff --git a/sdk-api-gen/build.gradle.kts b/sdk-api-gen/build.gradle.kts index 7236e176d..c4d33b9be 100644 --- a/sdk-api-gen/build.gradle.kts +++ b/sdk-api-gen/build.gradle.kts @@ -8,21 +8,20 @@ plugins { description = "Restate SDK API Gen" dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) implementation(project(":sdk-api-gen-common")) implementation(project(":sdk-api")) testAnnotationProcessor(project(":sdk-api-gen")) testImplementation(project(":sdk-core")) - testImplementation(testingLibs.junit.jupiter) - testImplementation(testingLibs.assertj) - testImplementation(coreLibs.protobuf.java) - testImplementation(coreLibs.log4j.core) - testImplementation(platform(jacksonLibs.jackson.bom)) - testImplementation(jacksonLibs.jackson.databind) + testImplementation(libs.junit.jupiter) + testImplementation(libs.assertj) + testImplementation(libs.protobuf.java) + testImplementation(libs.log4j.core) + testImplementation(libs.jackson.databind) testImplementation(project(":sdk-serde-jackson")) - testImplementation("io.smallrye.reactive:mutiny:2.6.0") + testImplementation(libs.mutiny) // Import test suites from sdk-core testImplementation(project(":sdk-core", "testArchive")) diff --git a/sdk-api-kotlin-gen/build.gradle.kts b/sdk-api-kotlin-gen/build.gradle.kts index 2befe63c1..52a42c27c 100644 --- a/sdk-api-kotlin-gen/build.gradle.kts +++ b/sdk-api-kotlin-gen/build.gradle.kts @@ -2,28 +2,28 @@ plugins { `kotlin-conventions` `test-jar-conventions` `library-publishing-conventions` - alias(kotlinLibs.plugins.ksp) + alias(libs.plugins.ksp) } description = "Restate SDK API Kotlin Gen" dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) - implementation(kotlinLibs.symbol.processing.api) + implementation(libs.ksp.api) implementation(project(":sdk-api-gen-common")) implementation(project(":sdk-api-kotlin")) kspTest(project(":sdk-api-kotlin-gen")) testImplementation(project(":sdk-core")) - testImplementation(testingLibs.junit.jupiter) - testImplementation(testingLibs.assertj) - testImplementation(coreLibs.protobuf.java) - testImplementation(coreLibs.log4j.core) - testImplementation(kotlinLibs.kotlinx.coroutines) - testImplementation(kotlinLibs.kotlinx.serialization.core) - testImplementation("io.smallrye.reactive:mutiny:2.6.0") + testImplementation(libs.junit.jupiter) + testImplementation(libs.assertj) + testImplementation(libs.protobuf.java) + testImplementation(libs.log4j.core) + testImplementation(libs.kotlinx.coroutines.core) + testImplementation(libs.kotlinx.serialization.core) + testImplementation(libs.mutiny) // Import test suites from sdk-core testImplementation(project(":sdk-core", "testArchive")) diff --git a/sdk-api-kotlin/build.gradle.kts b/sdk-api-kotlin/build.gradle.kts index f04a7682c..8786bb969 100644 --- a/sdk-api-kotlin/build.gradle.kts +++ b/sdk-api-kotlin/build.gradle.kts @@ -9,20 +9,19 @@ description = "Restate SDK Kotlin APIs" dependencies { api(project(":sdk-common")) - implementation(kotlinLibs.kotlinx.coroutines) - implementation(kotlinLibs.kotlinx.serialization.core) - implementation(kotlinLibs.kotlinx.serialization.json) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.serialization.core) + implementation(libs.kotlinx.serialization.json) - implementation(coreLibs.log4j.api) - implementation(platform(coreLibs.opentelemetry.bom)) - implementation(coreLibs.opentelemetry.kotlin) + implementation(libs.log4j.api) + implementation(libs.opentelemetry.kotlin) testImplementation(project(":sdk-core")) - testImplementation(testingLibs.junit.jupiter) - testImplementation(testingLibs.assertj) - testImplementation(coreLibs.log4j.core) - testImplementation(coreLibs.protobuf.java) - testImplementation("io.smallrye.reactive:mutiny:2.6.0") + testImplementation(libs.junit.jupiter) + testImplementation(libs.assertj) + testImplementation(libs.log4j.core) + testImplementation(libs.protobuf.java) + testImplementation(libs.mutiny) testImplementation(project(":sdk-core", "testArchive")) } diff --git a/sdk-api/build.gradle.kts b/sdk-api/build.gradle.kts index a4b25a12c..4a3bab446 100644 --- a/sdk-api/build.gradle.kts +++ b/sdk-api/build.gradle.kts @@ -8,21 +8,20 @@ plugins { description = "Restate SDK APIs" dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) api(project(":sdk-common")) - implementation(coreLibs.log4j.api) + implementation(libs.log4j.api) - implementation(platform(jacksonLibs.jackson.bom)) - implementation(jacksonLibs.jackson.core) + implementation(libs.jackson.core) testImplementation(project(":sdk-core")) - testImplementation(testingLibs.junit.jupiter) - testImplementation(testingLibs.assertj) - testImplementation(coreLibs.protobuf.java) - testImplementation(coreLibs.log4j.core) - testImplementation("io.smallrye.reactive:mutiny:2.6.0") + testImplementation(libs.junit.jupiter) + testImplementation(libs.assertj) + testImplementation(libs.protobuf.java) + testImplementation(libs.log4j.core) + testImplementation(libs.mutiny) // Import test suites from sdk-core testImplementation(project(":sdk-core", "testArchive")) diff --git a/sdk-common/build.gradle.kts b/sdk-common/build.gradle.kts index e2564e5c5..da4b95e93 100644 --- a/sdk-common/build.gradle.kts +++ b/sdk-common/build.gradle.kts @@ -10,16 +10,14 @@ plugins { description = "Common interfaces of the Restate SDK" dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) - api(platform(coreLibs.opentelemetry.bom)) - api(coreLibs.opentelemetry.api) + api(libs.opentelemetry.api) - implementation(platform(jacksonLibs.jackson.bom)) - implementation(jacksonLibs.jackson.core) + implementation(libs.jackson.core) - testImplementation(testingLibs.junit.jupiter) - testImplementation(testingLibs.assertj) + testImplementation(libs.junit.jupiter) + testImplementation(libs.assertj) } val generatedVersionDir = layout.buildDirectory.dir("version") diff --git a/sdk-core/build.gradle.kts b/sdk-core/build.gradle.kts index 036921432..bbd6be8d2 100644 --- a/sdk-core/build.gradle.kts +++ b/sdk-core/build.gradle.kts @@ -6,39 +6,37 @@ plugins { `kotlin-conventions` `test-jar-conventions` `library-publishing-conventions` - id("org.jsonschema2pojo") version "1.2.1" - alias(pluginLibs.plugins.protobuf) + alias(libs.plugins.jsonschema2pojo) + alias(libs.plugins.protobuf) // https://github.com/gradle/gradle/issues/20084#issuecomment-1060822638 - id(pluginLibs.plugins.spotless.get().pluginId) apply false + id(libs.plugins.spotless.get().pluginId) apply false } description = "Restate SDK Core" dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) implementation(project(":sdk-common")) - implementation(coreLibs.protobuf.java) - implementation(coreLibs.log4j.api) + implementation(libs.protobuf.java) + implementation(libs.log4j.api) // We need this for the manifest - implementation(platform(jacksonLibs.jackson.bom)) - implementation(jacksonLibs.jackson.annotations) - implementation(jacksonLibs.jackson.databind) + implementation(libs.jackson.annotations) + implementation(libs.jackson.databind) // We don't want a hard-dependency on it - compileOnly(coreLibs.log4j.core) + compileOnly(libs.log4j.core) - implementation(platform(coreLibs.opentelemetry.bom)) - implementation(coreLibs.opentelemetry.api) + implementation(libs.opentelemetry.api) - testCompileOnly(coreLibs.jspecify) - testImplementation("io.smallrye.reactive:mutiny:2.6.0") - testImplementation(testingLibs.junit.jupiter) - testImplementation(testingLibs.assertj) - testImplementation(coreLibs.log4j.core) + testCompileOnly(libs.jspecify) + testImplementation(libs.mutiny) + testImplementation(libs.junit.jupiter) + testImplementation(libs.assertj) + testImplementation(libs.log4j.core) } // Configure source sets for protobuf plugin and jsonschema2pojo @@ -65,7 +63,7 @@ jsonSchema2Pojo { // Configure protobuf -val protobufVersion = coreLibs.versions.protobuf.get() +val protobufVersion = libs.versions.protobuf.get() protobuf { protoc { artifact = "com.google.protobuf:protoc:$protobufVersion" } } diff --git a/sdk-http-vertx/build.gradle.kts b/sdk-http-vertx/build.gradle.kts index 3db6f3474..2bc54b3dd 100644 --- a/sdk-http-vertx/build.gradle.kts +++ b/sdk-http-vertx/build.gradle.kts @@ -8,20 +8,18 @@ plugins { description = "Restate SDK HTTP implementation based on Vert.x" dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) api(project(":sdk-common")) implementation(project(":sdk-core")) // Vert.x - implementation(platform(vertxLibs.vertx.bom)) - implementation(vertxLibs.vertx.core) + implementation(libs.vertx.core) // Observability - implementation(platform(coreLibs.opentelemetry.bom)) - implementation(coreLibs.opentelemetry.api) - implementation(coreLibs.log4j.api) - implementation("io.reactiverse:reactiverse-contextual-logging:1.2.1") + implementation(libs.opentelemetry.api) + implementation(libs.log4j.api) + implementation(libs.reactiverse.contextual.logging) // Testing testImplementation(project(":sdk-api")) @@ -33,15 +31,15 @@ dependencies { testImplementation(project(":sdk-api-gen", "testArchive")) testImplementation(project(":sdk-api-kotlin", "testArchive")) testImplementation(project(":sdk-api-kotlin-gen", "testArchive")) - testImplementation(testingLibs.junit.jupiter) - testImplementation(testingLibs.assertj) - testImplementation(vertxLibs.vertx.junit5) - testImplementation("io.smallrye.reactive:mutiny:2.6.0") + testImplementation(libs.junit.jupiter) + testImplementation(libs.assertj) + testImplementation(libs.vertx.junit5) + testImplementation(libs.mutiny) - testImplementation(coreLibs.protobuf.java) - testImplementation(coreLibs.protobuf.kotlin) - testImplementation(coreLibs.log4j.core) + testImplementation(libs.protobuf.java) + testImplementation(libs.protobuf.kotlin) + testImplementation(libs.log4j.core) - testImplementation(kotlinLibs.kotlinx.coroutines) - testImplementation(vertxLibs.vertx.kotlin.coroutines) + testImplementation(libs.kotlinx.coroutines.core) + testImplementation(libs.vertx.kotlin.coroutines) } diff --git a/sdk-lambda/build.gradle.kts b/sdk-lambda/build.gradle.kts index c9801e3e0..71cdfece0 100644 --- a/sdk-lambda/build.gradle.kts +++ b/sdk-lambda/build.gradle.kts @@ -11,25 +11,24 @@ dependencies { api(project(":sdk-common")) implementation(project(":sdk-core")) - api(lambdaLibs.core) - api(lambdaLibs.events) + api(libs.aws.lambda.core) + api(libs.aws.lambda.events) - implementation(platform(coreLibs.opentelemetry.bom)) - implementation(coreLibs.opentelemetry.api) + implementation(libs.opentelemetry.api) - implementation(coreLibs.log4j.api) + implementation(libs.log4j.api) testAnnotationProcessor(project(":sdk-api-gen")) testImplementation(project(":sdk-api")) testImplementation(project(":sdk-api-kotlin")) testImplementation(project(":sdk-core", "testArchive")) testImplementation(project(":sdk-serde-jackson")) - testImplementation(testingLibs.junit.jupiter) - testImplementation(testingLibs.assertj) + testImplementation(libs.junit.jupiter) + testImplementation(libs.assertj) - testImplementation(coreLibs.protobuf.java) - testImplementation(coreLibs.protobuf.kotlin) - testImplementation(coreLibs.log4j.core) + testImplementation(libs.protobuf.java) + testImplementation(libs.protobuf.kotlin) + testImplementation(libs.log4j.core) - testImplementation(kotlinLibs.kotlinx.coroutines) + testImplementation(libs.kotlinx.coroutines.core) } diff --git a/sdk-request-identity/build.gradle.kts b/sdk-request-identity/build.gradle.kts index 3357743fb..d13eff9c0 100644 --- a/sdk-request-identity/build.gradle.kts +++ b/sdk-request-identity/build.gradle.kts @@ -8,14 +8,14 @@ plugins { description = "Restate SDK request identity implementation" dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) implementation(project(":sdk-common")) // Dependencies for signing request tokens - implementation(coreLibs.jwt) - implementation(coreLibs.tink) + implementation(libs.jwt) + implementation(libs.tink) - testImplementation(testingLibs.junit.jupiter) - testImplementation(testingLibs.assertj) + testImplementation(libs.junit.jupiter) + testImplementation(libs.assertj) } diff --git a/sdk-serde-jackson/build.gradle.kts b/sdk-serde-jackson/build.gradle.kts index 249a80a07..5a9624db6 100644 --- a/sdk-serde-jackson/build.gradle.kts +++ b/sdk-serde-jackson/build.gradle.kts @@ -8,17 +8,16 @@ plugins { description = "Restate SDK Jackson integration" dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) - api(platform(jacksonLibs.jackson.bom)) - api(jacksonLibs.jackson.databind) - implementation(jacksonLibs.jackson.core) + api(libs.jackson.databind) + implementation(libs.jackson.core) - implementation("com.github.victools:jsonschema-generator:4.37.0") - implementation("com.github.victools:jsonschema-module-jackson:4.37.0") + implementation(libs.victools.jsonschema.generator) + implementation(libs.victools.jsonschema.module.jackson) - testImplementation(testingLibs.junit.jupiter) - testImplementation(testingLibs.assertj) + testImplementation(libs.junit.jupiter) + testImplementation(libs.assertj) implementation(project(":sdk-common")) } diff --git a/sdk-serde-protobuf/build.gradle.kts b/sdk-serde-protobuf/build.gradle.kts index 64d5d1ed9..b27120285 100644 --- a/sdk-serde-protobuf/build.gradle.kts +++ b/sdk-serde-protobuf/build.gradle.kts @@ -8,9 +8,9 @@ plugins { description = "Restate SDK Protobuf integration" dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) - api(coreLibs.protobuf.java) + api(libs.protobuf.java) implementation(project(":sdk-common")) } diff --git a/sdk-spring-boot-starter/build.gradle.kts b/sdk-spring-boot-starter/build.gradle.kts index 57026a901..0c99ff0b1 100644 --- a/sdk-spring-boot-starter/build.gradle.kts +++ b/sdk-spring-boot-starter/build.gradle.kts @@ -3,15 +3,13 @@ plugins { `java-library` `test-jar-conventions` `library-publishing-conventions` - id("io.spring.dependency-management") version "1.1.6" + alias(libs.plugins.spring.dependency.management) } description = "Restate SDK Spring Boot starter" -val springBootVersion = "3.3.5" - dependencies { - compileOnly(coreLibs.jspecify) + compileOnly(libs.jspecify) api(project(":sdk-common")) { // Let spring bring jackson in @@ -39,35 +37,28 @@ dependencies { exclude(group = "com.fasterxml.jackson.datatype") } implementation(project(":sdk-request-identity")) - implementation(platform(vertxLibs.vertx.bom)) { - // Let spring bring jackson in - exclude(group = "com.fasterxml.jackson") - exclude(group = "com.fasterxml.jackson.core") - exclude(group = "com.fasterxml.jackson.datatype") - } - implementation(vertxLibs.vertx.core) { + implementation(libs.vertx.core) { // Let spring bring jackson in exclude(group = "com.fasterxml.jackson") exclude(group = "com.fasterxml.jackson.core") exclude(group = "com.fasterxml.jackson.datatype") } - implementation("org.springframework.boot:spring-boot-starter:$springBootVersion") + implementation(libs.spring.boot.starter) // Spring is going to bring jackson in with this - implementation("org.springframework.boot:spring-boot-starter-json:$springBootVersion") + implementation(libs.spring.boot.starter.json) // We need these for the deployment manifest testImplementation(project(":sdk-core")) - testImplementation(platform(jacksonLibs.jackson.bom)) - testImplementation(jacksonLibs.jackson.annotations) - testImplementation(jacksonLibs.jackson.databind) + testImplementation(libs.jackson.annotations) + testImplementation(libs.jackson.databind) testAnnotationProcessor(project(":sdk-api-gen")) testImplementation(project(":sdk-serde-jackson")) testImplementation(project(":sdk-testing")) - testImplementation("org.springframework.boot:spring-boot-starter-test:$springBootVersion") + testImplementation(libs.spring.boot.starter.test) } tasks.withType { options.compilerArgs.add("-parameters") } diff --git a/sdk-testing/build.gradle.kts b/sdk-testing/build.gradle.kts index 818067ce9..d4e1e992a 100644 --- a/sdk-testing/build.gradle.kts +++ b/sdk-testing/build.gradle.kts @@ -9,19 +9,18 @@ description = "Restate SDK testing tools" dependencies { api(project(":sdk-common")) - api(testingLibs.junit.api) - api(testingLibs.testcontainers.core) + api(libs.junit.api) + api(libs.testcontainers) implementation(project(":admin-client")) implementation(project(":sdk-http-vertx")) - implementation(coreLibs.log4j.api) - implementation(platform(vertxLibs.vertx.bom)) - implementation(vertxLibs.vertx.core) + implementation(libs.log4j.api) + implementation(libs.vertx.core) testImplementation(project(":sdk-api")) testAnnotationProcessor(project(":sdk-api-gen")) testImplementation(project(":sdk-serde-jackson")) - testImplementation(testingLibs.assertj) - testImplementation(testingLibs.junit.jupiter) - testImplementation(coreLibs.log4j.core) + testImplementation(libs.assertj) + testImplementation(libs.junit.jupiter) + testImplementation(libs.log4j.core) } diff --git a/settings.gradle.kts b/settings.gradle.kts index 98e4d0001..a45edb4c8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -34,91 +34,76 @@ include( dependencyResolutionManagement { repositories { mavenCentral() } - versionCatalogs { - create("coreLibs") { - version("protobuf", "4.28.3") - version("log4j", "2.24.1") - version("opentelemetry", "1.44.1") - - library("protoc", "com.google.protobuf", "protoc").versionRef("protobuf") - library("protobuf-java", "com.google.protobuf", "protobuf-java").versionRef("protobuf") - library("protobuf-kotlin", "com.google.protobuf", "protobuf-kotlin").versionRef("protobuf") - - library("log4j-api", "org.apache.logging.log4j", "log4j-api").versionRef("log4j") - library("log4j-core", "org.apache.logging.log4j", "log4j-core").versionRef("log4j") - - library("opentelemetry-bom", "io.opentelemetry", "opentelemetry-bom") - .versionRef("opentelemetry") - library("opentelemetry-api", "io.opentelemetry", "opentelemetry-api").withoutVersion() - library("opentelemetry-kotlin", "io.opentelemetry", "opentelemetry-extension-kotlin") - .withoutVersion() - - library("jspecify", "org.jspecify", "jspecify").version("1.0.0") - - library("jwt", "com.nimbusds:nimbus-jose-jwt:9.47") - library("tink", "com.google.crypto.tink:tink:1.15.0") - } - create("vertxLibs") { - library("vertx-bom", "io.vertx:vertx-stack-depchain:4.5.11") - library("vertx-core", "io.vertx", "vertx-core").withoutVersion() - library("vertx-kotlin-coroutines", "io.vertx", "vertx-lang-kotlin-coroutines") - .withoutVersion() - library("vertx-junit5", "io.vertx", "vertx-junit5").withoutVersion() - } - create("lambdaLibs") { - library("core", "com.amazonaws:aws-lambda-java-core:1.2.3") - library("events", "com.amazonaws:aws-lambda-java-events:3.11.5") - } - create("jacksonLibs") { - version("jackson", "2.18.1") - - library("jackson-bom", "com.fasterxml.jackson", "jackson-bom").versionRef("jackson") - library("jackson-annotations", "com.fasterxml.jackson.core", "jackson-annotations") - .withoutVersion() - library("jackson-core", "com.fasterxml.jackson.core", "jackson-core").withoutVersion() - library("jackson-databind", "com.fasterxml.jackson.core", "jackson-databind").withoutVersion() - library("jackson-jsr310", "com.fasterxml.jackson.datatype", "jackson-datatype-jsr310") - .withoutVersion() - library("jackson-jdk8", "com.fasterxml.jackson.datatype", "jackson-datatype-jdk8") - .withoutVersion() - library( - "jackson-parameter-names", - "com.fasterxml.jackson.module", - "jackson-module-parameter-names") - .withoutVersion() - } - create("kotlinLibs") { - library("kotlinx-coroutines", "org.jetbrains.kotlinx", "kotlinx-coroutines-core") - .version("1.9.0") - library("kotlinx-serialization-core", "org.jetbrains.kotlinx", "kotlinx-serialization-core") - .version("1.7.3") - library("kotlinx-serialization-json", "org.jetbrains.kotlinx", "kotlinx-serialization-json") - .version("1.7.3") - - version("ksp", "2.0.21-1.0.28") - library("symbol-processing-api", "com.google.devtools.ksp", "symbol-processing-api") - .versionRef("ksp") - plugin("ksp", "com.google.devtools.ksp").versionRef("ksp") - } - create("testingLibs") { - version("junit-jupiter", "5.10.2") - version("assertj", "3.26.0") - version("testcontainers", "1.20.3") - - library("junit-jupiter", "org.junit.jupiter", "junit-jupiter").versionRef("junit-jupiter") - library("junit-api", "org.junit.jupiter", "junit-jupiter-api").versionRef("junit-jupiter") - - library("assertj", "org.assertj", "assertj-core").versionRef("assertj") - - library("testcontainers-core", "org.testcontainers", "testcontainers") - .versionRef("testcontainers") - library("testcontainers-toxiproxy", "org.testcontainers", "toxiproxy") - .versionRef("testcontainers") - } - create("pluginLibs") { - plugin("spotless", "com.diffplug.spotless").version("6.25.0") - plugin("protobuf", "com.google.protobuf").version("0.9.4") - plugin("test-logger", "com.adarshr.test-logger").version("4.0.0") - } - } + // versionCatalogs { + // create("coreLibs") { + // version("protobuf", "4.28.3") + // version("log4j", "2.24.1") + // version("opentelemetry", "1.44.1") + // + // library("protoc", "com.google.protobuf", "protoc").versionRef("protobuf") + // library("protobuf-java", "com.google.protobuf", "protobuf-java").versionRef("protobuf") + // library("protobuf-kotlin", "com.google.protobuf", + // "protobuf-kotlin").versionRef("protobuf") + // + // library("log4j-api", "org.apache.logging.log4j", "log4j-api").versionRef("log4j") + // library("log4j-core", "org.apache.logging.log4j", "log4j-core").versionRef("log4j") + // + // library("opentelemetry-bom", "io.opentelemetry", "opentelemetry-bom") + // .versionRef("opentelemetry") + // library("opentelemetry-api", "io.opentelemetry", "opentelemetry-api").withoutVersion() + // library("opentelemetry-kotlin", "io.opentelemetry", "opentelemetry-extension-kotlin") + // .withoutVersion() + // + // library("jspecify", "org.jspecify", "jspecify").version("1.0.0") + // + // library("jwt", "com.nimbusds:nimbus-jose-jwt:9.47") + // library("tink", "com.google.crypto.tink:tink:1.15.0") + // } + // create("vertxLibs") { + // library("vertx-bom", "io.vertx:vertx-stack-depchain:4.5.11") + // library("vertx-core", "io.vertx", "vertx-core").withoutVersion() + // library("vertx-kotlin-coroutines", "io.vertx", "vertx-lang-kotlin-coroutines") + // .withoutVersion() + // library("vertx-junit5", "io.vertx", "vertx-junit5").withoutVersion() + // } + // create("lambdaLibs") { + // library("core", "com.amazonaws:aws-lambda-java-core:1.2.3") + // library("events", "com.amazonaws:aws-lambda-java-events:3.11.5") + // } + // create("kotlinLibs") { + // library("kotlinx-coroutines", "org.jetbrains.kotlinx", "kotlinx-coroutines-core") + // .version("1.9.0") + // library("kotlinx-serialization-core", "org.jetbrains.kotlinx", + // "kotlinx-serialization-core") + // .version("1.7.3") + // library("kotlinx-serialization-json", "org.jetbrains.kotlinx", + // "kotlinx-serialization-json") + // .version("1.7.3") + // + // version("ksp", "2.0.21-1.0.28") + // library("symbol-processing-api", "com.google.devtools.ksp", "symbol-processing-api") + // .versionRef("ksp") + // plugin("ksp", "com.google.devtools.ksp").versionRef("ksp") + // } + // create("testingLibs") { + // version("junit-jupiter", "5.10.2") + // version("assertj", "3.26.0") + // version("testcontainers", "1.20.3") + // + // library("junit-jupiter", "org.junit.jupiter", "junit-jupiter").versionRef("junit-jupiter") + // library("junit-api", "org.junit.jupiter", "junit-jupiter-api").versionRef("junit-jupiter") + // + // library("assertj", "org.assertj", "assertj-core").versionRef("assertj") + // + // library("testcontainers-core", "org.testcontainers", "testcontainers") + // .versionRef("testcontainers") + // library("testcontainers-toxiproxy", "org.testcontainers", "toxiproxy") + // .versionRef("testcontainers") + // } + // create("pluginLibs") { + // plugin("spotless", "com.diffplug.spotless").version("6.25.0") + // plugin("protobuf", "com.google.protobuf").version("0.9.4") + // plugin("test-logger", "com.adarshr.test-logger").version("4.0.0") + // } + // } } diff --git a/test-services/build.gradle.kts b/test-services/build.gradle.kts index 98c677c5b..70c99771a 100644 --- a/test-services/build.gradle.kts +++ b/test-services/build.gradle.kts @@ -3,9 +3,9 @@ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurr plugins { `java-conventions` `kotlin-conventions` - alias(kotlinLibs.plugins.ksp) + alias(libs.plugins.ksp) application - id("com.google.cloud.tools.jib") version "3.2.1" + alias(libs.plugins.jib) } dependencies { @@ -16,12 +16,12 @@ dependencies { implementation(project(":sdk-serde-jackson")) implementation(project(":sdk-request-identity")) - implementation(kotlinLibs.kotlinx.serialization.core) - implementation(kotlinLibs.kotlinx.serialization.json) + implementation(libs.kotlinx.serialization.core) + implementation(libs.kotlinx.serialization.json) - implementation(coreLibs.log4j.core) + implementation(libs.log4j.core) - implementation(kotlinLibs.kotlinx.coroutines) + implementation(libs.kotlinx.coroutines.core) } // Configuration of jib container images parameters