Skip to content

Commit

Permalink
Get more versions from version catalogs.
Browse files Browse the repository at this point in the history
Corrections in gradle scripts
Update libs
  • Loading branch information
altro3 committed Apr 19, 2024
1 parent 6ab5c00 commit b2557f0
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 67 deletions.
12 changes: 12 additions & 0 deletions build-logic/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
plugins {
id 'groovy-gradle-plugin'
}

repositories {
gradlePluginPortal()
mavenCentral()
}

dependencies {
implementation(libs.micronaut.gradle.plugin)
}
5 changes: 3 additions & 2 deletions buildSrc/settings.gradle → build-logic/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
rootProject.name = 'grpc-parent'
rootProject.name = 'build-logic'

dependencyResolutionManagement {
versionCatalogs {
libs {
from(files("../gradle/libs.versions.toml"))
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins {
id 'io.micronaut.build.internal.grpc-base'
id 'io.micronaut.minimal.application'
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id "io.micronaut.build.internal.grpc-base"
id 'org.graalvm.buildtools.native'
id "io.micronaut.application"
}

tasks.named("test") {
Expand Down
14 changes: 0 additions & 14 deletions buildSrc/build.gradle

This file was deleted.

60 changes: 24 additions & 36 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
managed-grpc = '1.62.2'
managed-grpc = '1.63.0'
managed-protobuf = '3.25.3'
managed-protobuf-gradle = '0.9.4'
managed-grpc-kotlin = '1.4.1'
Expand All @@ -9,37 +9,23 @@ jaeger-core = '1.8.1'
opentracing-grpc = '0.2.3'
opentracing-mock = '0.33.0'
graal-svm = '24.0.0'
groovy = '4.0.15'
javax-annotation-api = '1.3.2'
kotlin = '1.9.23'
spock = '2.3-groovy-4.0'

micronaut = '4.4.1'
micronaut-platform = '4.3.7'
micronaut-docs = '2.0.0'
micronaut-gradle-plugin = '4.3.6'
micronaut-discovery-client = '4.3.0'
micronaut-reactor = '3.3.0'
micronaut-tracing = '6.4.1'
micronaut-tracing = '6.5.0'
micronaut-tracing-legacy = '3.2.7'
micronaut-validation = '4.4.4'
micronaut-validation = '4.5.0'
micronaut-kotlin = '4.3.0'
micronaut-logging = '1.2.3'
micronaut-test = '4.2.1'
micronaut-logging = '1.3.0'
micronaut-test = '4.3.0'

[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
managed-grpc-core = { module = 'io.grpc:grpc-core', version.ref = 'managed-grpc' }
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 @@ -54,34 +40,36 @@ managed-protobuf-kotlin-lite = { module = 'com.google.protobuf:protobuf-kotlin-l
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' }

## BOMs
boms-protobuf = { module = 'com.google.protobuf:protobuf-bom', version.ref = 'managed-protobuf' }
boms-grpc = { module = 'io.grpc:grpc-bom', version.ref = 'managed-grpc' }

# Micronaut
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' }
micronaut-gradle-plugin = { module = 'io.micronaut.gradle:micronaut-gradle-plugin', version.ref = 'micronaut-gradle-plugin' }

# Other
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' }
groovy = {module = 'org.apache.groovy:groovy' }

jaeger-core = { module = 'io.jaegertracing:jaeger-core', version.ref = 'jaeger-core' }

netty-tcnative = { module = 'io.netty:netty-tcnative' }
netty-tcnative-boringssl-static = { module = 'io.netty:netty-tcnative-boringssl-static' }

opentracing-grpc = { module = 'io.opentracing.contrib:opentracing-grpc', version.ref = 'opentracing-grpc' }
opentracing-mock = { module = 'io.opentracing:opentracing-mock', version.ref = 'opentracing-mock' }

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' }

## plugins
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' }

[plugins]
protobuf = { id = 'com.google.protobuf', version.ref = 'managed-protobuf-gradle' }
5 changes: 3 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ pluginManagement {
gradlePluginPortal()
mavenCentral()
}
includeBuild "build-logic"
}

plugins {
id 'io.micronaut.build.shared.settings' version '6.7.0'
}

enableFeaturePreview 'TYPESAFE_PROJECT_ACCESSORS'

rootProject.name = 'grpc-parent'

include 'grpc-bom'
Expand All @@ -25,8 +28,6 @@ include 'test-suite-kotlin'
include 'grpc-health'
include 'grpc-opentracing'

enableFeaturePreview 'TYPESAFE_PROJECT_ACCESSORS'

micronautBuild {
useStandardizedProjectNames = true
importMicronautCatalog()
Expand Down
5 changes: 2 additions & 3 deletions test-suite-groovy/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
plugins {
id "groovy"
alias(libs.plugins.protobuf)
id "io.micronaut.minimal.application"
id "io.micronaut.build.internal.grpc-base"
id "io.micronaut.build.internal.grpc-minimal-test"
}

// tag::variables[]
Expand Down Expand Up @@ -42,7 +41,7 @@ dependencies {

testCompileOnly libs.javax.annotation.api

testImplementation libs.groovy
testImplementation mn.groovy

testRuntimeOnly mnLogging.logback.classic
}
Expand Down
3 changes: 2 additions & 1 deletion test-suite-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
// tag::plugin[]
alias(libs.plugins.protobuf)
// end::plugin[]
id "io.micronaut.application"
id "io.micronaut.build.internal.grpc-tests"
}

Expand Down Expand Up @@ -45,6 +44,8 @@ dependencies {
testAnnotationProcessor mnValidation.micronaut.validation.processor

testCompileOnly libs.javax.annotation.api

testRuntimeOnly mnLogging.logback.classic
}

// tag::config[]
Expand Down
20 changes: 11 additions & 9 deletions test-suite-kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
plugins {
id "org.jetbrains.kotlin.jvm"
id "org.jetbrains.kotlin.kapt"
id "org.jetbrains.kotlin.plugin.allopen"
id "io.micronaut.application"
alias(mn.plugins.kotlin.jvm)
alias(mn.plugins.kotlin.kapt)
alias(mn.plugins.kotlin.allopen)
alias(libs.plugins.protobuf)
id "io.micronaut.build.internal.grpc-tests"
id "io.micronaut.build.internal.grpc-minimal-test"
}

kotlin {
Expand Down Expand Up @@ -36,9 +35,9 @@ micronaut {
dependencies {
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.kotlin.stdlib.jdk8
implementation mn.kotlin.reflect
implementation mn.kotlinx.coroutines.core
implementation mn.micronaut.runtime
implementation projects.micronautGrpcServerRuntime
implementation mn.snakeyaml
Expand All @@ -51,9 +50,12 @@ dependencies {
// end::dependencies[]

runtimeOnly mnLogging.logback.classic
runtimeOnly libs.jackson.module.kotlin
runtimeOnly mn.jackson.module.kotlin

testCompileOnly libs.javax.annotation.api

testRuntimeOnly mnLogging.logback.classic
testRuntimeOnly mn.jackson.module.kotlin
}

// tag::config[]
Expand Down

0 comments on commit b2557f0

Please sign in to comment.