diff --git a/buildSrc/src/main/groovy/io.micronaut.build.internal.spring-base.gradle b/buildSrc/src/main/groovy/io.micronaut.build.internal.spring-base.gradle index fb8257b7a..5908ced77 100644 --- a/buildSrc/src/main/groovy/io.micronaut.build.internal.spring-base.gradle +++ b/buildSrc/src/main/groovy/io.micronaut.build.internal.spring-base.gradle @@ -2,9 +2,3 @@ repositories { mavenCentral() } -configurations.all { - resolutionStrategy.dependencySubstitution { - substitute(module("org.codehaus.groovy:groovy")) - .using(module("org.apache.groovy:groovy:4.0.15")) - } -} diff --git a/gradle.properties b/gradle.properties index 0d98403ef..cd165bd79 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,6 @@ projectUrl=https://micronaut.io githubSlug=micronaut-projects/micronaut-spring developers=Graeme Rocher - springbootapi=https://docs.spring.io/spring-boot/docs/current/api springdataapi=https://docs.spring.io/spring-data/data-commons/docs/current/api/ micronautcache=https://micronaut-projects.github.io/micronaut-cache/latest/api/io/micronaut/cache/ diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0282016f9..f313960dc 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,7 +7,7 @@ servlet-api = "6.0.0" micronaut = "4.1.9" micronaut-docs = "2.0.0" micronaut-test = "4.0.0" -groovy = "4.0.12" +groovy = "4.0.15" spock = "2.3-groovy-4.0" h2 = '2.2.224' jakarta-annotation = '2.1.1' diff --git a/settings.gradle b/settings.gradle index 42c5f6202..1523089ac 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,7 +6,7 @@ pluginManagement { } plugins { - id 'io.micronaut.build.shared.settings' version '6.5.7' + id 'io.micronaut.build.shared.settings' version '6.6.0' } rootProject.name = 'spring-parent' diff --git a/spring-context/build.gradle b/spring-context/build.gradle index eb9f93308..318388d5e 100644 --- a/spring-context/build.gradle +++ b/spring-context/build.gradle @@ -1,5 +1,3 @@ -import org.gradle.internal.jvm.Jvm - plugins { id 'io.micronaut.build.internal.spring-module' } @@ -22,8 +20,4 @@ dependencies { because 'not defined in toml because it hit a bug with version catalogs' } testImplementation libs.h2database - - if (!JavaVersion.current().isJava9Compatible()) { - testImplementation files(Jvm.current().toolsJar) - } } diff --git a/spring-context/src/test/groovy/io/micronaut/spring/annotation/context/QualifierSpec.groovy b/spring-context/src/test/groovy/io/micronaut/spring/annotation/context/QualifierSpec.groovy index cb21ab503..2db2c65e5 100644 --- a/spring-context/src/test/groovy/io/micronaut/spring/annotation/context/QualifierSpec.groovy +++ b/spring-context/src/test/groovy/io/micronaut/spring/annotation/context/QualifierSpec.groovy @@ -16,12 +16,12 @@ package io.micronaut.spring.annotation.context import io.micronaut.context.annotation.EachProperty +import io.micronaut.context.annotation.Requires import io.micronaut.scheduling.executor.ExecutorConfiguration import io.micronaut.spring.context.MicronautApplicationContext import jakarta.inject.Named import jakarta.inject.Singleton import org.springframework.beans.factory.annotation.Autowired -import org.springframework.beans.factory.annotation.Qualifier import org.springframework.context.ApplicationContext import spock.lang.Shared import spock.lang.Specification @@ -30,6 +30,7 @@ class QualifierSpec extends Specification { @Shared Map config = [ + 'spec.name':'QualifierSpec', 'foo.bar.one.name':'one', 'foo.bar.two.name':'two', ] @@ -105,6 +106,7 @@ class QualifierSpec extends Specification { ctx.close() } + @Requires(property = 'spec.name', value = 'QualifierSpec') @Singleton static class FooService { @Autowired @@ -116,18 +118,21 @@ class QualifierSpec extends Specification { } + @Requires(property = 'spec.name', value = 'QualifierSpec') @Singleton @Named("bar1") static class Bar1 implements Foo { } + @Requires(property = 'spec.name', value = 'QualifierSpec') @Singleton @Named("bar2") static class Bar2 implements Foo { } + @Requires(property = 'spec.name', value = 'QualifierSpec') @EachProperty('foo.bar') static class FooBarProperties { String name