From 5b26cc80ba168420af3e210f621627ef61c7a7a0 Mon Sep 17 00:00:00 2001 From: musketyr Date: Thu, 7 Dec 2023 16:05:18 +0100 Subject: [PATCH] upgraded Micronaut and Gradle --- build.gradle | 23 +++++++------------ examples/local-server/local-server.gradle | 13 +++-------- examples/planets/planets.gradle | 12 ++++++---- examples/spacecrafts/spacecrafts.gradle | 12 ++++++---- gradle.properties | 7 ++++-- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle | 28 +++++++++-------------- 7 files changed, 44 insertions(+), 53 deletions(-) diff --git a/build.gradle b/build.gradle index 1215e744d..9245bdad8 100644 --- a/build.gradle +++ b/build.gradle @@ -152,18 +152,20 @@ subprojects { Project subproject -> apply plugin: 'groovy' apply plugin: 'java-library' + micronaut { + importMicronautPlatorm = true + testRuntime 'spock' + } + dependencies { - annotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion") api platform(project(':micronaut-aws-sdk-dependencies')) - annotationProcessor 'io.micronaut:micronaut-inject-java' - // Groovy if (subproject.name.startsWith('micronaut-amazon-awssdk')) { - compileOnly "org.codehaus.groovy:groovy:$groovyVersion" - testImplementation "org.codehaus.groovy:groovy:$groovyVersion" + compileOnly "org.apache.groovy:groovy:$groovyVersion" + testImplementation "org.apace.groovy:groovy:$groovyVersion" } else { - implementation "org.codehaus.groovy:groovy:$groovyVersion" + implementation "org.apache.groovy:groovy:$groovyVersion" implementation micronautMigratedDependency('micronaut-runtime-groovy') compileOnly 'io.micronaut:micronaut-inject-groovy' } @@ -172,22 +174,13 @@ subprojects { Project subproject -> implementation 'io.micronaut:micronaut-runtime' - compileOnly 'io.micronaut:micronaut-inject-java' - - testAnnotationProcessor platform("io.micronaut:micronaut-bom:$micronautVersion") testAnnotationProcessor 'io.micronaut:micronaut-inject-java' - testImplementation platform("io.micronaut:micronaut-bom:$micronautVersion") testImplementation 'io.micronaut:micronaut-inject-groovy' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.1' - testImplementation("org.spockframework:spock-core:$spockVersion") { - exclude group: 'org.codehaus.groovy', module: 'groovy-all' - } - testImplementation 'cglib:cglib-nodep:3.2.0' - testImplementation 'org.objenesis:objenesis:1.2' testCompileOnly 'com.agorapulse:remember:0.4.2' diff --git a/examples/local-server/local-server.gradle b/examples/local-server/local-server.gradle index 89889930c..522fff4c6 100644 --- a/examples/local-server/local-server.gradle +++ b/examples/local-server/local-server.gradle @@ -15,8 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -apply plugin: "application" -apply plugin: "com.github.johnrengelman.shadow" +plugins { + id 'io.micronaut.minimal.application' version "$micronautGradlePluginVersion" +} config { publishing { enabled = false } @@ -35,12 +36,4 @@ dependencies { } -shadowJar { - mergeServiceFiles() -} - -runShadow { - systemProperties 'micronaut.environments': 'dev' -} - mainClassName = "com.agorapulse.micronaut.http.examples.Application" diff --git a/examples/planets/planets.gradle b/examples/planets/planets.gradle index 7d59ad8f9..d027892ca 100644 --- a/examples/planets/planets.gradle +++ b/examples/planets/planets.gradle @@ -18,10 +18,6 @@ import com.amazonaws.services.lambda.model.Runtime import jp.classmethod.aws.gradle.lambda.AWSLambdaMigrateFunctionTask -config { - publishing { enabled = false } -} - buildscript { repositories { maven { @@ -33,9 +29,17 @@ buildscript { } } +plugins { + id 'io.micronaut.minimal.library' version "$micronautGradlePluginVersion" +} + apply from: '../gradle/lambda.gradle' apply plugin: 'jp.classmethod.aws.lambda' +config { + publishing { enabled = false } +} + dependencies { implementation project(':micronaut-aws-sdk-dynamodb') diff --git a/examples/spacecrafts/spacecrafts.gradle b/examples/spacecrafts/spacecrafts.gradle index 2dc02f902..205f87a16 100644 --- a/examples/spacecrafts/spacecrafts.gradle +++ b/examples/spacecrafts/spacecrafts.gradle @@ -18,10 +18,6 @@ import com.amazonaws.services.lambda.model.Runtime import jp.classmethod.aws.gradle.lambda.AWSLambdaMigrateFunctionTask -config { - publishing { enabled = false } -} - buildscript { repositories { maven { @@ -33,9 +29,17 @@ buildscript { } } +plugins { + id 'io.micronaut.minimal.library' version "$micronautGradlePluginVersion" +} + apply from: '../gradle/lambda.gradle' apply plugin: 'jp.classmethod.aws.lambda' +config { + publishing { enabled = false } +} + dependencies { implementation project(':micronaut-aws-sdk-dynamodb') diff --git a/gradle.properties b/gradle.properties index 30284ede3..1f275f12e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,14 +18,17 @@ slug=agorapulse/micronaut-aws-sdk group=com.agorapulse -micronautVersion = 1.3.7 +micronautVersion = 4.2.0 +micronautGradlePluginVersion = 4.2.0 gruVersion = 0.9.1 druVersion = 0.8.1 spockVersion = 2.0-groovy-2.5 awsSdkVersion = 1.12.299 awsSdk2Version = 2.18.40 testcontainersVersion = 1.17.3 -kordampVersion=0.45.0 +kordampVersion=0.51.0 +gitPublishPluginVersion=2.1.3 +nexusPluginVersion=1.0.0 closureSupportVersion=0.6.3 mockitoVersion=2.23.4 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1c0f4b6a8..055a9a6d6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Thu Apr 09 06:59:57 CEST 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle index 4ea3dab8c..322ad2481 100644 --- a/settings.gradle +++ b/settings.gradle @@ -20,13 +20,14 @@ pluginManagement { gradlePluginPortal() } plugins { - id 'org.kordamp.gradle.groovy-project' version kordampVersion - id 'org.kordamp.gradle.checkstyle' version kordampVersion - id 'org.kordamp.gradle.codenarc' version kordampVersion - id 'org.kordamp.gradle.guide' version kordampVersion - id 'org.kordamp.gradle.coveralls' version kordampVersion - id 'com.github.kt3k.coveralls' version '2.9.0' - id 'org.ajoberstar.git-publish' version '2.1.3' + id 'org.kordamp.gradle.settings' version kordampVersion + id 'org.kordamp.gradle.groovy-project' version kordampVersion + id 'org.kordamp.gradle.checkstyle' version kordampVersion + id 'org.kordamp.gradle.codenarc' version kordampVersion + id 'org.kordamp.gradle.guide' version kordampVersion + id 'org.kordamp.gradle.coveralls' version kordampVersion + id 'org.ajoberstar.git-publish' version gitPublishPluginVersion + id 'io.github.gradle-nexus.publish-plugin' version nexusPluginVersion } } @@ -38,20 +39,14 @@ buildscript { } } dependencies { - classpath "org.kordamp.gradle:settings-gradle-plugin:$kordampVersion" - // forces the version suitable for all currently used plugins - classpath 'org.eclipse.jgit:org.eclipse.jgit:5.6.0.201912101111-r', { - force = true - } - classpath 'org.ajoberstar.grgit:grgit-core:4.0.1' - classpath "io.github.gradle-nexus:publish-plugin:1.0.0" classpath "com.agorapulse.gradle:internal-maven-publish:$agorapulseGradlePluginsVersion" } } plugins { - id 'com.gradle.enterprise' version '3.6.1' + id 'org.kordamp.gradle.settings' + id 'com.gradle.enterprise' version '3.15.1' } gradleEnterprise { @@ -66,13 +61,12 @@ gradleEnterprise { } -apply plugin: 'org.kordamp.gradle.settings' - projects { directories = ['subprojects', 'examples', 'docs', 'benchmarks'] plugins { dir('subproject') { + id 'io.micronaut.minimal.library' id 'com.agorapulse.gradle:internal-maven-publish' } }