Skip to content

Commit

Permalink
Bringing build scripts to a single view. (#753)
Browse files Browse the repository at this point in the history
Update libs.
Fix test for windows.
  • Loading branch information
altro3 authored Feb 5, 2024
1 parent e63074b commit 7413012
Show file tree
Hide file tree
Showing 16 changed files with 105 additions and 62 deletions.
4 changes: 4 additions & 0 deletions doc-examples/example-groovy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ micronaut {
dependencies {
compileOnly(projects.micronautSerdeProcessor)
compileOnly(mn.micronaut.inject.groovy)

implementation(projects.micronautSerdeJackson)
implementation(mn.micronaut.http.client)

runtimeOnly(mnLogging.logback.classic)

testCompileOnly(mn.micronaut.inject.groovy)

testImplementation(mnTest.micronaut.test.spock)
}

application {
mainClass.set("example.Application")
}
7 changes: 6 additions & 1 deletion doc-examples/example-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ micronaut {
runtime("netty")
testRuntime("junit5")
}

dependencies {
annotationProcessor(projects.micronautSerdeProcessor)

implementation(projects.micronautSerdeJackson)
implementation(mn.micronaut.http.client)
implementation(libs.oci.aidocument)

runtimeOnly(mnLogging.logback.classic)

testImplementation(mnTest.micronaut.test.junit5)
implementation(libs.oci.aidocument)
}

application {
mainClass.set("example.Application")
}
Expand Down
8 changes: 6 additions & 2 deletions doc-examples/example-jsonb-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ micronaut {
runtime("netty")
testRuntime("junit5")
}

dependencies {
annotationProcessor(projects.micronautSerdeProcessor)

implementation(projects.micronautSerdeJsonp)
implementation(mn.micronaut.http.client)
implementation(libs.managed.jakarta.json.bindApi)

runtimeOnly(mnLogging.logback.classic)
testImplementation(mnTest.micronaut.test.junit5)

implementation(libs.managed.jakarta.json.bindApi)
testImplementation(mnTest.micronaut.test.junit5)
}

application {
mainClass.set("example.Application")
}
64 changes: 31 additions & 33 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,45 +1,43 @@
[versions]
micronaut = "4.3.1"
micronaut-platform = "4.0.0"
micronaut-docs = "2.0.0"
micronaut-gradle-plugin = "4.2.1"
micronaut-test = "4.2.0"
micronaut-discovery = "4.2.0"
micronaut-logging = "1.2.2"

groovy = "4.0.11"
spock = "2.3-groovy-4.0"
kotlin = '1.9.22'
ksp = '1.9.22-1.0.17'
graal-svm = "23.1.2"
aws-lambda-events = '3.11.4'
oci-sdk = '3.32.1'
aws-lambda-serialization = '1.1.5'
microstream-storage-restclient = '08.01.01-MS-GA'

managed-bson = "4.11.1"
managed-jakarta-json-api = "2.1.3"
managed-jakarta-json-bindApi = "3.0.0"
managed-eclipse-parsson = "1.1.5"

micronaut-reactor = "3.2.1"
micronaut-validation = "4.3.0"

kotlin = "1.9.22"
ksp = "1.9.22-1.0.17"
graal-svm = "23.1.2"
aws-lambda-events = "3.11.4"
oci-sdk = "3.32.1"
aws-lambda-serialization = "1.1.5"
microstream-storage-restclient = "08.01.01-MS-GA"
oracle-jdbc-driver = "23.3.0.23.09"
jetbrains-annotations = "24.1.0"
jmh = "1.37"
groovy = "4.0.18"

micronaut = "4.3.3"
micronaut-platform = "4.2.4"
micronaut-docs = "2.0.0"
micronaut-test = "4.2.0"
micronaut-discovery = "4.2.0"
micronaut-logging = "1.2.2"
micronaut-reactor = "3.2.1"
micronaut-validation = "4.4.0"
micronaut-gradle-plugin = "4.3.0"

[libraries]
# Core
micronaut-core = { module = 'io.micronaut:micronaut-core-bom', version.ref = 'micronaut' }
micronaut-validation = { module = 'io.micronaut.validation:micronaut-validation-bom', version.ref = 'micronaut-validation' }
# Micronaut
micronaut-core = { module = "io.micronaut:micronaut-core-bom", version.ref = "micronaut" }
micronaut-platform = { module = "io.micronaut.platform:micronaut-platform", version.ref = "micronaut-platform"}
micronaut-test = { module = "io.micronaut.test:micronaut-test-bom", version.ref = "micronaut-test" }
micronaut-logging = { module = "io.micronaut.logging:micronaut-logging-bom", version.ref = "micronaut-logging" }
micronaut-reactor = { module = "io.micronaut.reactor:micronaut-reactor-bom", version.ref = "micronaut-reactor" }
micronaut-validation = { module = "io.micronaut.validation:micronaut-validation-bom", version.ref = "micronaut-validation" }
micronaut-discovery = { module = "io.micronaut.discovery:micronaut-discovery-client", version.ref = "micronaut-discovery" }

managed-bson = { module = "org.mongodb:bson", version.ref = "managed-bson" }
managed-eclipse-parsson = { module = "org.eclipse.parsson:parsson", version.ref = "managed-eclipse-parsson" }
micronaut-discovery = { module = "io.micronaut.discovery:micronaut-discovery-client", version.ref = "micronaut-discovery" }
micronaut-reactor = { module = "io.micronaut.reactor:micronaut-reactor-bom", version.ref = "micronaut-reactor" }
micronaut-logging = { module = "io.micronaut.logging:micronaut-logging-bom", version.ref = "micronaut-logging" }

managed-jakarta-json-api = { module = "jakarta.json:jakarta.json-api", version.ref = "managed-jakarta-json-api" }
managed-jakarta-json-bindApi = { module = "jakarta.json.bind:jakarta.json.bind-api", version.ref = "managed-jakarta-json-bindApi" }

Expand All @@ -49,8 +47,8 @@ aws-lambda-events = { module = "com.amazonaws:aws-lambda-java-events", version.r
aws-lambda-serialization = { module = "com.amazonaws:aws-lambda-java-serialization", version.ref = "aws-lambda-serialization" }
graal-svm = { module = "org.graalvm.nativeimage:svm", version.ref = "graal-svm" }
microstream-storage-restclient = { module = "one.microstream:microstream-storage-restclient", version.ref = "microstream-storage-restclient" }
junit-jupiter-engine = { module = 'org.junit.jupiter:junit-jupiter-engine' }
junit-jupiter-api = { module = 'org.junit.jupiter:junit-jupiter-api' }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine" }
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api" }
junit-platform-engine = { module = "org.junit.platform:junit-platform-suite-engine" }

jmh-core = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmh" }
Expand All @@ -61,6 +59,6 @@ oci-aidocument = { module = "com.oracle.oci.sdk:oci-java-sdk-aidocument", versio
#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' }
kotlin-gradle-ksp = { module = 'com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin', version.ref = 'ksp' }
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" }
kotlin-gradle-ksp = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" }
4 changes: 3 additions & 1 deletion serde-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ dependencies {
annotationProcessor(mn.micronaut.inject.java)

api(mn.micronaut.context)
api(mn.micronaut.json.core)
api(mn.micronaut.json.core)

testImplementation(mnTest.micronaut.test.spock)
}

tasks {
Expand Down
6 changes: 5 additions & 1 deletion serde-bson/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ dependencies {
api(libs.managed.bson)
api(mn.micronaut.context)
api(projects.micronautSerdeApi)

implementation(projects.micronautSerdeSupport)

testAnnotationProcessor(mn.micronaut.inject.java)
testAnnotationProcessor(projects.micronautSerdeProcessor)

testCompileOnly(mn.micronaut.inject.java)

testImplementation(projects.micronautSerdeProcessor)
testImplementation(projects.micronautSerdeTck)
testImplementation(mn.micronaut.jackson.databind)
testImplementation(mn.micronaut.inject.java.test)
testCompileOnly(mn.micronaut.inject.groovy)
testImplementation(mnTest.micronaut.test.spock)
testImplementation(mn.micronaut.http.server.netty)
testImplementation(mn.micronaut.http.client)
Expand Down
6 changes: 5 additions & 1 deletion serde-jackson/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ dependencies {
api(mn.jackson.annotations)
api(mn.micronaut.context)
api(projects.micronautSerdeApi)

implementation(projects.micronautSerdeSupport)

testAnnotationProcessor(mn.micronaut.inject.java)
testAnnotationProcessor(projects.micronautSerdeProcessor)

testCompileOnly(mn.micronaut.inject.groovy)

testImplementation(projects.micronautSerdeProcessor)
testImplementation(projects.micronautSerdeTck)
testImplementation(mn.micronaut.inject.java.test)
testCompileOnly(mn.micronaut.inject.groovy)
testImplementation(mnTest.micronaut.test.spock)
testImplementation(mn.jackson.databind)
testImplementation(mn.micronaut.management)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class JacksonConfigurationSpec extends JsonCompileSpec {

when:
def result = context.getBean(JsonMapper).writeValueAsString(new MyUser(firstName: "Joe", lastName: "Doe", age: 33))
// Fix for windows
.replaceAll("\r\n", "\n")

then:
result == """{
Expand Down
17 changes: 10 additions & 7 deletions serde-jsonp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ dependencies {
annotationProcessor(mn.micronaut.inject.java)
annotationProcessor(projects.micronautSerdeProcessor)

compileOnly(libs.graal.svm)
compileOnly(mn.micronaut.jackson.databind)

api(libs.managed.jakarta.json.api)
api(mn.micronaut.context)
api(projects.micronautSerdeApi)

implementation(projects.micronautSerdeSupport)
implementation(libs.managed.eclipse.parsson)
compileOnly(libs.graal.svm)
compileOnly(mn.micronaut.jackson.databind)

testAnnotationProcessor(mn.micronaut.inject.java)
testAnnotationProcessor(projects.micronautSerdeProcessor)

testCompileOnly(mn.micronaut.inject.groovy)

testImplementation(mn.jackson.annotations)
testImplementation(libs.managed.jakarta.json.bindApi)
testImplementation(projects.micronautSerdeProcessor)
Expand All @@ -29,13 +34,11 @@ dependencies {
testImplementation(mnTest.micronaut.test.junit5)
testImplementation(mn.micronaut.http.server.netty)
testImplementation(mn.micronaut.http.client)
testRuntimeOnly(
"org.junit.jupiter:junit-jupiter-engine"
)
testCompileOnly(mn.micronaut.inject.groovy)
testImplementation(mnTest.micronaut.test.spock)
testImplementation(mnReactor.micronaut.reactor)
testRuntimeOnly("org.yaml:snakeyaml")

testRuntimeOnly(mn.snakeyaml)
testRuntimeOnly(libs.junit.jupiter.engine)
}

tasks {
Expand Down
15 changes: 9 additions & 6 deletions serde-oracle-jdbc-json/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,31 @@ dependencies {
annotationProcessor(mn.micronaut.inject.java)
annotationProcessor(projects.micronautSerdeProcessor)

compileOnly(libs.graal.svm)
compileOnly(mn.micronaut.jackson.databind)

api(mn.micronaut.context)
api(projects.micronautSerdeApi)

implementation(projects.micronautSerdeSupport)
implementation(libs.oracle.jdbc.driver)
compileOnly(libs.graal.svm)
compileOnly(mn.micronaut.jackson.databind)

testAnnotationProcessor(mn.micronaut.inject.java)
testAnnotationProcessor(projects.micronautSerdeProcessor)

testCompileOnly(mn.micronaut.inject.groovy)

testImplementation(mn.jackson.annotations)
testImplementation(projects.micronautSerdeProcessor)
testImplementation(projects.micronautSerdeTck)
testImplementation(mn.micronaut.inject.java.test)
testImplementation(mnTest.micronaut.test.junit5)
testImplementation(mn.micronaut.http.server.netty)
testImplementation(mn.micronaut.http.client)
testRuntimeOnly(
"org.junit.jupiter:junit-jupiter-engine"
)
testCompileOnly(mn.micronaut.inject.groovy)
testImplementation(mnTest.micronaut.test.spock)
testImplementation(mnReactor.micronaut.reactor)

testRuntimeOnly(libs.junit.jupiter.engine)
}

tasks {
Expand Down
8 changes: 6 additions & 2 deletions serde-processor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ plugins {
}

dependencies {
implementation(projects.micronautSerdeApi)
compileOnly(mn.micronaut.core.processor)

implementation(projects.micronautSerdeApi)

testAnnotationProcessor(mn.micronaut.inject.java)
testImplementation(mn.micronaut.inject.java.test)

testCompileOnly(mn.micronaut.inject.groovy)

testImplementation(mn.micronaut.inject.java.test)
testImplementation(mnTest.micronaut.test.spock)
}
2 changes: 2 additions & 0 deletions serde-support/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ dependencies {
annotationProcessor(projects.micronautSerdeProcessor)

compileOnly(mn.micronaut.management)

api(projects.micronautSerdeApi)

testAnnotationProcessor(mn.micronaut.inject.java)
testAnnotationProcessor(projects.micronautSerdeProcessor)

testImplementation(mn.micronaut.inject.java.test)
testImplementation(mnTest.micronaut.test.spock)
testImplementation(mn.micronaut.http.server.netty)
Expand Down
3 changes: 2 additions & 1 deletion serde-tck-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ plugins {
}

dependencies {
annotationProcessor(projects.micronautSerdeProcessor)

api(mnTest.micronaut.test.junit5)
api(mn.micronaut.json.core)
api(mn.jackson.annotations)
annotationProcessor(projects.micronautSerdeProcessor)
api(projects.micronautSerdeApi)
}

Expand Down
7 changes: 5 additions & 2 deletions serde-tck/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ plugins {
dependencies {
annotationProcessor(mn.micronaut.inject.java)
annotationProcessor(projects.micronautSerdeProcessor)

compileOnly(mn.micronaut.inject.groovy)

api(libs.jetbrains.annotations)

implementation(projects.micronautSerdeApi)
implementation(projects.micronautSerdeSupport)
implementation(projects.micronautSerdeProcessor)
implementation(mn.micronaut.inject.java.test)
compileOnly(mn.micronaut.inject.groovy)
implementation(mnTest.micronaut.test.spock)
api(libs.jetbrains.annotations)
}

tasks.named("spotlessGroovyCheck").configure {
Expand Down
13 changes: 8 additions & 5 deletions test-suite-http-server-tck-netty/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ repositories {
}

dependencies {
testAnnotationProcessor(platform(mn.micronaut.core.bom))
testAnnotationProcessor(mn.micronaut.inject.java)
implementation(mn.micronaut.http.server.tck) {
exclude("io.micronaut", "micronaut-jackson-databind")
}
implementation(projects.micronautSerdeJackson)

runtimeOnly(mnLogging.logback.classic)

testAnnotationProcessor(platform(mn.micronaut.core.bom))
testAnnotationProcessor(mn.micronaut.inject.java)
testAnnotationProcessor(mnValidation.micronaut.validation.processor)

testImplementation(mn.micronaut.http.server.netty)
testImplementation(mn.micronaut.http.client)
testImplementation(libs.junit.platform.engine)
testImplementation(libs.junit.jupiter.engine)
runtimeOnly(mnLogging.logback.classic)
testAnnotationProcessor(mnValidation.micronaut.validation.processor)
testImplementation(mnValidation.micronaut.validation)
}
tasks.withType<Test> {
useJUnitPlatform()
}
}
1 change: 1 addition & 0 deletions test-suite-tck-jackson-databind/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {

dependencies {
testAnnotationProcessor(mn.micronaut.inject.java)

testImplementation(mn.micronaut.jackson.databind)
testImplementation(projects.micronautSerdeJacksonTck)
}

0 comments on commit 7413012

Please sign in to comment.