diff --git a/build.gradle b/build.gradle index 983ccdf3..a63efb20 100644 --- a/build.gradle +++ b/build.gradle @@ -2,8 +2,3 @@ plugins { id 'io.micronaut.build.internal.docs' id 'io.micronaut.build.internal.quality-reporting' } - -repositories { - mavenCentral() - maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" } -} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9f128ee3..551aefbb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,13 +1,20 @@ [versions] micronaut = "4.0.0-SNAPSHOT" +micronaut-test = "4.0.0-SNAPSHOT" micronaut-docs = "2.0.0" +micronaut-serialization = "2.0.0-SNAPSHOT" + groovy = "4.0.6" +spock = "2.3-groovy-4.0" + glassfish-el = '2.2.1-b05' glassfish-javax-el = '3.0.1-b12' glassfish-jakarta-el = '3.0.4' hibernate-validator = '6.2.5.Final' [libraries] +micronaut-serde = { module = "io.micronaut.serde:micronaut-serde-bom", version.ref = "micronaut-serialization" } + glassfish-el = { module = 'org.glassfish.web:el-impl', version.ref = 'glassfish-el' } glassfish-javax-el = { module = 'org.glassfish:javax.el', version.ref = 'glassfish-javax-el' } glassfish-jakarta-el = { module = 'org.glassfish:jakarta.el', version.ref = 'glassfish-jakarta-el' } diff --git a/hibernate-validator-bom/build.gradle.kts b/hibernate-validator-bom/build.gradle.kts new file mode 100644 index 00000000..e3c487bb --- /dev/null +++ b/hibernate-validator-bom/build.gradle.kts @@ -0,0 +1,5 @@ +import org.gradle.internal.execution.caching.CachingState.enabled + +plugins { + id("io.micronaut.build.internal.bom") +} diff --git a/hibernate-validator/build.gradle b/hibernate-validator/build.gradle deleted file mode 100644 index ac52b00b..00000000 --- a/hibernate-validator/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -plugins { - id 'io.micronaut.build.internal.hibernate-validator-module' -} - -dependencies { - annotationProcessor mn.micronaut.graal - annotationProcessor mn.micronaut.inject.java - compileOnly libs.glassfish.el - compileOnly mn.micronaut.router - implementation libs.hibernate.validator - implementation mn.micronaut.inject - implementation mn.micronaut.validation - runtimeOnly libs.glassfish.jakarta.el - - testAnnotationProcessor mn.micronaut.inject.java - testCompileOnly mn.micronaut.inject.groovy - testImplementation mn.micronaut.http.server.netty - testRuntimeOnly mn.snakeyaml - testImplementation(mn.micronaut.serde.jackson) -} - -micronautBuild { - resolutionStrategy { - force (libs.hibernate.validator) - } - binaryCompatibility { - // Last version 3.0.0 is way to old - enabled.set(false) - } -} diff --git a/hibernate-validator/build.gradle.kts b/hibernate-validator/build.gradle.kts new file mode 100644 index 00000000..16359bc3 --- /dev/null +++ b/hibernate-validator/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + id("io.micronaut.build.internal.hibernate-validator-module") +} +dependencies { + annotationProcessor(mn.micronaut.graal) + compileOnly(libs.glassfish.el) + compileOnly(mn.micronaut.router) + implementation(libs.hibernate.validator) + implementation(mn.micronaut.validation) + runtimeOnly(libs.glassfish.jakarta.el) + testImplementation(mn.micronaut.http.server.netty) + testImplementation(mnSerde.micronaut.serde.jackson) +} diff --git a/hibernate-validator/src/test/groovy/io/micronaut/configuration/hibernate/validator/ValidatedBeanSpec.groovy b/hibernate-validator/src/test/groovy/io/micronaut/configuration/hibernate/validator/ValidatedBeanSpec.groovy index 1f24b046..3c17c4e8 100644 --- a/hibernate-validator/src/test/groovy/io/micronaut/configuration/hibernate/validator/ValidatedBeanSpec.groovy +++ b/hibernate-validator/src/test/groovy/io/micronaut/configuration/hibernate/validator/ValidatedBeanSpec.groovy @@ -20,7 +20,6 @@ import io.micronaut.context.DefaultApplicationContext import io.micronaut.context.annotation.Value import io.micronaut.context.exceptions.BeanInstantiationException import org.hibernate.validator.constraints.URL -import spock.lang.PendingFeature import spock.lang.Specification import spock.util.environment.RestoreSystemProperties @@ -31,7 +30,6 @@ import jakarta.inject.Singleton */ class ValidatedBeanSpec extends Specification { - @PendingFeature void "test validated bean invalid bean"() { given: System.setProperty("a.url", "test") @@ -55,7 +53,6 @@ List of constraint violations:[ ''') } - @PendingFeature void "test validated bean invalid bean custom validator"() { given: @@ -80,7 +77,6 @@ List of constraint violations:[ ''') } - @PendingFeature @RestoreSystemProperties void "test validated bean invalid bean custom validator that isnt a bean"() { diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index bbfb26d3..00000000 --- a/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -pluginManagement { - repositories { - gradlePluginPortal() - mavenCentral() - } -} - -plugins { - id 'io.micronaut.build.shared.settings' version '6.1.0' -} - -rootProject.name = 'hibernate-validator-parent' - -include 'hibernate-validator' - -dependencyResolutionManagement { - repositories { - mavenCentral() - maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" } - } -} - -micronautBuild { - importMicronautCatalog() -} diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..0326c52e --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,22 @@ +pluginManagement { + repositories { + gradlePluginPortal() + mavenCentral() + } +} + +plugins { + id("io.micronaut.build.shared.settings") version "6.1.0" +} + +rootProject.name = "hibernate-validator-parent" + +include("hibernate-validator-bom") +include("hibernate-validator") + +configure { + // Required for 4.0.0-SNAPSHOT, can be removed after + addSnapshotRepository() + importMicronautCatalog() + importMicronautCatalog("micronaut-serde") +}