From 7d7bd50628b8707a7ab454779a637d26143a7901 Mon Sep 17 00:00:00 2001 From: Sergio del Amo Date: Fri, 21 Jul 2023 12:40:46 +0200 Subject: [PATCH] Hibernate-validator managed version and api Gradle configuration (#333) * Use Kotlin DSL * make hibernate-validator a managed version * hibernate validator an api dependency --- gradle/libs.versions.toml | 5 +++-- hibernate-validator/build.gradle | 20 -------------------- hibernate-validator/build.gradle.kts | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 22 deletions(-) delete mode 100644 hibernate-validator/build.gradle create mode 100644 hibernate-validator/build.gradle.kts diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3d5d53bb..4d32b96b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,13 +1,14 @@ [versions] micronaut = "4.0.0" micronaut-docs = "2.0.0" +managed-hibernate-validator = '8.0.1.Final' micronaut-serde = "2.0.1" micronaut-test = "4.0.0" micronaut-validation = "4.0.1" groovy = "4.0.13" -hibernate-validator = '8.0.1.Final' + [libraries] # Core @@ -16,4 +17,4 @@ micronaut-core = { module = 'io.micronaut:micronaut-core-bom', version.ref = 'mi # BOMs micronaut-serde = { module = "io.micronaut.serde:micronaut-serde-bom", version.ref = "micronaut-serde" } micronaut-validation = { module = "io.micronaut.validation:micronaut-validation-bom", version.ref = "micronaut-validation" } -hibernate-validator = { module = 'org.hibernate:hibernate-validator', version.ref = 'hibernate-validator' } +hibernate-validator = { module = 'org.hibernate:hibernate-validator', version.ref = 'managed-hibernate-validator' } diff --git a/hibernate-validator/build.gradle b/hibernate-validator/build.gradle deleted file mode 100644 index ef8fb905..00000000 --- a/hibernate-validator/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -plugins { - id 'io.micronaut.build.internal.hibernate-validator-module' -} - -dependencies { - annotationProcessor mn.micronaut.graal - annotationProcessor mn.micronaut.inject.java - compileOnly mn.micronaut.router - implementation libs.hibernate.validator - implementation mn.micronaut.inject - implementation mnValidation.micronaut.validation - - testAnnotationProcessor mnValidation.micronaut.validation.processor - testCompileOnly mnValidation.micronaut.validation.processor - testAnnotationProcessor mn.micronaut.inject.java - testCompileOnly mn.micronaut.inject.groovy - testImplementation mn.micronaut.http.server.netty - testRuntimeOnly mn.snakeyaml - testImplementation(mnSerde.micronaut.serde.jackson) -} diff --git a/hibernate-validator/build.gradle.kts b/hibernate-validator/build.gradle.kts new file mode 100644 index 00000000..f8e1cba6 --- /dev/null +++ b/hibernate-validator/build.gradle.kts @@ -0,0 +1,20 @@ +plugins { + id("io.micronaut.build.internal.hibernate-validator-module") +} + +dependencies { + annotationProcessor(mn.micronaut.graal) + annotationProcessor(mn.micronaut.inject.java) + compileOnly(mn.micronaut.router) + api(libs.hibernate.validator) + implementation(mn.micronaut.inject) + implementation(mnValidation.micronaut.validation) + + testAnnotationProcessor(mnValidation.micronaut.validation.processor) + testCompileOnly(mnValidation.micronaut.validation.processor) + testAnnotationProcessor(mn.micronaut.inject.java) + testCompileOnly(mn.micronaut.inject.groovy) + testImplementation(mn.micronaut.http.server.netty) + testRuntimeOnly(mn.snakeyaml) + testImplementation(mnSerde.micronaut.serde.jackson) +}