From 34751e761d36448552c300baa4439751239870f6 Mon Sep 17 00:00:00 2001 From: James Fredley Date: Tue, 24 Dec 2024 16:49:32 -0500 Subject: [PATCH] Consolidate and update versions in gradle.properties --- buildSrc/build.gradle | 39 ++++++++-------- buildSrc/settings.gradle | 0 ...g.grails.forge.internal.base-module.gradle | 10 ++--- gradle.properties | 45 ++++++++++++++++--- grails-cli/build.gradle | 26 +++++------ grails-forge-analytics-postgres/build.gradle | 24 +++++----- grails-forge-api/build.gradle | 4 +- grails-forge-core/build.gradle | 20 +++------ grails-forge-web-netty/build.gradle | 18 ++++---- settings.gradle | 6 +-- test-core/build.gradle | 2 +- 11 files changed, 107 insertions(+), 87 deletions(-) delete mode 100644 buildSrc/settings.gradle diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 36a9af0a..b068cd01 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -3,36 +3,35 @@ plugins { id "groovy-gradle-plugin" } +Properties properties = new Properties() +FileInputStream input = new FileInputStream(file('../gradle.properties')) +properties.load(input) +input.close() + +for (String key : properties.stringPropertyNames()) { + ext.set(key, properties.getProperty(key)) +} + repositories { mavenCentral() gradlePluginPortal() } + configurations.all { exclude group: "io.github.groovylang.groovydoc", module: "io.github.groovylang.groovydoc.gradle.plugin" - resolutionStrategy { - eachDependency { details -> - if (details.requested.group == 'org.codehaus.groovy') { - details.useVersion '3.0.9' - details.because 'Groovy 2.5.x not supported by Gradle 7.0+' - } - if (details.requested.group.startsWith("com.fasterxml.jackson")) { - details.useVersion("2.15.0-rc1") - } - } - } } dependencies { - implementation "io.micronaut.build.internal:micronaut-gradle-plugins:5.4.10" - implementation "com.fizzed:rocker-compiler:1.4.0" - implementation "com.fasterxml.jackson.core:jackson-databind:2.17.2" - implementation "io.sdkman:gradle-sdkvendor-plugin:3.0.0" - implementation "org.asciidoctor:asciidoctor-gradle-jvm:4.0.3" - implementation "com.diffplug.spotless:spotless-plugin-gradle:6.25.0" - implementation "io.spring.nohttp:nohttp-gradle:0.0.11" - implementation "gradle.plugin.com.github.johnrengelman:shadow:7.1.2" - implementation "io.github.gradle-nexus:publish-plugin:1.3.0" + implementation "io.micronaut.build.internal:micronaut-gradle-plugins:$micronautGradlePlugins" + implementation "com.fizzed:rocker-compiler:$rockerVersion" + implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion" + implementation "io.sdkman:gradle-sdkvendor-plugin:$gradleSdkvendorPluginVersion" + implementation "org.asciidoctor:asciidoctor-gradle-jvm:$asciidoctorGradleJvmVersion" + implementation "com.diffplug.spotless:spotless-plugin-gradle:$spotlessVersion" + implementation "io.spring.nohttp:nohttp-gradle:$nohttpGradleVersion" + implementation "gradle.plugin.com.github.johnrengelman:shadow:$shadowVersion" + implementation "io.github.gradle-nexus:publish-plugin:$nexusPublishVersion" } gradlePlugin { diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle deleted file mode 100644 index e69de29b..00000000 diff --git a/buildSrc/src/main/groovy/org.grails.forge.internal.base-module.gradle b/buildSrc/src/main/groovy/org.grails.forge.internal.base-module.gradle index f6ba4586..e35b5a78 100644 --- a/buildSrc/src/main/groovy/org.grails.forge.internal.base-module.gradle +++ b/buildSrc/src/main/groovy/org.grails.forge.internal.base-module.gradle @@ -77,14 +77,14 @@ dependencies { testCompileOnly "io.micronaut:micronaut-inject-groovy:${micronautVersion}" } - testImplementation("org.codehaus.groovy:groovy:$groovyVersion") - testImplementation("org.spockframework:spock-core:$spockVersion") { + testImplementation "org.codehaus.groovy:groovy:$groovyVersion" + testImplementation "org.spockframework:spock-core:$spockVersion", { exclude group: "org.codehaus.groovy", module: "groovy-all" } - testImplementation "cglib:cglib-nodep:3.3.0" - testImplementation "org.objenesis:objenesis:3.3" - testRuntimeOnly "ch.qos.logback:logback-classic:1.5.12" + testImplementation "cglib:cglib-nodep:$cglibVersion" + testImplementation "org.objenesis:objenesis:$objenesisVersion" + testRuntimeOnly "ch.qos.logback:logback-classic:$logbackClassicVersion" testImplementation "org.codehaus.groovy:groovy-test:$groovyVersion" } diff --git a/gradle.properties b/gradle.properties index 04cd9443..d1acab57 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,16 +1,47 @@ projectVersion=7.0.0-SNAPSHOT -micronautBuildVersion=1.1.5 -micronautDocsVersion=2.0.0 -micronautVersion=3.10.4 -rockerVersion=1.4.0 -groovyVersion=3.0.22 -spockVersion=2.0-groovy-3.0 + title=Grails Application Forge projectDesc=Generates Grails applications projectUrl=https://grails.org githubSlug=grails/grails-forge githubBranch=7.0.x developers=Puneet Behl + +acme4jClientVersion=3.4.0 +acme4jUtilsVersion=2.16 +asciidoctorGradleJvmVersion=4.0.3 +antlr4Version=4.8-1!! +cglibVersion=3.3.0 +commonsCompressVersion=1.27.1 +customUserDataVersion=2.0.2 +develocityVersion=3.19 +groovyVersion=3.0.23 +gradleSdkvendorPluginVersion=3.0.0 grailsVersion=7.0.0-SNAPSHOT +jacksonDatabindVersion=2.17.2 +jakartaInjectVersion=1.0.5 +jansiVersion=2.4.1 +javaDiffUtils=4.15 +jgitVersion=6.9.0.202403050737-r +logbackClassicVersion=1.5.15 +micronautVersion=3.10.4 +micronautApplicationPluginVersion=3.7.10 +micronautBuildVersion=1.1.5 +micronautDocsVersion=2.0.0 +micronautGradlePlugins=5.4.10 +nexusPublishVersion=1.3.0 +nohttpGradleVersion=0.0.11 +objenesisVersion=3.3 +postgresqlVersion=42.7.3 +postgresSocketFactoryVersion=1.17.1 +reflectionsVersion=0.10.2 +rockerVersion=2.1.0 +shadowVersion=8.0.0 +slf4jVersion=2.0.16 +snakeyamlVersion=2.2 +spockVersion=2.1-groovy-3.0 +spotlessVersion=6.25.0 +typesafeConfigVersion=1.4.3 + org.gradle.parallel=true -org.gradle.caching=true +org.gradle.caching=true \ No newline at end of file diff --git a/grails-cli/build.gradle b/grails-cli/build.gradle index d9c2fcdf..00b87456 100644 --- a/grails-cli/build.gradle +++ b/grails-cli/build.gradle @@ -27,24 +27,24 @@ configurations { } dependencies { - annotationProcessor("io.micronaut:micronaut-inject-java") - annotationProcessor("io.micronaut:micronaut-graal") + annotationProcessor "io.micronaut:micronaut-inject-java" + annotationProcessor "io.micronaut:micronaut-graal" api project(":grails-forge-core") - api "info.picocli:picocli:${picocliVersion}" - api "info.picocli:picocli-shell-jline3:${picocliVersion}" + api "info.picocli:picocli:$picocliVersion" + api "info.picocli:picocli-shell-jline3:$picocliVersion" api "com.fizzed:rocker-runtime:$rockerVersion" - implementation "org.slf4j:slf4j-nop:2.0.16" - implementation "org.fusesource.jansi:jansi:2.4.1" - implementation "org.yaml:snakeyaml:2.2" - implementation group: 'javax.inject', name: 'javax.inject', version: '1' - implementation 'org.shredzone.acme4j:acme4j-client:3.2.1' - implementation 'org.shredzone.acme4j:acme4j-utils:2.16' - generateConfig "info.picocli:picocli-codegen:${picocliVersion}" + implementation "org.slf4j:slf4j-nop:$slf4jVersion" + implementation "org.fusesource.jansi:jansi:$jansiVersion" + implementation "org.yaml:snakeyaml:$snakeyamlVersion" + implementation "jakarta.inject:jakarta.inject-api:$jakartaInjectVersion" + implementation "org.shredzone.acme4j:acme4j-client:$acme4jClientVersion" + implementation "org.shredzone.acme4j:acme4j-utils:$acme4jUtilsVersion" + generateConfig "info.picocli:picocli-codegen:$picocliVersion" compileOnly "com.google.code.findbugs:jsr305" compileOnly "org.graalvm.nativeimage:svm" - testImplementation("io.micronaut.picocli:micronaut-picocli") + testImplementation "io.micronaut.picocli:micronaut-picocli" testImplementation "org.testcontainers:spock" - testImplementation 'org.reflections:reflections:0.10.2' + testImplementation "org.reflections:reflections:$reflectionsVersion" } graalvmNative { diff --git a/grails-forge-analytics-postgres/build.gradle b/grails-forge-analytics-postgres/build.gradle index 7c196d2c..73f01a3a 100644 --- a/grails-forge-analytics-postgres/build.gradle +++ b/grails-forge-analytics-postgres/build.gradle @@ -1,6 +1,6 @@ plugins { - id("com.github.johnrengelman.shadow") - id("io.micronaut.application") version "3.7.10" + id "com.github.johnrengelman.shadow" + id "io.micronaut.application" version "$micronautApplicationPluginVersion" } version project.projectVersion @@ -11,19 +11,19 @@ repositories { } dependencies { - annotationProcessor("io.micronaut.data:micronaut-data-processor") - annotationProcessor("io.micronaut:micronaut-graal") - implementation(project(":grails-forge-core")) - runtimeOnly "ch.qos.logback:logback-classic:1.5.12" - implementation("io.micronaut.data:micronaut-data-jdbc") - implementation 'org.postgresql:postgresql:42.7.3' - implementation 'com.google.cloud.sql:postgres-socket-factory:1.17.1' + annotationProcessor "io.micronaut.data:micronaut-data-processor" + annotationProcessor "io.micronaut:micronaut-graal" + implementation project(":grails-forge-core") + runtimeOnly "ch.qos.logback:logback-classic:$logbackClassicVersion" + implementation "io.micronaut.data:micronaut-data-jdbc" + implementation "org.postgresql:postgresql:$postgresqlVersion" + implementation "com.google.cloud.sql:postgres-socket-factory:$postgresSocketFactoryVersion" implementation "io.micronaut.sql:micronaut-jdbc-hikari" - implementation 'io.micronaut.flyway:micronaut-flyway' + implementation "io.micronaut.flyway:micronaut-flyway" testCompileOnly "io.micronaut:micronaut-inject-groovy:$micronautVersion" testImplementation "io.micronaut:micronaut-http-client" testImplementation "org.testcontainers:postgresql" - testImplementation "ch.qos.logback:logback-classic:1.5.12" + testImplementation "ch.qos.logback:logback-classic:$logbackClassicVersion" } application { mainClass = "org.grails.forge.analytics.postgres.Main" @@ -39,7 +39,7 @@ micronaut { } tasks.named('dockerfileNative') { // https://www.graalvm.org/latest/docs/getting-started/container-images/ - baseImage("ghcr.io/graalvm/jdk:ol8-java17-22.3.2") + baseImage("ghcr.io/graalvm/jdk:ol8-java17-22.3.3") } tasks.named("dockerBuildNative") { diff --git a/grails-forge-api/build.gradle b/grails-forge-api/build.gradle index 63b68123..f69e69a9 100644 --- a/grails-forge-api/build.gradle +++ b/grails-forge-api/build.gradle @@ -12,7 +12,7 @@ dependencies { api project(":grails-forge-core"), { exclude group:'org.slf4j', module:'slf4j-nop' } - implementation("io.swagger.core.v3:swagger-annotations") + implementation "io.swagger.core.v3:swagger-annotations" api "io.micronaut:micronaut-inject" api "io.micronaut:micronaut-runtime" api "io.micronaut:micronaut-http" @@ -25,5 +25,5 @@ dependencies { testImplementation "io.micronaut:micronaut-http-server-netty" testImplementation "io.micronaut:micronaut-http-client" testImplementation "io.micronaut.test:micronaut-test-spock" - testImplementation "ch.qos.logback:logback-classic:1.5.12" + testImplementation "ch.qos.logback:logback-classic:$logbackClassicVersion" } diff --git a/grails-forge-core/build.gradle b/grails-forge-core/build.gradle index 1989dda1..ed8bba6d 100644 --- a/grails-forge-core/build.gradle +++ b/grails-forge-core/build.gradle @@ -14,27 +14,17 @@ sourceSets { } } -configurations.all { - it.resolutionStrategy { - it.eachDependency { details -> - if (details.requested.group.startsWith("com.fasterxml.jackson")) { - details.useVersion("2.15.0-rc1") - } - } - } -} - dependencies { api platform("io.micronaut:micronaut-bom:$micronautVersion") api "com.fizzed:rocker-runtime:$rockerVersion" api "io.micronaut:micronaut-inject" api "io.micronaut:micronaut-http" api "io.micronaut:micronaut-http-client" - api "io.github.java-diff-utils:java-diff-utils:4.12" - api "org.eclipse.jgit:org.eclipse.jgit:6.9.0.202403050737-r" - implementation "org.yaml:snakeyaml:2.2" - implementation 'com.typesafe:config:1.4.3' - implementation 'org.apache.commons:commons-compress:1.26.1' + api "io.github.java-diff-utils:java-diff-utils:$javaDiffUtils" + api "org.eclipse.jgit:org.eclipse.jgit:$jgitVersion" + implementation "org.yaml:snakeyaml:$snakeyamlVersion" + implementation "com.typesafe:config:$typesafeConfigVersion" + implementation "org.apache.commons:commons-compress:$commonsCompressVersion" compileOnly "com.google.code.findbugs:jsr305" testImplementation "org.codehaus.groovy:groovy-yaml" } diff --git a/grails-forge-web-netty/build.gradle b/grails-forge-web-netty/build.gradle index 9976e863..1798c286 100644 --- a/grails-forge-web-netty/build.gradle +++ b/grails-forge-web-netty/build.gradle @@ -1,6 +1,6 @@ plugins { - id("com.github.johnrengelman.shadow") - id("io.micronaut.application") version "3.7.10" + id "com.github.johnrengelman.shadow" + id "io.micronaut.application" version "$micronautApplicationPluginVersion" } version project.projectVersion @@ -11,12 +11,12 @@ repositories { } dependencies { - implementation(project(":grails-forge-api")) - implementation("io.micronaut.gcp:micronaut-gcp-http-client") - runtimeOnly("ch.qos.logback:logback-classic") - testCompileOnly("io.micronaut:micronaut-inject-groovy:$micronautVersion") - testImplementation("io.micronaut.test:micronaut-test-spock") - testImplementation("io.micronaut:micronaut-http-client") + implementation project(":grails-forge-api") + implementation "io.micronaut.gcp:micronaut-gcp-http-client" + runtimeOnly "ch.qos.logback:logback-classic" + testCompileOnly "io.micronaut:micronaut-inject-groovy:$micronautVersion" + testImplementation "io.micronaut.test:micronaut-test-spock" + testImplementation "io.micronaut:micronaut-http-client" } tasks.named("test", Test) { useJUnitPlatform() @@ -39,7 +39,7 @@ micronaut { } tasks.named('dockerfileNative') { // https://www.graalvm.org/latest/docs/getting-started/container-images/ - baseImage("ghcr.io/graalvm/jdk:ol8-java17-22.3.2") + baseImage("ghcr.io/graalvm/jdk:ol8-java17-22.3.3") } tasks.named("dockerBuildNative") { diff --git a/settings.gradle b/settings.gradle index 82d3e035..469dafdd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,12 +6,12 @@ pluginManagement { } buildscript { dependencies { - classpath 'org.antlr:antlr4-runtime:4.8-1!!' + classpath "org.antlr:antlr4-runtime:$antlr4Version" } } plugins { - id "com.gradle.develocity" version "3.18.2" - id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.0.2' + id "com.gradle.develocity" version "$develocityVersion" + id "com.gradle.common-custom-user-data-gradle-plugin" version "$customUserDataVersion" } def isCI = System.getenv('CI') != null diff --git a/test-core/build.gradle b/test-core/build.gradle index 0f8ab403..8d06a57a 100644 --- a/test-core/build.gradle +++ b/test-core/build.gradle @@ -29,7 +29,7 @@ dependencies { // testImplementation project(":test-utils") testImplementation project(":grails-forge-core") testImplementation project(":grails-cli") - testImplementation "ch.qos.logback:logback-classic:1.5.12" + testImplementation "ch.qos.logback:logback-classic:$logbackClassicVersion" testImplementation "io.micronaut.picocli:micronaut-picocli" implementation "io.micronaut:micronaut-inject-groovy:$micronautVersion" generateConfig "info.picocli:picocli-codegen:${picocliVersion}"