Skip to content

Commit

Permalink
Move all modules to version catalog. Update lib versions. Added lost …
Browse files Browse the repository at this point in the history
…protobuf artifacts.

Fixed #786
  • Loading branch information
altro3 committed Nov 28, 2023
1 parent a468f86 commit 14a5429
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 89 deletions.
6 changes: 3 additions & 3 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ repositories {

dependencies {
implementation libs.gradle.micronaut
implementation (libs.kotlin.gradle.plugin)
implementation (libs.kotlin.gradle.allopen)
}
implementation libs.kotlin.gradle.plugin
implementation libs.kotlin.gradle.allopen
}
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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

Expand Down
74 changes: 42 additions & 32 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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' }
Expand All @@ -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' }

Expand All @@ -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' }

Expand Down
40 changes: 24 additions & 16 deletions test-suite-groovy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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) {
Expand All @@ -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" }
}
Expand Down
31 changes: 19 additions & 12 deletions test-suite-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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[]
Expand All @@ -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" }
}
Expand Down
8 changes: 4 additions & 4 deletions test-suite-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

<properties>
<packaging>jar</packaging>
<micronaut.version>4.0.0</micronaut.version>
<grpc.version>1.55.1</grpc.version>
<protoc.version>3.25.0</protoc.version>
<micronaut.version>4.1.11</micronaut.version>
<grpc.version>1.59.1</grpc.version>
<protoc.version>3.25.1</protoc.version>
<guava.version>32.1.3-jre</guava.version>
<jdk.version>17</jdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -113,7 +113,7 @@
<plugin>
<groupId>io.micronaut.build</groupId>
<artifactId>micronaut-maven-plugin</artifactId>
<version>3.5.4</version>
<version>4.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
38 changes: 19 additions & 19 deletions test-suite-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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[]
Expand All @@ -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 {
Expand Down

0 comments on commit 14a5429

Please sign in to comment.