diff --git a/.agents/skills/gradle-developer/SKILL.md b/.agents/skills/gradle-developer/SKILL.md index b7ac6711cc1..b5279768373 100644 --- a/.agents/skills/gradle-developer/SKILL.md +++ b/.agents/skills/gradle-developer/SKILL.md @@ -11,7 +11,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more contributor l ## What I Do -- Write and change Gradle build scripts the way **this repository** already does them on `8.0.x` (Gradle **9.6.x**). +- Write and change Gradle build scripts the way **this repository** already does them on `8.0.x` (Gradle **9.7.x**). - Keep agents off generic Gradle "best practice" when it conflicts with established monorepo patterns. - Cover composite builds (`build-logic`, `grails-gradle`, `grails-forge`, `end-to-end`), convention plugins, BOM/`platform()` dependency management, test wiring, publishing hooks, and Gradle 9 task-configuration traps learned from recent PRs. - Make Gradle changes boring, copy-paste consistent, and correct on the first try. @@ -136,7 +136,7 @@ Presence-based flags (property **present**, value optional) match `skipFunctiona ## Gradle Version Sync (Hard Rule) -Current line: **Gradle 9.6.0** (`distributionUrl` + `gradleToolingApiVersion=9.6.0`). Upstream may already ship a newer 9.6.x patch - this repo rides close to latest **only after** a deliberate multi-location bump PR. Do not "helpfully" jump one wrapper ahead of the rest. +Current line: **Gradle 9.7.0** (`distributionUrl` + `gradleToolingApiVersion=9.7.0`). Upstream may already ship a newer 9.7.x patch - this repo rides close to latest **only after** a deliberate multi-location bump PR. Do not "helpfully" jump one wrapper ahead of the rest. **Two Groovy stacks:** Gradle itself embeds **Groovy 4** for build logic. Application/runtime code on 8.0.x is **Groovy 5**. That is why `dependencies.gradle` keeps separate maps: @@ -599,16 +599,16 @@ Develocity: `https://develocity.apache.org` - build scans publish when authentic Use official docs for API signatures and deprecations (pin URLs to the version you are bumping toward): -- [Gradle 9.6 release notes](https://docs.gradle.org/9.6.0/release-notes.html) -- [Upgrading major version 9](https://docs.gradle.org/9.6.0/userguide/upgrading_major_version_9.html) -- [Upgrading within Gradle 9.x](https://docs.gradle.org/9.6.0/userguide/upgrading_version_9.html) -- [Java Library plugin](https://docs.gradle.org/9.6.0/userguide/java_library_plugin.html) -- [Java Platform / BOM](https://docs.gradle.org/9.6.0/userguide/java_platform_plugin.html) -- [Platforms](https://docs.gradle.org/9.6.0/userguide/platforms.html) -- [Sharing build logic via included builds](https://docs.gradle.org/9.6.0/userguide/sharing_build_logic_between_subprojects.html) -- [Task configuration avoidance](https://docs.gradle.org/9.6.0/userguide/task_configuration_avoidance.html) -- [Configuration cache](https://docs.gradle.org/9.6.0/userguide/configuration_cache.html) (read for compatibility - still **off** here) -- [Version catalogs](https://docs.gradle.org/9.6.0/userguide/version_catalogs.html) (docs like them - **this repo does not**) +- [Gradle 9.7 release notes](https://docs.gradle.org/9.7.0/release-notes.html) +- [Upgrading major version 9](https://docs.gradle.org/9.7.0/userguide/upgrading_major_version_9.html) +- [Upgrading within Gradle 9.x](https://docs.gradle.org/9.7.0/userguide/upgrading_version_9.html) +- [Java Library plugin](https://docs.gradle.org/9.7.0/userguide/java_library_plugin.html) +- [Java Platform / BOM](https://docs.gradle.org/9.7.0/userguide/java_platform_plugin.html) +- [Platforms](https://docs.gradle.org/9.7.0/userguide/platforms.html) +- [Sharing build logic via included builds](https://docs.gradle.org/9.7.0/userguide/sharing_build_logic_between_subprojects.html) +- [Task configuration avoidance](https://docs.gradle.org/9.7.0/userguide/task_configuration_avoidance.html) +- [Configuration cache](https://docs.gradle.org/9.7.0/userguide/configuration_cache.html) (read for compatibility - still **off** here) +- [Version catalogs](https://docs.gradle.org/9.7.0/userguide/version_catalogs.html) (docs like them - **this repo does not**) ### Docs say X - we do Y diff --git a/.agents/skills/grails-8-upgrade/SKILL.md b/.agents/skills/grails-8-upgrade/SKILL.md index 7c082a60122..2ded12ebd2f 100644 --- a/.agents/skills/grails-8-upgrade/SKILL.md +++ b/.agents/skills/grails-8-upgrade/SKILL.md @@ -50,7 +50,7 @@ Start every Grails 8 upgrade by checking these platform requirements: - Use JDK 21 or later to build and run ordinary Grails 8 applications. - Use JDK 25 or later if the application uses `grails-micronaut`, `micronaut-http-client`, or other Micronaut features. -- Update the Gradle wrapper to the Grails 8 managed line. Current 8.0.x snapshot docs use Gradle 9.6.0, while milestone docs may show an earlier Gradle 9.x version. +- Update the Gradle wrapper to the Grails 8 managed line. Current 8.0.x snapshot docs use Gradle 9.7.0, while milestone docs may show an earlier Gradle 9.x version. - Expect Spring Boot 4.1.x, Spring Framework 7.0.x, Spring Security 7.1.x, Spring Data 2026.0.x, Micrometer 1.17.x, Jackson 3.1.x, Tomcat 11.0.x, and Jakarta Servlet 6.1. - Keep using `jakarta.*` APIs. Do not reintroduce `javax.*` packages. - Add `runtimeOnly 'org.springframework.boot:spring-boot-properties-migrator'` temporarily during the migration, boot once, fix reported configuration properties, then remove it. diff --git a/.sdkmanrc b/.sdkmanrc index 508f113b0c1..87b7ed48fff 100644 --- a/.sdkmanrc +++ b/.sdkmanrc @@ -8,4 +8,4 @@ java=21.0.7-librca # Keep gradle version synced with gradle.properties (gradleToolingApiVersion). # Update the gradle-bootstrap project to propagate the version to all gradle-wrapper.properties files. -gradle=9.6.0 +gradle=9.7.0 diff --git a/AGENTS.md b/AGENTS.md index c02c288a123..4e9dac4e70a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -91,7 +91,7 @@ export GRADLE_OPTS="-Xms2G -Xmx5G" | Spring Boot | 4.1.x | | Spring Framework | 7.0.x | | Spock | 2.4-groovy-5.0 | -| Gradle | 9.6.x | +| Gradle | 9.7.x | | Jakarta EE | 10 | ## Project Structure diff --git a/build-logic/gradle/wrapper/gradle-wrapper.jar b/build-logic/gradle/wrapper/gradle-wrapper.jar index b1b8ef56b44..eddabd2eef8 100644 Binary files a/build-logic/gradle/wrapper/gradle-wrapper.jar and b/build-logic/gradle/wrapper/gradle-wrapper.jar differ diff --git a/build-logic/gradle/wrapper/gradle-wrapper.properties b/build-logic/gradle/wrapper/gradle-wrapper.properties index 17ecc417ab3..4f1a5820d9f 100644 --- a/build-logic/gradle/wrapper/gradle-wrapper.properties +++ b/build-logic/gradle/wrapper/gradle-wrapper.properties @@ -2,7 +2,7 @@ # and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/build-logic/gradlew b/build-logic/gradlew index b9bb139f790..249efbb032c 100755 --- a/build-logic/gradlew +++ b/build-logic/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/build-logic/gradlew.bat b/build-logic/gradlew.bat index 24c62d56f2d..a51ec4f5886 100755 --- a/build-logic/gradlew.bat +++ b/build-logic/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/end-to-end/gradle/wrapper/gradle-wrapper.jar b/end-to-end/gradle/wrapper/gradle-wrapper.jar index b1b8ef56b44..eddabd2eef8 100644 Binary files a/end-to-end/gradle/wrapper/gradle-wrapper.jar and b/end-to-end/gradle/wrapper/gradle-wrapper.jar differ diff --git a/end-to-end/gradle/wrapper/gradle-wrapper.properties b/end-to-end/gradle/wrapper/gradle-wrapper.properties index eb84db68da7..69dd0d0404a 100644 --- a/end-to-end/gradle/wrapper/gradle-wrapper.properties +++ b/end-to-end/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/end-to-end/legacy-g7-command-plugin/gradle/wrapper/gradle-wrapper.jar b/end-to-end/legacy-g7-command-plugin/gradle/wrapper/gradle-wrapper.jar index b1b8ef56b44..eddabd2eef8 100644 Binary files a/end-to-end/legacy-g7-command-plugin/gradle/wrapper/gradle-wrapper.jar and b/end-to-end/legacy-g7-command-plugin/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle.properties b/gradle.properties index b49b31f28fd..243632c42d3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -37,7 +37,7 @@ expectitCoreVersion=0.9.0 gparsVersion=1.2.1 # Keep gradle version synced with .sdkmanrc, all gradle-wrapper.properties files, # and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw -gradleToolingApiVersion=9.6.0 +gradleToolingApiVersion=9.7.0 greenmailVersion=2.1.2 javassistVersion=3.30.2-GA jnrPosixVersion=3.1.20 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index b1b8ef56b44..eddabd2eef8 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 17ecc417ab3..4f1a5820d9f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,7 +2,7 @@ # and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/gradlew b/gradlew index b9bb139f790..249efbb032c 100755 --- a/gradlew +++ b/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/gradlew.bat b/gradlew.bat index 24c62d56f2d..a51ec4f5886 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/grails-forge/gradle/wrapper/gradle-wrapper.jar b/grails-forge/gradle/wrapper/gradle-wrapper.jar index b1b8ef56b44..eddabd2eef8 100644 Binary files a/grails-forge/gradle/wrapper/gradle-wrapper.jar and b/grails-forge/gradle/wrapper/gradle-wrapper.jar differ diff --git a/grails-forge/gradle/wrapper/gradle-wrapper.properties b/grails-forge/gradle/wrapper/gradle-wrapper.properties index 17ecc417ab3..4f1a5820d9f 100644 --- a/grails-forge/gradle/wrapper/gradle-wrapper.properties +++ b/grails-forge/gradle/wrapper/gradle-wrapper.properties @@ -2,7 +2,7 @@ # and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/grails-forge/gradlew b/grails-forge/gradlew index b9bb139f790..249efbb032c 100755 --- a/grails-forge/gradlew +++ b/grails-forge/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/grails-forge/gradlew.bat b/grails-forge/gradlew.bat old mode 100644 new mode 100755 index 24c62d56f2d..a51ec4f5886 --- a/grails-forge/gradlew.bat +++ b/grails-forge/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw b/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw index 12e481a3fbd..0c5f009ba51 100644 --- a/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw +++ b/grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw @@ -34,7 +34,7 @@ Features features) @* Keep gradle version synced with .sdkmanrc, gradle.properties (gradleToolingApiVersion), all gradle-wrapper.properties files *@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/grails-forge/grails-forge-core/src/main/resources/gradle/gradlew b/grails-forge/grails-forge-core/src/main/resources/gradle/gradlew index b9bb139f790..249efbb032c 100755 --- a/grails-forge/grails-forge-core/src/main/resources/gradle/gradlew +++ b/grails-forge/grails-forge-core/src/main/resources/gradle/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/grails-forge/grails-forge-core/src/main/resources/gradle/gradlew.bat b/grails-forge/grails-forge-core/src/main/resources/gradle/gradlew.bat old mode 100644 new mode 100755 index 24c62d56f2d..a51ec4f5886 --- a/grails-forge/grails-forge-core/src/main/resources/gradle/gradlew.bat +++ b/grails-forge/grails-forge-core/src/main/resources/gradle/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/grails-forge/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.jar b/grails-forge/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.jar index b1b8ef56b44..eddabd2eef8 100644 Binary files a/grails-forge/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.jar and b/grails-forge/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.jar differ diff --git a/grails-gradle/gradle/wrapper/gradle-wrapper.jar b/grails-gradle/gradle/wrapper/gradle-wrapper.jar index b1b8ef56b44..eddabd2eef8 100644 Binary files a/grails-gradle/gradle/wrapper/gradle-wrapper.jar and b/grails-gradle/gradle/wrapper/gradle-wrapper.jar differ diff --git a/grails-gradle/gradle/wrapper/gradle-wrapper.properties b/grails-gradle/gradle/wrapper/gradle-wrapper.properties index 17ecc417ab3..4f1a5820d9f 100644 --- a/grails-gradle/gradle/wrapper/gradle-wrapper.properties +++ b/grails-gradle/gradle/wrapper/gradle-wrapper.properties @@ -2,7 +2,7 @@ # and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/grails-gradle/gradlew b/grails-gradle/gradlew index b9bb139f790..249efbb032c 100755 --- a/grails-gradle/gradlew +++ b/grails-gradle/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/grails-gradle/gradlew.bat b/grails-gradle/gradlew.bat index 24c62d56f2d..a51ec4f5886 100755 --- a/grails-gradle/gradlew.bat +++ b/grails-gradle/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy index 805deadf427..03b270c8219 100644 --- a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy +++ b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy @@ -18,6 +18,8 @@ */ package org.grails.gradle.plugin.core +import java.util.concurrent.Callable +import java.util.concurrent.ConcurrentHashMap import java.util.zip.ZipFile import grails.util.BuildSettings @@ -52,6 +54,7 @@ import org.gradle.api.provider.Provider import org.gradle.api.tasks.AbstractCopyTask import org.gradle.api.tasks.JavaExec import org.gradle.api.tasks.SourceSet +import org.gradle.api.tasks.SourceSetContainer import org.gradle.api.tasks.TaskContainer import org.gradle.api.tasks.TaskProvider import org.gradle.api.tasks.compile.GroovyCompile @@ -86,6 +89,14 @@ class GrailsGradlePlugin implements Plugin { private static final String CLI_PID_FILE_PROPERTY = 'grails.cli.pid.file' private static final String RUN_APP_PID_FILE_NAME = 'run-app.pid' + /** + * A {@code configurationScript} configured on a GroovyCompile task, keyed by compile task name + * and captured when the task graph is ready, for the generator task to fold into the combined + * script it writes. An instance field rather than a static one so it is scoped to this project + * and this build, and cannot leak a stale script into a later build in the same daemon. + */ + private final Map userGroovyCompilerConfigScripts = new ConcurrentHashMap<>() + List> basePluginClasses = [IntegrationTestGradlePlugin] as List> List excludedGrailsAppSourceDirs = ['migrations', 'assets'] List grailsAppResourceDirs = ['views', 'i18n', 'conf', 'migrations'] @@ -184,11 +195,6 @@ class GrailsGradlePlugin implements Plugin { private void configureGroovyCompiler(Project project) { project.tasks.withType(GroovyCompile).configureEach { GroovyCompile c -> - // Use a task-specific config file to avoid overlapping outputs when multiple - // GroovyCompile tasks exist in the same project (e.g. compileGroovy, compileTestGroovy). - Provider groovyCompilerConfigFile = project.layout.buildDirectory.file("grailsGroovyCompilerConfig-${c.name}.groovy") - c.outputs.file(groovyCompilerConfigFile) - // Publish the project base directory to the Groovy compiler's worker daemon JVM so the // GlobalGrailsClassInjectorTransformation AST transform can locate // src/main/resources/META-INF/grails.factories without relying on hardcoded @@ -204,36 +210,10 @@ class GrailsGradlePlugin implements Plugin { if (grailsExtension != null) { c.groovyOptions.forkOptions.jvmArgumentProviders.add(new GrailsCompileStaticArtefactsProvider(grailsExtension.compileStatic)) } - Closure userScriptGenerator = getGroovyCompilerScript(c, project) - c.doFirst { - // This isn't ideal - we're performing configuration at execution time, but the alternative would be having - // to maintain a clean / configuration task and then gradle would want to cache those tasks. Since the inputs - // to those tasks would effectively be the runtimeClasspath, dependency problems can arise if another task - // changes the runtimeClasspath. To prevent having to add those tasks into the dependency chain, use doFirst - File combinedFile = groovyCompilerConfigFile.get().asFile - if (!combinedFile.exists()) { - combinedFile.parentFile.mkdirs() - combinedFile.createNewFile() - } - - String configuredScript = null - if (c.groovyOptions.configurationScript) { - configuredScript = c.groovyOptions.configurationScript.text?.trim() ?: null - } - String grailsScript = userScriptGenerator?.call() - - String combinedScripts = """ - // Grails groovy compilation configuration to ensure ASTs are applied correctly - - ${grailsScript?.trim() ?: ''} - - ${configuredScript?.trim() ?: ''} - """ - combinedFile.write(combinedScripts) - c.groovyOptions.configurationScript = combinedFile - } } + configureGroovyCompilerConfigScript(project) + // Configure indy and log status after evaluation so user's grails { } block has been applied GrailsExtension grailsExtension = project.extensions.findByType(GrailsExtension) project.afterEvaluate { @@ -256,6 +236,119 @@ class GrailsGradlePlugin implements Plugin { } } + /** + * Wires each {@link GroovyCompile} task to a combined Groovy compiler configuration script + * produced by a dedicated generator task. + * + *

The script cannot be written from a {@code doFirst} on the compile task: Gradle finalizes + * task properties before any task action runs, so assigning {@code groovyOptions.configurationScript} + * from {@code doFirst} fails from Gradle 9.7 on, where {@code GroovyCompileOptions} became a lazy + * property — "The value for task ':compileGroovy' property 'groovyOptions.configurationScriptFile' + * is final and cannot be changed any further." Once the property is assigned during configuration, + * Gradle also treats the script as an input file that has to exist before the compile task runs, + * which a producing task guarantees across a {@code clean build} and a {@code doFirst} cannot.

+ */ + private void configureGroovyCompilerConfigScript(Project project) { + // Generator tasks are registered from the source-set container, not from a GroovyCompile + // configuration action: registering a task while the task container is being configured + // throws TaskCreationException. Source sets are what create GroovyCompile tasks, and this + // hook is live, so a source set added after the project is evaluated is still covered. + SourceSetContainer sourceSets = project.extensions.findByType(SourceSetContainer) + if (sourceSets == null) { + return + } + sourceSets.configureEach { SourceSet sourceSet -> + registerGroovyCompilerConfigGenerator(project, sourceSet.getCompileTaskName('groovy')) + } + + project.tasks.withType(GroovyCompile).configureEach { GroovyCompile c -> + // Resolved lazily and tolerant of a GroovyCompile that has no matching source set + // (and therefore no generator): such a task simply keeps whatever script it already had. + c.dependsOn({ + String generatorName = groovyCompilerConfigGeneratorName(c.name) + project.tasks.names.contains(generatorName) ? [project.tasks.named(generatorName)] : [] + } as Callable) + } + + // The combined script is assigned once the task graph is ready — the last point before + // execution and after every configuration callback has run. Assigning earlier (during + // afterEvaluate) loses a configurationScript that a later callback assigns, because that + // assignment simply overwrites ours and the Grails imports vanish silently. + project.gradle.taskGraph.whenReady { + project.tasks.withType(GroovyCompile).names.each { String compileTaskName -> + String generatorName = groovyCompilerConfigGeneratorName(compileTaskName) + if (!project.tasks.names.contains(generatorName)) { + return + } + GroovyCompile c = project.tasks.named(compileTaskName, GroovyCompile).get() + File combinedFile = groovyCompilerConfigFile(project, compileTaskName).get().asFile + File configured = c.groovyOptions.configurationScript + if (configured != null && configured != combinedFile) { + userGroovyCompilerConfigScripts.put(compileTaskName, configured) + } else { + userGroovyCompilerConfigScripts.remove(compileTaskName) + } + c.groovyOptions.configurationScript = combinedFile + } + } + } + + private void registerGroovyCompilerConfigGenerator(Project project, String compileTaskName) { + String generatorName = groovyCompilerConfigGeneratorName(compileTaskName) + if (project.tasks.names.contains(generatorName)) { + return + } + // Use a task-specific config file to avoid overlapping outputs when multiple + // GroovyCompile tasks exist in the same project (e.g. compileGroovy, compileTestGroovy). + Provider groovyCompilerConfigFile = groovyCompilerConfigFile(project, compileTaskName) + + project.tasks.register(generatorName) { Task t -> + t.description = "Generates the Grails Groovy compiler configuration script for ${compileTaskName}" + t.outputs.file(groovyCompilerConfigFile) + // Generating the script needs the resolved compile classpath, and declaring that as + // an input would pull the runtimeClasspath into this task's up-to-date check. Since + // the inputs to this task would effectively be the runtimeClasspath, dependency + // problems can arise if another task changes the runtimeClasspath. Generating the + // script is cheap, so skip state tracking and regenerate on every build instead. + t.doNotTrackState('Depends on the resolved compile classpath; cheap to regenerate') + // doNotTrackState suppresses up-to-date checking; it does not order this task against + // the tasks that produce the compile classpath it reads. Depend on the classpath's own + // build dependencies so the probes below see the artifacts, without declaring the + // classpath as an input and dragging it into the up-to-date check. + t.dependsOn({ + project.tasks.named(compileTaskName, GroovyCompile).get().classpath + } as Callable) + t.doLast { + File combinedFile = groovyCompilerConfigFile.get().asFile + combinedFile.parentFile.mkdirs() + + File userScript = userGroovyCompilerConfigScripts.get(compileTaskName) + String configuredScript = null + if (userScript?.exists()) { + configuredScript = userScript.text?.trim() ?: null + } + String grailsScript = getGroovyCompilerScript(project.tasks.named(compileTaskName, GroovyCompile).get(), project)?.call() + + String combinedScripts = """ + // Grails groovy compilation configuration to ensure ASTs are applied correctly + + ${grailsScript?.trim() ?: ''} + + ${configuredScript?.trim() ?: ''} + """ + combinedFile.write(combinedScripts) + } + } + } + + private static String groovyCompilerConfigGeneratorName(String compileTaskName) { + "generate${compileTaskName.capitalize()}GrailsCompilerConfig" + } + + private static Provider groovyCompilerConfigFile(Project project, String compileTaskName) { + project.layout.buildDirectory.file("grailsGroovyCompilerConfig-${compileTaskName}.groovy") + } + protected Closure getGroovyCompilerScript(GroovyCompile compile, Project project) { GrailsExtension grails = project.extensions.findByType(GrailsExtension) diff --git a/grails-gradle/plugins/src/test/groovy/org/grails/gradle/plugin/core/GrailsGroovyCompilerConfigSpec.groovy b/grails-gradle/plugins/src/test/groovy/org/grails/gradle/plugin/core/GrailsGroovyCompilerConfigSpec.groovy new file mode 100644 index 00000000000..9608b81201b --- /dev/null +++ b/grails-gradle/plugins/src/test/groovy/org/grails/gradle/plugin/core/GrailsGroovyCompilerConfigSpec.groovy @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.grails.gradle.plugin.core + +/** + * Covers the lifecycle guarantees of the Grails Groovy compiler configuration script wiring. + * + *

The combined script is produced by a generator task rather than by a {@code doFirst} on the + * compile task, because Gradle finalizes task properties before task actions run. These tests pin + * the three ordering properties that arrangement has to preserve.

+ * + * @see GrailsGradlePlugin#getGroovyCompilerScript + */ +class GrailsGroovyCompilerConfigSpec extends GradleSpecification { + + def "a GroovyCompile registered after the project is evaluated still gets a generator"() { + given: 'a source set registered from projectsEvaluated, after every afterEvaluate callback' + setupTestResourceProject('compiler-config-late-source-set') + + when: + def result = executeTask('inspectLate') + + then: 'the late compile task is wired, not only the ones present during evaluation' + result.output.contains('LATE_GENERATOR_EXISTS=true') + result.output.contains('MAIN_GENERATOR_EXISTS=true') + } + + def "the generator runs after the tasks that produce the compile classpath"() { + given: 'an application whose compile classpath comes from a sibling project' + setupTestResourceProject('compiler-config-classpath-ordering') + + when: + def result = executeTask(':app:inspectOrder') + + then: 'the generator depends on the producing task, so the classpath probes see the artifact' + result.output.contains('GENERATOR_DEPENDS_ON_PRODUCER_JAR=true') + } + + def "a configurationScript assigned from a later callback is folded in, not clobbered"() { + given: 'a user assigning configurationScript from projectsEvaluated' + setupTestResourceProject('compiler-config-late-assignment') + + when: + def result = executeTask('inspectAssign') + + then: 'the combined script wins and carries the user script content' + result.output.contains('FINAL_CONFIG_SCRIPT=grailsGroovyCompilerConfig-compileGroovy.groovy') + result.output.contains('COMBINED_EXISTS=true') + result.output.contains('COMBINED_CONTAINS_USER_IMPORT=true') + } +} diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/app/build.gradle b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/app/build.gradle new file mode 100644 index 00000000000..9b9437d9455 --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/app/build.gradle @@ -0,0 +1,15 @@ +plugins { + id 'org.apache.grails.gradle.grails-app' +} + +dependencies { + implementation project(':producer') +} + +tasks.register('inspectOrder') { + doLast { + def gen = tasks.named('generateCompileGroovyGrailsCompilerConfig').get() + def deps = gen.taskDependencies.getDependencies(gen)*.path + println "GENERATOR_DEPENDS_ON_PRODUCER_JAR=${deps.any { it == ':producer:jar' }}" + } +} diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/build.gradle b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/build.gradle new file mode 100644 index 00000000000..e69de29bb2d diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/gradle.properties b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/gradle.properties new file mode 100644 index 00000000000..35c332fb874 --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/gradle.properties @@ -0,0 +1 @@ +grailsVersion=__PROJECT_VERSION__ diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/producer/build.gradle b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/producer/build.gradle new file mode 100644 index 00000000000..59a20efc570 --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/producer/build.gradle @@ -0,0 +1,3 @@ +plugins { + id 'java-library' +} diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/settings.gradle b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/settings.gradle new file mode 100644 index 00000000000..3718a735358 --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-classpath-ordering/settings.gradle @@ -0,0 +1,3 @@ +rootProject.name = 'compiler-config-classpath-ordering' +include 'producer' +include 'app' diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/build.gradle b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/build.gradle new file mode 100644 index 00000000000..11d3922b91b --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/build.gradle @@ -0,0 +1,20 @@ +plugins { + id 'org.apache.grails.gradle.grails-app' +} + +gradle.projectsEvaluated { + tasks.named('compileGroovy', GroovyCompile).configure { + it.groovyOptions.configurationScript = file('user-config.groovy') + } +} + +tasks.register('inspectAssign') { + dependsOn 'generateCompileGroovyGrailsCompilerConfig' + doLast { + def c = tasks.named('compileGroovy', GroovyCompile).get() + println "FINAL_CONFIG_SCRIPT=${c.groovyOptions.configurationScript?.name}" + def combined = file('build/grailsGroovyCompilerConfig-compileGroovy.groovy') + println "COMBINED_EXISTS=${combined.exists()}" + println "COMBINED_CONTAINS_USER_IMPORT=${combined.exists() && combined.text.contains(/star 'java.time'/)}" + } +} diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/gradle.properties b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/gradle.properties new file mode 100644 index 00000000000..35c332fb874 --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/gradle.properties @@ -0,0 +1 @@ +grailsVersion=__PROJECT_VERSION__ diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/settings.gradle b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/settings.gradle new file mode 100644 index 00000000000..a5e692dc755 --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'compiler-config-late-assignment' diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/user-config.groovy b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/user-config.groovy new file mode 100644 index 00000000000..19f3526c85a --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-assignment/user-config.groovy @@ -0,0 +1 @@ +withConfig(configuration) { imports { star 'java.time' } } diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-source-set/build.gradle b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-source-set/build.gradle new file mode 100644 index 00000000000..56c26f06c1f --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-source-set/build.gradle @@ -0,0 +1,15 @@ +plugins { + id 'org.apache.grails.gradle.grails-app' +} + +// Registered after every afterEvaluate callback has run. +gradle.projectsEvaluated { + sourceSets.register('late') +} + +tasks.register('inspectLate') { + doLast { + println "LATE_GENERATOR_EXISTS=${tasks.names.contains('generateCompileLateGroovyGrailsCompilerConfig')}" + println "MAIN_GENERATOR_EXISTS=${tasks.names.contains('generateCompileGroovyGrailsCompilerConfig')}" + } +} diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-source-set/gradle.properties b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-source-set/gradle.properties new file mode 100644 index 00000000000..35c332fb874 --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-source-set/gradle.properties @@ -0,0 +1 @@ +grailsVersion=__PROJECT_VERSION__ diff --git a/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-source-set/settings.gradle b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-source-set/settings.gradle new file mode 100644 index 00000000000..fcee29c213b --- /dev/null +++ b/grails-gradle/plugins/src/test/resources/test-projects/compiler-config-late-source-set/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'compiler-config-late-source-set' diff --git a/grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.jar b/grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.jar index b1b8ef56b44..eddabd2eef8 100644 Binary files a/grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.jar and b/grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.jar differ diff --git a/grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.properties b/grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.properties index 07143d4dc85..3593509a4d4 100644 --- a/grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.properties +++ b/grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.properties @@ -2,7 +2,7 @@ # and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/grails-profiles/base/skeleton/gradlew b/grails-profiles/base/skeleton/gradlew index b9bb139f790..249efbb032c 100755 --- a/grails-profiles/base/skeleton/gradlew +++ b/grails-profiles/base/skeleton/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/grails-profiles/base/skeleton/gradlew.bat b/grails-profiles/base/skeleton/gradlew.bat index 24c62d56f2d..a51ec4f5886 100755 --- a/grails-profiles/base/skeleton/gradlew.bat +++ b/grails-profiles/base/skeleton/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.jar b/grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.jar index b1b8ef56b44..eddabd2eef8 100644 Binary files a/grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.jar and b/grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.jar differ diff --git a/grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.properties b/grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.properties index 07143d4dc85..3593509a4d4 100644 --- a/grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.properties +++ b/grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.properties @@ -2,7 +2,7 @@ # and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/grails-profiles/profile/skeleton/gradlew b/grails-profiles/profile/skeleton/gradlew index b9bb139f790..249efbb032c 100755 --- a/grails-profiles/profile/skeleton/gradlew +++ b/grails-profiles/profile/skeleton/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/grails-profiles/profile/skeleton/gradlew.bat b/grails-profiles/profile/skeleton/gradlew.bat index 24c62d56f2d..a51ec4f5886 100755 --- a/grails-profiles/profile/skeleton/gradlew.bat +++ b/grails-profiles/profile/skeleton/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/grails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.jar b/grails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.jar index b1b8ef56b44..eddabd2eef8 100644 Binary files a/grails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.jar and b/grails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.jar differ diff --git a/grails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.properties b/grails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.properties index c63634909a2..ff4736a718c 100644 --- a/grails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.properties +++ b/grails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.properties @@ -19,7 +19,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/grails-shell-cli/src/test/resources/gradle-sample/gradlew b/grails-shell-cli/src/test/resources/gradle-sample/gradlew index b9bb139f790..249efbb032c 100755 --- a/grails-shell-cli/src/test/resources/gradle-sample/gradlew +++ b/grails-shell-cli/src/test/resources/gradle-sample/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/grails-shell-cli/src/test/resources/gradle-sample/gradlew.bat b/grails-shell-cli/src/test/resources/gradle-sample/gradlew.bat old mode 100644 new mode 100755 index 24c62d56f2d..a51ec4f5886 --- a/grails-shell-cli/src/test/resources/gradle-sample/gradlew.bat +++ b/grails-shell-cli/src/test/resources/gradle-sample/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel