diff --git a/build.gradle.kts b/build.gradle.kts index 4de4c1d2..2bd9a6ec 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,7 @@ plugins { - id("com.github.jk1.dependency-license-report") version "2.0" - id("io.github.gradle-nexus.publish-plugin") version "1.3.0" - - id("org.jetbrains.dokka") version "1.9.20" + alias(libs.plugins.dependency.license.report) + alias(libs.plugins.nexus.publish) + alias(libs.plugins.dokka) // https://github.com/gradle/gradle/issues/20084#issuecomment-1060822638 id(libs.plugins.spotless.get().pluginId) apply false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2c9f1f02..d4f20318 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,6 @@ ksp = "2.0.21-1.0.28" protobuf = "4.29.0" 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" @@ -20,7 +19,6 @@ jackson-annotations = { module = "com.fasterxml.jackson.core:jackson-annotations 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" } @@ -30,7 +28,6 @@ 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" } @@ -44,6 +41,7 @@ log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "lo 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-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", 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" @@ -62,9 +60,9 @@ jib = "com.google.cloud.tools.jib:3.4.4" 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" +nexus-publish = "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" } +dokka = "org.jetbrains.dokka:1.9.20" 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-api-kotlin-gen/src/main/kotlin/dev/restate/sdk/kotlin/gen/ServiceProcessor.kt b/sdk-api-kotlin-gen/src/main/kotlin/dev/restate/sdk/kotlin/gen/ServiceProcessor.kt index b746d211..637583b1 100644 --- a/sdk-api-kotlin-gen/src/main/kotlin/dev/restate/sdk/kotlin/gen/ServiceProcessor.kt +++ b/sdk-api-kotlin-gen/src/main/kotlin/dev/restate/sdk/kotlin/gen/ServiceProcessor.kt @@ -140,12 +140,25 @@ class ServiceProcessor(private val logger: KSPLogger, private val codeGenerator: .getClassDeclarationByName()!! .qualifiedName!!, ServiceType.WORKFLOW)) + + // Add spring annotations, if available + resolver.getClassDeclarationByName("dev.restate.sdk.springboot.RestateService")?.let { + metaAnnotationsToProcess.add(MetaRestateAnnotation(it.qualifiedName!!, ServiceType.SERVICE)) + } + resolver.getClassDeclarationByName("dev.restate.sdk.springboot.RestateVirtualObject")?.let { + metaAnnotationsToProcess.add( + MetaRestateAnnotation(it.qualifiedName!!, ServiceType.VIRTUAL_OBJECT)) + } + resolver.getClassDeclarationByName("dev.restate.sdk.springboot.RestateWorkflow")?.let { + metaAnnotationsToProcess.add(MetaRestateAnnotation(it.qualifiedName!!, ServiceType.WORKFLOW)) + } + val discoveredAnnotations = mutableSetOf() var metaAnnotation = metaAnnotationsToProcess.removeFirstOrNull() while (metaAnnotation != null) { if (!discoveredAnnotations.add(metaAnnotation.annotationName.asString())) { - // We alredy discovered it, skip + // We already discovered it, skip continue } for (annotatedElement in diff --git a/sdk-spring-boot-kotlin-starter/build.gradle.kts b/sdk-spring-boot-kotlin-starter/build.gradle.kts new file mode 100644 index 00000000..e34a2265 --- /dev/null +++ b/sdk-spring-boot-kotlin-starter/build.gradle.kts @@ -0,0 +1,25 @@ +plugins { + `kotlin-conventions` + `library-publishing-conventions` + alias(libs.plugins.ksp) + alias(libs.plugins.spring.dependency.management) +} + +description = "Restate SDK Spring Boot Kotlin starter" + +dependencies { + compileOnly(libs.jspecify) + + api(project(":sdk-api-kotlin")) + api(project(":sdk-spring-boot")) + + kspTest(project(":sdk-api-kotlin-gen")) + testImplementation(project(":sdk-testing")) + testImplementation(libs.kotlinx.coroutines.test) + testImplementation(libs.spring.boot.starter.test) + + // We need these for the deployment manifest + testImplementation(project(":sdk-core")) + testImplementation(libs.jackson.annotations) + testImplementation(libs.jackson.databind) +} diff --git a/sdk-spring-boot-kotlin-starter/src/test/kotlin/dev/restate/sdk/springboot/kotlin/Greeter.kt b/sdk-spring-boot-kotlin-starter/src/test/kotlin/dev/restate/sdk/springboot/kotlin/Greeter.kt new file mode 100644 index 00000000..49d191a6 --- /dev/null +++ b/sdk-spring-boot-kotlin-starter/src/test/kotlin/dev/restate/sdk/springboot/kotlin/Greeter.kt @@ -0,0 +1,24 @@ +// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH +// +// This file is part of the Restate Java SDK, +// which is released under the MIT license. +// +// You can find a copy of the license in file LICENSE in the root +// directory of this repository or package, or at +// https://github.com/restatedev/sdk-java/blob/main/LICENSE +package dev.restate.sdk.springboot.kotlin + +import dev.restate.sdk.annotation.Handler +import dev.restate.sdk.kotlin.Context +import dev.restate.sdk.springboot.RestateService +import org.springframework.beans.factory.annotation.Value + +@RestateService(name = "greeter") +class Greeter { + @Value("\${greetingPrefix}") lateinit var greetingPrefix: String + + @Handler + fun greet(ctx: Context, person: String): String { + return greetingPrefix + person + } +} diff --git a/sdk-spring-boot-kotlin-starter/src/test/kotlin/dev/restate/sdk/springboot/kotlin/RestateHttpEndpointBeanTest.kt b/sdk-spring-boot-kotlin-starter/src/test/kotlin/dev/restate/sdk/springboot/kotlin/RestateHttpEndpointBeanTest.kt new file mode 100644 index 00000000..a29ce0de --- /dev/null +++ b/sdk-spring-boot-kotlin-starter/src/test/kotlin/dev/restate/sdk/springboot/kotlin/RestateHttpEndpointBeanTest.kt @@ -0,0 +1,61 @@ +// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH +// +// This file is part of the Restate Java SDK, +// which is released under the MIT license. +// +// You can find a copy of the license in file LICENSE in the root +// directory of this repository or package, or at +// https://github.com/restatedev/sdk-java/blob/main/LICENSE +package dev.restate.sdk.springboot.kotlin + +import com.fasterxml.jackson.databind.ObjectMapper +import dev.restate.sdk.core.manifest.EndpointManifestSchema +import dev.restate.sdk.core.manifest.Service +import dev.restate.sdk.springboot.RestateHttpEndpointBean +import java.io.IOException +import java.net.URI +import java.net.http.HttpClient +import java.net.http.HttpRequest +import java.net.http.HttpResponse +import org.assertj.core.api.Assertions +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.boot.test.context.SpringBootTest + +@SpringBootTest( + classes = [RestateHttpEndpointBean::class, Greeter::class], + properties = ["restate.sdk.http.port=0"]) +class RestateHttpEndpointBeanTest { + @Autowired lateinit var restateHttpEndpointBean: RestateHttpEndpointBean + + @Test + @Throws(IOException::class, InterruptedException::class) + fun httpEndpointShouldBeRunning() { + assertThat(restateHttpEndpointBean.isRunning).isTrue() + assertThat(restateHttpEndpointBean.actualPort()).isPositive() + + // Check if discovery replies containing the Greeter service + val client = HttpClient.newHttpClient() + val response = + client.send( + HttpRequest.newBuilder() + .GET() + .uri( + URI.create( + ("http://localhost:" + restateHttpEndpointBean.actualPort()).toString() + + "/discover")) + .header("Accept", "application/vnd.restate.endpointmanifest.v1+json") + .build(), + HttpResponse.BodyHandlers.ofString()) + Assertions.assertThat(response.statusCode()).isEqualTo(200) + + val endpointManifest = + ObjectMapper() + .readValue(response.body(), EndpointManifestSchema::class.java) + + Assertions.assertThat(endpointManifest.services) + .map({ it.name }) + .containsOnly("greeter") + } +} diff --git a/sdk-spring-boot-kotlin-starter/src/test/kotlin/dev/restate/sdk/springboot/kotlin/SdkTestingIntegrationTest.kt b/sdk-spring-boot-kotlin-starter/src/test/kotlin/dev/restate/sdk/springboot/kotlin/SdkTestingIntegrationTest.kt new file mode 100644 index 00000000..6dc2ed51 --- /dev/null +++ b/sdk-spring-boot-kotlin-starter/src/test/kotlin/dev/restate/sdk/springboot/kotlin/SdkTestingIntegrationTest.kt @@ -0,0 +1,34 @@ +// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH +// +// This file is part of the Restate Java SDK, +// which is released under the MIT license. +// +// You can find a copy of the license in file LICENSE in the root +// directory of this repository or package, or at +// https://github.com/restatedev/sdk-java/blob/main/LICENSE +package dev.restate.sdk.springboot.kotlin + +import dev.restate.sdk.client.Client +import dev.restate.sdk.testing.BindService +import dev.restate.sdk.testing.RestateClient +import dev.restate.sdk.testing.RestateTest +import kotlinx.coroutines.test.runTest +import org.assertj.core.api.Assertions +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Timeout +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.boot.test.context.SpringBootTest + +@SpringBootTest(classes = [Greeter::class], properties = ["greetingPrefix=Something something "]) +@RestateTest(containerImage = "ghcr.io/restatedev/restate:main") +class SdkTestingIntegrationTest { + @Autowired @BindService lateinit var greeter: Greeter + + @Test + @Timeout(value = 10) + fun greet(@RestateClient ingressClient: Client) = runTest { + val client = greeterClient.fromClient(ingressClient) + + Assertions.assertThat(client.greet("Francesco")).isEqualTo("Something something Francesco") + } +} diff --git a/sdk-spring-boot-starter/build.gradle.kts b/sdk-spring-boot-starter/build.gradle.kts index 0c99ff0b..8fa1d4c3 100644 --- a/sdk-spring-boot-starter/build.gradle.kts +++ b/sdk-spring-boot-starter/build.gradle.kts @@ -11,12 +11,7 @@ description = "Restate SDK Spring Boot starter" dependencies { compileOnly(libs.jspecify) - api(project(":sdk-common")) { - // Let spring bring jackson in - exclude(group = "com.fasterxml.jackson") - exclude(group = "com.fasterxml.jackson.core") - exclude(group = "com.fasterxml.jackson.datatype") - } + api(project(":sdk-spring-boot")) api(project(":sdk-api")) { // Let spring bring jackson in exclude(group = "com.fasterxml.jackson") @@ -30,25 +25,6 @@ dependencies { exclude(group = "com.fasterxml.jackson.datatype") } - implementation(project(":sdk-http-vertx")) { - // Let spring bring jackson in - exclude(group = "com.fasterxml.jackson") - exclude(group = "com.fasterxml.jackson.core") - exclude(group = "com.fasterxml.jackson.datatype") - } - implementation(project(":sdk-request-identity")) - 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(libs.spring.boot.starter) - - // Spring is going to bring jackson in with this - implementation(libs.spring.boot.starter.json) - // We need these for the deployment manifest testImplementation(project(":sdk-core")) testImplementation(libs.jackson.annotations) diff --git a/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/Greeter.java b/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/java/Greeter.java similarity index 88% rename from sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/Greeter.java rename to sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/java/Greeter.java index 1f075ffd..d90c6ef1 100644 --- a/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/Greeter.java +++ b/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/java/Greeter.java @@ -6,10 +6,11 @@ // You can find a copy of the license in file LICENSE in the root // directory of this repository or package, or at // https://github.com/restatedev/sdk-java/blob/main/LICENSE -package dev.restate.sdk.springboot; +package dev.restate.sdk.springboot.java; import dev.restate.sdk.Context; import dev.restate.sdk.annotation.Handler; +import dev.restate.sdk.springboot.RestateService; import org.springframework.beans.factory.annotation.Value; @RestateService(name = "greeter") diff --git a/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/RestateHttpEndpointBeanTest.java b/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/java/RestateHttpEndpointBeanTest.java similarity index 95% rename from sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/RestateHttpEndpointBeanTest.java rename to sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/java/RestateHttpEndpointBeanTest.java index 0e48e694..1e1d7d6f 100644 --- a/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/RestateHttpEndpointBeanTest.java +++ b/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/java/RestateHttpEndpointBeanTest.java @@ -6,12 +6,13 @@ // You can find a copy of the license in file LICENSE in the root // directory of this repository or package, or at // https://github.com/restatedev/sdk-java/blob/main/LICENSE -package dev.restate.sdk.springboot; +package dev.restate.sdk.springboot.java; import static org.assertj.core.api.Assertions.assertThat; import com.fasterxml.jackson.databind.ObjectMapper; import dev.restate.sdk.core.manifest.EndpointManifestSchema; +import dev.restate.sdk.springboot.RestateHttpEndpointBean; import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; diff --git a/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/SdkTestingIntegrationTest.java b/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/java/SdkTestingIntegrationTest.java similarity index 96% rename from sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/SdkTestingIntegrationTest.java rename to sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/java/SdkTestingIntegrationTest.java index aa2ad3b9..a1f1537c 100644 --- a/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/SdkTestingIntegrationTest.java +++ b/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/java/SdkTestingIntegrationTest.java @@ -6,7 +6,7 @@ // You can find a copy of the license in file LICENSE in the root // directory of this repository or package, or at // https://github.com/restatedev/sdk-java/blob/main/LICENSE -package dev.restate.sdk.springboot; +package dev.restate.sdk.springboot.java; import static org.assertj.core.api.Assertions.assertThat; diff --git a/sdk-spring-boot/build.gradle.kts b/sdk-spring-boot/build.gradle.kts new file mode 100644 index 00000000..779093a6 --- /dev/null +++ b/sdk-spring-boot/build.gradle.kts @@ -0,0 +1,43 @@ +plugins { + `java-conventions` + `java-library` + `test-jar-conventions` + `library-publishing-conventions` + alias(libs.plugins.spring.dependency.management) +} + +description = "Restate SDK Spring Boot integration" + +dependencies { + compileOnly(libs.jspecify) + + api(project(":sdk-common")) { + // Let spring bring jackson in + exclude(group = "com.fasterxml.jackson") + exclude(group = "com.fasterxml.jackson.core") + exclude(group = "com.fasterxml.jackson.datatype") + } + + implementation(project(":sdk-http-vertx")) { + // Let spring bring jackson in + exclude(group = "com.fasterxml.jackson") + exclude(group = "com.fasterxml.jackson.core") + exclude(group = "com.fasterxml.jackson.datatype") + } + implementation(project(":sdk-request-identity")) + 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(libs.spring.boot.starter) + + // Spring is going to bring jackson in with this + implementation(libs.spring.boot.starter.json) + + testImplementation(libs.spring.boot.starter.test) +} + +tasks.withType { options.compilerArgs.add("-parameters") } diff --git a/sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/EnableRestate.java b/sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/EnableRestate.java similarity index 100% rename from sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/EnableRestate.java rename to sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/EnableRestate.java diff --git a/sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateClientAutoConfiguration.java b/sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateClientAutoConfiguration.java similarity index 100% rename from sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateClientAutoConfiguration.java rename to sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateClientAutoConfiguration.java diff --git a/sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateClientProperties.java b/sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateClientProperties.java similarity index 100% rename from sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateClientProperties.java rename to sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateClientProperties.java diff --git a/sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateComponent.java b/sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateComponent.java similarity index 100% rename from sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateComponent.java rename to sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateComponent.java diff --git a/sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateEndpointHttpServerProperties.java b/sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateEndpointHttpServerProperties.java similarity index 100% rename from sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateEndpointHttpServerProperties.java rename to sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateEndpointHttpServerProperties.java diff --git a/sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateEndpointProperties.java b/sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateEndpointProperties.java similarity index 100% rename from sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateEndpointProperties.java rename to sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateEndpointProperties.java diff --git a/sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateHttpEndpointBean.java b/sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateHttpEndpointBean.java similarity index 100% rename from sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateHttpEndpointBean.java rename to sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateHttpEndpointBean.java diff --git a/sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateService.java b/sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateService.java similarity index 100% rename from sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateService.java rename to sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateService.java diff --git a/sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateVirtualObject.java b/sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateVirtualObject.java similarity index 100% rename from sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateVirtualObject.java rename to sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateVirtualObject.java diff --git a/sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateWorkflow.java b/sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateWorkflow.java similarity index 100% rename from sdk-spring-boot-starter/src/main/java/dev/restate/sdk/springboot/RestateWorkflow.java rename to sdk-spring-boot/src/main/java/dev/restate/sdk/springboot/RestateWorkflow.java diff --git a/sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/RestateClientAutoConfigurationTest.java b/sdk-spring-boot/src/test/java/dev/restate/sdk/springboot/RestateClientAutoConfigurationTest.java similarity index 100% rename from sdk-spring-boot-starter/src/test/java/dev/restate/sdk/springboot/RestateClientAutoConfigurationTest.java rename to sdk-spring-boot/src/test/java/dev/restate/sdk/springboot/RestateClientAutoConfigurationTest.java diff --git a/settings.gradle.kts b/settings.gradle.kts index a45edb4c..4dbfd42d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -26,84 +26,11 @@ include( "sdk-api-gen-common", "sdk-api-gen", "sdk-api-kotlin-gen", + "sdk-spring-boot", "sdk-spring-boot-starter", + "sdk-spring-boot-kotlin-starter", "examples", "sdk-aggregated-javadocs", "test-services") -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("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") - // } - // } -} +dependencyResolutionManagement { repositories { mavenCentral() } }