diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 2d6f859dd..c8891983a 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -9,6 +9,6 @@ repositories { dependencies { implementation libs.gradle.micronaut - implementation (libs.kotlin.gradle.plugin) - implementation (libs.kotlin.gradle.allopen) -} \ No newline at end of file + implementation libs.kotlin.gradle.plugin + implementation libs.kotlin.gradle.allopen +} diff --git a/gradle.properties b/gradle.properties index 07808b169..253f7529c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,15 +1,13 @@ projectVersion=4.2.0-SNAPSHOT projectGroup=io.micronaut.grpc protobufGradleVersion=0.9.4 -protobufJavaVersion=3.25.0 -grpcVersion=1.59.0 title=Micronaut gRPC projectDesc=Integration between Micronaut and gRPC projectUrl=https://micronaut.io githubSlug=micronaut-projects/micronaut-grpc developers=Graeme Rocher -org.gradle.caching=true +org.gradle.caching=false # For sonarqube org.gradle.jvmargs=-XX:MaxMetaspaceSize=1g diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fc042c2c6..143bff0f9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,35 +1,44 @@ [versions] -managed-grpc = '1.59.0' -managed-protobuf = '3.25.0' +managed-grpc = '1.59.1' +managed-protobuf = '3.25.1' managed-protobuf-gradle = '0.9.4' -managed-grpc-kotlin = '1.4.0' +managed-grpc-kotlin = '1.4.1' jackson-datatype-protobuf = '0.9.14' jaeger-core = '1.8.1' opentracing-grpc = '0.2.3' opentracing-mock = '0.33.0' - -micronaut = "4.1.11" -micronaut-platform = "4.0.6" -micronaut-docs = "2.0.0" -micronaut-test = "4.0.0" -micronaut-gradle-plugin = "4.1.2" - -graal-svm = "23.1.1" -groovy = "4.0.15" -javax-annotation-api = "1.3.2" -kotlin = "1.9.20" -spock = "2.3-groovy-4.0" - -micronaut-discovery = "4.0.1" -micronaut-reactor = "3.1.0" -micronaut-tracing = "6.2.0" -micronaut-tracing-legacy = "3.2.7" -micronaut-validation = "4.2.0" +graal-svm = '23.1.1' +groovy = '4.0.15' +javax-annotation-api = '1.3.2' +kotlin = '1.9.20' +spock = '2.3-groovy-4.0' + +micronaut = '4.1.11' +micronaut-platform = '4.1.6' +micronaut-docs = '2.0.0' +micronaut-gradle-plugin = '4.2.0' +micronaut-discovery-client = '4.1.0' +micronaut-reactor = '3.1.0' +micronaut-tracing = '6.2.0' +micronaut-tracing-legacy = '3.2.7' +micronaut-validation = '4.2.0' +micronaut-kotlin = '4.1.0' +micronaut-logging = '1.1.2' +micronaut-test = '4.0.2' [libraries] # Core micronaut-core = { module = 'io.micronaut:micronaut-core-bom', version.ref = 'micronaut' } +micronaut-docs-asciidoc-config-props = { module = 'io.micronaut.docs:micronaut-docs-asciidoc-config-props', version.ref = 'micronaut-docs' } +micronaut-tracing-legacy = { module = 'io.micronaut:micronaut-tracing', version.ref = 'micronaut-tracing-legacy' } +micronaut-reactor = { module = 'io.micronaut.reactor:micronaut-reactor-bom', version.ref = 'micronaut-reactor' } +micronaut-tracing = { module = 'io.micronaut.tracing:micronaut-tracing-bom', version.ref = 'micronaut-tracing' } +micronaut-discovery-client = { module = "io.micronaut.discovery:micronaut-discovery-client", version.ref = "micronaut-discovery-client" } +micronaut-validation = { module = 'io.micronaut.validation:micronaut-validation-bom', version.ref = 'micronaut-validation' } +micronaut-kotlin = { module = 'io.micronaut.kotlin:micronaut-kotlin-bom', version.ref = 'micronaut-kotlin' } +micronaut-logging = { module = 'io.micronaut.logging:micronaut-logging-bom', version.ref = 'micronaut-logging' } +micronaut-test = { module = 'io.micronaut.test:micronaut-test-bom', version.ref = 'micronaut-test' } managed-grpc-protobuf = { module = 'io.grpc:grpc-protobuf', version.ref = 'managed-grpc' } managed-grpc-stub = { module = 'io.grpc:grpc-stub', version.ref = 'managed-grpc' } @@ -38,19 +47,18 @@ managed-protoc-grpc = { module = 'io.grpc:protoc-gen-grpc-java', version.ref = ' managed-grpc-kotlin-stub = { module = 'io.grpc:grpc-kotlin-stub', version.ref = 'managed-grpc-kotlin' } managed-protobuf-java = { module = 'com.google.protobuf:protobuf-java', version.ref = 'managed-protobuf' } +managed-protobuf-javalite = { module = 'com.google.protobuf:protobuf-javalite', version.ref = 'managed-protobuf' } +managed-protobuf-kotlin = { module = 'com.google.protobuf:protobuf-kotlin', version.ref = 'managed-protobuf' } +managed-protobuf-kotlin-lite = { module = 'com.google.protobuf:protobuf-kotlin-lite', version.ref = 'managed-protobuf' } managed-protobuf-java-util = { module = 'com.google.protobuf:protobuf-java-util', version.ref = 'managed-protobuf' } managed-protoc = { module = 'com.google.protobuf:protoc', version.ref = 'managed-protobuf' } -micronaut-discovery-client = { module = "io.micronaut.discovery:micronaut-discovery-client", version.ref = "micronaut-discovery" } -micronaut-docs-asciidoc-config-props = { module = 'io.micronaut.docs:micronaut-docs-asciidoc-config-props', version.ref = 'micronaut-docs' } -micronaut-tracing-legacy = { module = "io.micronaut:micronaut-tracing", version.ref = "micronaut-tracing-legacy" } -micronaut-validation = { module = "io.micronaut.validation:micronaut-validation-bom", version.ref = "micronaut-validation" } - -graal-svm = { module = "org.graalvm.nativeimage:svm", version.ref = "graal-svm" } +graal-svm = { module = 'org.graalvm.nativeimage:svm', version.ref = 'graal-svm' } grpc-netty = { module = 'io.grpc:grpc-netty' } jackson-datatype-protobuf = { module = 'com.hubspot.jackson:jackson-datatype-protobuf', version.ref = 'jackson-datatype-protobuf' } -javax-annotation-api = { module = "javax.annotation:javax.annotation-api", version.ref = "javax-annotation-api" } +javax-annotation-api = { module = 'javax.annotation:javax.annotation-api', version.ref = 'javax-annotation-api' } +groovy = {module = 'org.apache.groovy:groovy' } jaeger-core = { module = 'io.jaegertracing:jaeger-core', version.ref = 'jaeger-core' } @@ -60,14 +68,16 @@ netty-tcnative-boringssl-static = { module = 'io.netty:netty-tcnative-boringssl- opentracing-grpc = { module = 'io.opentracing.contrib:opentracing-grpc', version.ref = 'opentracing-grpc' } opentracing-mock = { module = 'io.opentracing:opentracing-mock', version.ref = 'opentracing-mock' } -## BOMs -micronaut-reactor = { module = 'io.micronaut.reactor:micronaut-reactor-bom', version.ref = "micronaut-reactor" } -micronaut-tracing = { module = "io.micronaut.tracing:micronaut-tracing-bom", version.ref = "micronaut-tracing" } +jackson-module-kotlin = { module = 'com.fasterxml.jackson.module:jackson-module-kotlin' } +kotlin-stdlib-jdk8 = { module = 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' } +kotlin-reflect = { module = 'org.jetbrains.kotlin:kotlin-reflect' } +kotlinx-coroutines-core = { module = 'org.jetbrains.kotlinx:kotlinx-coroutines-core' } +## BOMs boms-protobuf = { module = 'com.google.protobuf:protobuf-bom', version.ref = 'managed-protobuf' } boms-grpc = { module = 'io.grpc:grpc-bom', version.ref = 'managed-grpc' } -gradle-micronaut = { module = "io.micronaut.gradle:micronaut-gradle-plugin", version.ref = "micronaut-gradle-plugin" } +gradle-micronaut = { module = 'io.micronaut.gradle:micronaut-gradle-plugin', version.ref = 'micronaut-gradle-plugin' } kotlin-gradle-plugin = { module = 'org.jetbrains.kotlin:kotlin-gradle-plugin', version.ref = 'kotlin' } kotlin-gradle-allopen = { module = 'org.jetbrains.kotlin:kotlin-allopen', version.ref = 'kotlin' } diff --git a/test-suite-groovy/build.gradle b/test-suite-groovy/build.gradle index a19a12dd6..077b1fab7 100644 --- a/test-suite-groovy/build.gradle +++ b/test-suite-groovy/build.gradle @@ -5,6 +5,13 @@ plugins { id "io.micronaut.build.internal.grpc-base" } +// tag::variables[] +ext { + grpcVersion = libs.versions.managed.grpc.asProvider().get() + protobufVersion = libs.versions.managed.protobuf.asProvider().get() +} +// end::variables[] + mainClassName = "helloworld.Application" micronaut { version.set(libs.versions.micronaut.platform.get()) @@ -18,25 +25,26 @@ micronaut { } dependencies { - compileOnly "io.grpc:grpc-stub" - compileOnly "javax.annotation:javax.annotation-api" - compileOnly "io.micronaut.validation:micronaut-validation-processor" - implementation "io.micronaut.validation:micronaut-validation" - implementation "io.micronaut:micronaut-runtime" - implementation "io.micronaut.grpc:micronaut-grpc-server-runtime" - implementation "io.micronaut.discovery:micronaut-discovery-client" - implementation "io.grpc:grpc-services" - implementation "io.grpc:grpc-protobuf" - implementation "com.google.protobuf:protobuf-java-util" - implementation "org.yaml:snakeyaml" + compileOnly libs.managed.grpc.stub + compileOnly libs.javax.annotation.api + compileOnly mnValidation.micronaut.validation.processor + + implementation mnValidation.micronaut.validation + implementation mn.micronaut.runtime + implementation projects.micronautGrpcRuntime + implementation libs.micronaut.discovery.client + implementation libs.managed.grpc.services + implementation libs.managed.grpc.protobuf + implementation libs.managed.protobuf.java.util + implementation mn.snakeyaml - runtimeOnly "ch.qos.logback:logback-classic" + runtimeOnly mnLogging.logback.classic - testCompileOnly "javax.annotation:javax.annotation-api" + testCompileOnly libs.javax.annotation.api - testImplementation "org.apache.groovy:groovy" + testImplementation libs.groovy - testRuntimeOnly "ch.qos.logback:logback-classic" + testRuntimeOnly mnLogging.logback.classic } tasks.withType(GroovyCompile) { @@ -57,7 +65,7 @@ sourceSets { } protobuf { - protoc { artifact = "com.google.protobuf:protoc:$protobufJavaVersion" } + protoc { artifact = "com.google.protobuf:protoc:$protobufVersion" } plugins { grpc { artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion" } } diff --git a/test-suite-java/build.gradle b/test-suite-java/build.gradle index e0babedcf..33f3af115 100644 --- a/test-suite-java/build.gradle +++ b/test-suite-java/build.gradle @@ -7,6 +7,13 @@ plugins { id "io.micronaut.build.internal.grpc-tests" } +// tag::variables[] +ext { + grpcVersion = libs.versions.managed.grpc.asProvider().get() + protobufVersion = libs.versions.managed.protobuf.asProvider().get() +} +// end::variables[] + mainClassName = "helloworld.Application" micronaut { version.set(libs.versions.micronaut.platform.get()) @@ -21,23 +28,23 @@ micronaut { dependencies { - annotationProcessor "io.micronaut.validation:micronaut-validation-processor" + annotationProcessor mnValidation.micronaut.validation.processor - compileOnly "io.grpc:grpc-stub" - compileOnly "javax.annotation:javax.annotation-api" + compileOnly libs.managed.grpc.stub + compileOnly libs.javax.annotation.api - implementation "io.micronaut.validation:micronaut-validation" - implementation "io.micronaut:micronaut-runtime" + implementation mnValidation.micronaut.validation + implementation mn.micronaut.runtime implementation projects.micronautGrpcServerRuntime - implementation "io.micronaut.discovery:micronaut-discovery-client" - implementation "io.grpc:grpc-services" - implementation "org.yaml:snakeyaml" + implementation libs.micronaut.discovery.client + implementation libs.managed.grpc.services + implementation mn.snakeyaml - runtimeOnly "ch.qos.logback:logback-classic" + runtimeOnly mnLogging.logback.classic - testAnnotationProcessor "io.micronaut.validation:micronaut-validation-processor" + testAnnotationProcessor mnValidation.micronaut.validation.processor - testCompileOnly "javax.annotation:javax.annotation-api" + testCompileOnly libs.javax.annotation.api } // tag::config[] @@ -52,7 +59,7 @@ sourceSets { } protobuf { - protoc { artifact = "com.google.protobuf:protoc:$protobufJavaVersion" } + protoc { artifact = "com.google.protobuf:protoc:$protobufVersion" } plugins { grpc { artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion" } } diff --git a/test-suite-java/pom.xml b/test-suite-java/pom.xml index 353ca36fe..a59eeede3 100644 --- a/test-suite-java/pom.xml +++ b/test-suite-java/pom.xml @@ -11,9 +11,9 @@ jar - 4.0.0 - 1.55.1 - 3.25.0 + 4.1.11 + 1.59.1 + 3.25.1 32.1.3-jre 17 UTF-8 @@ -113,7 +113,7 @@ io.micronaut.build micronaut-maven-plugin - 3.5.4 + 4.1.0 org.apache.maven.plugins diff --git a/test-suite-kotlin/build.gradle b/test-suite-kotlin/build.gradle index 6983ac88b..f595c36cf 100644 --- a/test-suite-kotlin/build.gradle +++ b/test-suite-kotlin/build.gradle @@ -15,11 +15,12 @@ kotlin { // tag::variables[] ext { - grpcKotlinVersion = "1.4.0" + grpcVersion = libs.versions.managed.grpc.asProvider().get() + grpcKotlinVersion = libs.versions.managed.grpc.kotlin.get() + protobufVersion = libs.versions.managed.protobuf.asProvider().get() } // end::variables[] - mainClassName = "helloworld.Application" micronaut { version.set(libs.versions.micronaut.platform.get()) @@ -33,27 +34,26 @@ micronaut { } dependencies { - kapt "io.micronaut.validation:micronaut-validation-processor" - implementation "io.micronaut.validation:micronaut-validation" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" - implementation "org.jetbrains.kotlin:kotlin-reflect" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3" - implementation "io.micronaut:micronaut-runtime" + kapt mnValidation.micronaut.validation.processor + implementation mnValidation.micronaut.validation + implementation libs.kotlin.stdlib.jdk8 + implementation libs.kotlin.reflect + implementation libs.kotlinx.coroutines.core + implementation mn.micronaut.runtime implementation projects.micronautGrpcServerRuntime - implementation "org.yaml:snakeyaml" - + implementation mn.snakeyaml // tag::dependencies[] - implementation "io.grpc:grpc-kotlin-stub:$grpcKotlinVersion" - implementation "io.grpc:grpc-services" - compileOnly "io.grpc:grpc-stub" - compileOnly "javax.annotation:javax.annotation-api" + implementation libs.managed.grpc.kotlin.stub + implementation libs.managed.grpc.services + compileOnly libs.managed.grpc.stub + compileOnly libs.javax.annotation.api // end::dependencies[] - runtimeOnly "ch.qos.logback:logback-classic" - runtimeOnly "com.fasterxml.jackson.module:jackson-module-kotlin" + runtimeOnly mnLogging.logback.classic + runtimeOnly libs.jackson.module.kotlin - testCompileOnly "javax.annotation:javax.annotation-api" + testCompileOnly libs.javax.annotation.api } // tag::config[] @@ -69,9 +69,9 @@ sourceSets { } protobuf { - protoc { artifact = "com.google.protobuf:protoc:$protobufJavaVersion" } + protoc { artifact = "com.google.protobuf:protoc:$protobufVersion" } plugins { - grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } + grpc { artifact = "io.grpc:protoc-gen-grpc-java:$grpcVersion" } grpckt { artifact = "io.grpc:protoc-gen-grpc-kotlin:${grpcKotlinVersion}:jdk8@jar" } } generateProtoTasks {