diff --git a/.github/workflows/mavenCentral.yml b/.github/workflows/mavenCentral.yml index f347e4dc..9baec0cf 100644 --- a/.github/workflows/mavenCentral.yml +++ b/.github/workflows/mavenCentral.yml @@ -17,7 +17,7 @@ jobs: - name: "☕️ Setup JDK" uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'liberica' java-version: '17' - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 921724da..ca73c647 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: "☕️ Setup JDK" uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'liberica' java-version: '17' - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 @@ -127,7 +127,7 @@ jobs: - name: "☕️ Setup JDK" uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'liberica' java-version: '17' - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 @@ -185,7 +185,7 @@ jobs: - name: "☕️ Setup JDK" uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'liberica' java-version: '17' - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 @@ -418,7 +418,7 @@ jobs: - name: "☕️ Setup JDK" uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'liberica' java-version: '17' - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 diff --git a/.github/workflows/sdkman.yml b/.github/workflows/sdkman.yml index 613d6f9f..9019e8a4 100644 --- a/.github/workflows/sdkman.yml +++ b/.github/workflows/sdkman.yml @@ -18,7 +18,7 @@ jobs: - name: "☕️ Setup JDK" uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'liberica' java-version: '17' - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 7b2eebc8..1f6e8b89 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -10,14 +10,17 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + java: ['17', '21'] steps: - name: "📥 Checkout repository" uses: actions/checkout@v4 - name: "☕️ Setup JDK" uses: actions/setup-java@v4 with: - distribution: 'temurin' - java-version: '17' + distribution: 'liberica' + java-version: ${{ matrix.java }} - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 - name: "🔨 Run Build" @@ -34,7 +37,7 @@ jobs: ./tmp/cli/bin/grails --version - name: "📤 Publish to Sonatype OSSRH" id: publish - if: steps.build.outcome == 'success' && github.event_name == 'push' + if: steps.build.outcome == 'success' && github.event_name == 'push' && matrix.java == '17' env: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} @@ -61,7 +64,7 @@ jobs: - name: "☕️ Setup JDK" uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'liberica' java-version: '17' - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 @@ -117,7 +120,7 @@ jobs: - name: "☕️ Setup JDK" uses: actions/setup-java@v4 with: - distribution: 'temurin' + distribution: 'liberica' java-version: '17' - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index afba1092..a4b76b95 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 c7d437bb..df97d72b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d..f5feea6d 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -83,10 +85,9 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +134,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +148,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +156,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,11 +201,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f..9d21a218 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/grails-cli/build.gradle b/grails-cli/build.gradle index 149c2d8a..1ca91e2a 100644 --- a/grails-cli/build.gradle +++ b/grails-cli/build.gradle @@ -76,7 +76,6 @@ application { } rocker { - javaVersion = '17' postProcessing = ['org.grails.forge.rocker.plugin.WhitespaceProcessor'] } diff --git a/grails-forge-analytics-postgres/src/test/groovy/org/grails/forge/analytics/postgres/StoreGeneratedProjectStatsSpec.groovy b/grails-forge-analytics-postgres/src/test/groovy/org/grails/forge/analytics/postgres/StoreGeneratedProjectStatsSpec.groovy index 773f51a8..27eac7e6 100644 --- a/grails-forge-analytics-postgres/src/test/groovy/org/grails/forge/analytics/postgres/StoreGeneratedProjectStatsSpec.groovy +++ b/grails-forge-analytics-postgres/src/test/groovy/org/grails/forge/analytics/postgres/StoreGeneratedProjectStatsSpec.groovy @@ -59,7 +59,7 @@ class StoreGeneratedProjectStatsSpec extends Specification implements TestProper GormImpl.HIBERNATE, ServletImpl.TOMCAT, TestFramework.SPOCK, - JdkVersion.JDK_11 + JdkVersion.DEFAULT_OPTION ) generated.setSelectedFeatures([new SelectedFeature("google-cloud-function")]) diff --git a/grails-forge-core/build.gradle b/grails-forge-core/build.gradle index e1cefe9c..94defced 100644 --- a/grails-forge-core/build.gradle +++ b/grails-forge-core/build.gradle @@ -48,7 +48,6 @@ def grailsVersionInfo = tasks.register("grailsVersionInfo", WriteGrailsVersionIn sourceSets.main.resources.srcDir(grailsVersionInfo) rocker { - javaVersion = '11' postProcessing = ['org.grails.forge.rocker.plugin.WhitespaceProcessor'] } diff --git a/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/buildGradle.rocker.raw b/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/buildGradle.rocker.raw index 566067d6..554c6e74 100644 --- a/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/buildGradle.rocker.raw +++ b/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/buildGradle.rocker.raw @@ -1,4 +1,4 @@ -@import java.util.function.Function; +@import java.util.function.Function @import org.grails.forge.application.ApplicationType @import org.grails.forge.build.dependencies.CoordinateResolver @import org.grails.forge.application.Project diff --git a/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/settingsGradle.rocker.raw b/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/settingsGradle.rocker.raw index 919cbe93..660a0807 100644 --- a/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/settingsGradle.rocker.raw +++ b/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/settingsGradle.rocker.raw @@ -1,4 +1,4 @@ -@import java.util.function.Function; +@import java.util.function.Function @import org.grails.forge.application.Project @import org.grails.forge.build.dependencies.CoordinateResolver @import org.grails.forge.build.dependencies.Coordinate diff --git a/grails-forge-core/src/main/java/org/grails/forge/feature/github/workflows/templates/javaSetup.rocker.raw b/grails-forge-core/src/main/java/org/grails/forge/feature/github/workflows/templates/javaSetup.rocker.raw index 3aa954a0..0c3cd7b6 100644 --- a/grails-forge-core/src/main/java/org/grails/forge/feature/github/workflows/templates/javaSetup.rocker.raw +++ b/grails-forge-core/src/main/java/org/grails/forge/feature/github/workflows/templates/javaSetup.rocker.raw @@ -9,5 +9,5 @@ JdkVersion jdkVersion - name: Set up JDK @jdkVersion.majorVersion() uses: actions/setup-java@@v4 with: - distribution: 'temurin' + distribution: 'liberica' java-version: @jdkVersion.majorVersion() diff --git a/grails-forge-core/src/main/java/org/grails/forge/feature/test/template/webdriverBinariesPlugin.rocker.raw b/grails-forge-core/src/main/java/org/grails/forge/feature/test/template/webdriverBinariesPlugin.rocker.raw index f8c46d28..d79ac5ce 100644 --- a/grails-forge-core/src/main/java/org/grails/forge/feature/test/template/webdriverBinariesPlugin.rocker.raw +++ b/grails-forge-core/src/main/java/org/grails/forge/feature/test/template/webdriverBinariesPlugin.rocker.raw @@ -1,5 +1,5 @@ -@import org.grails.forge.application.Project; -@import org.grails.forge.application.OperatingSystem; +@import org.grails.forge.application.Project +@import org.grails.forge.application.OperatingSystem @args(Project project, OperatingSystem os) diff --git a/grails-forge-core/src/main/java/org/grails/forge/options/JdkVersion.java b/grails-forge-core/src/main/java/org/grails/forge/options/JdkVersion.java index 642228dd..b98f5b07 100644 --- a/grails-forge-core/src/main/java/org/grails/forge/options/JdkVersion.java +++ b/grails-forge-core/src/main/java/org/grails/forge/options/JdkVersion.java @@ -26,10 +26,11 @@ * @since 6.0.0 */ public enum JdkVersion { - JDK_11(11), - JDK_17(17); + JDK_17(17), + JDK_21(21), + JDK_23(23); - public static final JdkVersion DEFAULT_OPTION = JDK_11; + public static final JdkVersion DEFAULT_OPTION = JDK_17; private static final List SUPPORTED_JDKS = Arrays.stream(JdkVersion.values()).map(JdkVersion::majorVersion).collect(Collectors.toList()); diff --git a/grails-forge-core/src/main/java/org/grails/forge/options/Options.java b/grails-forge-core/src/main/java/org/grails/forge/options/Options.java index d965d80a..713053cc 100644 --- a/grails-forge-core/src/main/java/org/grails/forge/options/Options.java +++ b/grails-forge-core/src/main/java/org/grails/forge/options/Options.java @@ -66,6 +66,13 @@ public Options(TestFramework testFramework, this(testFramework, GormImpl.DEFAULT_OPTION, ServletImpl.DEFAULT_OPTION, javaVersion, operatingSystem, Collections.emptyMap()); } + + public Options(TestFramework testFramework, + OperatingSystem operatingSystem) { + + this(testFramework, GormImpl.DEFAULT_OPTION, ServletImpl.DEFAULT_OPTION, VersionInfo.getJavaVersion(), operatingSystem, Collections.emptyMap()); + } + public Options(TestFramework testFramework, GormImpl gormImpl, ServletImpl servletImpl, diff --git a/grails-forge-core/src/main/resources/gradle/gradlew b/grails-forge-core/src/main/resources/gradle/gradlew index 1b6c7873..f5feea6d 100755 --- a/grails-forge-core/src/main/resources/gradle/gradlew +++ b/grails-forge-core/src/main/resources/gradle/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +82,12 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +134,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +201,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +217,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/grails-forge-core/src/main/resources/gradle/gradlew.bat b/grails-forge-core/src/main/resources/gradle/gradlew.bat index 107acd32..9d21a218 100644 --- a/grails-forge-core/src/main/resources/gradle/gradlew.bat +++ b/grails-forge-core/src/main/resources/gradle/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.jar b/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.jar index 7454180f..a4b76b95 100644 Binary files a/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.jar and b/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.jar differ diff --git a/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.properties b/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.properties index 3994438e..df97d72b 100644 --- a/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.properties +++ b/grails-forge-core/src/main/resources/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/BuildBuilder.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/BuildBuilder.groovy index a4af1118..704c3fa0 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/BuildBuilder.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/BuildBuilder.groovy @@ -88,7 +88,7 @@ class BuildBuilder implements ProjectFixture, ContextFixture { TestFramework testFramework = this.testFramework ?: TestFramework.SPOCK ApplicationType type = this.applicationType ?: ApplicationType.WEB Project project = this.project ?: buildProject() - JdkVersion jdkVersion = this.jdkVersion ?: JdkVersion.JDK_11 + JdkVersion jdkVersion = this.jdkVersion ?: JdkVersion.DEFAULT_OPTION final Options options = new Options(testFramework, gormImpl, servletImpl, jdkVersion, operatingSystem) Features features = getFeatures(featureNames, options, type) @@ -104,7 +104,7 @@ class BuildBuilder implements ProjectFixture, ContextFixture { TestFramework testFramework = this.testFramework ?: TestFramework.SPOCK ApplicationType type = this.applicationType ?: ApplicationType.WEB Project project = this.project ?: buildProject() - JdkVersion jdkVersion = this.jdkVersion ?: JdkVersion.JDK_11 + JdkVersion jdkVersion = this.jdkVersion ?: JdkVersion.DEFAULT_OPTION Options options = new Options(testFramework, jdkVersion) Features features = getFeatures(featureNames, options, type) diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/build/gradle/GradleSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/build/gradle/GradleSpec.groovy index 71e62ac7..e466d293 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/build/gradle/GradleSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/build/gradle/GradleSpec.groovy @@ -11,7 +11,7 @@ class GradleSpec extends ApplicationContextSpec implements CommandOutputFixture void "test build properties"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final String gradleProps = output["gradle.properties"] expect: @@ -23,7 +23,7 @@ class GradleSpec extends ApplicationContextSpec implements CommandOutputFixture void "test build gradle"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final String buildGradle = output["build.gradle"] expect: @@ -34,7 +34,7 @@ class GradleSpec extends ApplicationContextSpec implements CommandOutputFixture void "test settings.gradle"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final String settingsGradle = output["settings.gradle"] expect: @@ -49,7 +49,7 @@ class GradleSpec extends ApplicationContextSpec implements CommandOutputFixture void "test settings.gradle for REST-API"() { given: - final def output = generate(ApplicationType.REST_API, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.REST_API, new Options(TestFramework.SPOCK)) final String settingsGradle = output["settings.gradle"] expect: @@ -65,7 +65,7 @@ class GradleSpec extends ApplicationContextSpec implements CommandOutputFixture void "test settings.gradle for REST-API for markup-views"() { given: - final def output = generate(ApplicationType.REST_API, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ["views-markup"]) + final def output = generate(ApplicationType.REST_API, new Options(TestFramework.SPOCK), ["views-markup"]) final String settingsGradle = output["settings.gradle"] expect: diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/asciidoctor/AsciidoctorSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/asciidoctor/AsciidoctorSpec.groovy index 638f3e1e..7b186a95 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/asciidoctor/AsciidoctorSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/asciidoctor/AsciidoctorSpec.groovy @@ -20,7 +20,7 @@ class AsciidoctorSpec extends ApplicationContextSpec implements CommandOutputFix void "test asciidoctor gradle configurations"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ["asciidoctor"]) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK), ["asciidoctor"]) final def buildGradle = output["build.gradle"] final def settingGradle = output["settings.gradle"] @@ -31,7 +31,7 @@ class AsciidoctorSpec extends ApplicationContextSpec implements CommandOutputFix void "test asciidoctor gradle configurations"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ["asciidoctor"]) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK), ["asciidoctor"]) final def asciidocGradle = output["gradle/asciidoc.gradle"] expect: diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/assetPipeline/AssetPipelineSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/assetPipeline/AssetPipelineSpec.groovy index 431b846f..0ca896b9 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/assetPipeline/AssetPipelineSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/assetPipeline/AssetPipelineSpec.groovy @@ -56,7 +56,7 @@ assets { void "test assets files are present"() { given: - final Map output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final Map output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) expect: output.containsKey("grails-app/assets/images/advancedgrails.svg") @@ -96,7 +96,7 @@ assets { @Unroll void "test feature asset-pipeline-grails is not supported for #applicationType application"(ApplicationType applicationType) { when: - generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ["asset-pipeline-grails"]) + generate(applicationType, new Options(TestFramework.SPOCK), ["asset-pipeline-grails"]) then: def e = thrown(IllegalArgumentException) diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/HibernateGormSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/HibernateGormSpec.groovy index 8c69a9b5..02a0e8c8 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/HibernateGormSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/HibernateGormSpec.groovy @@ -46,7 +46,7 @@ class HibernateGormSpec extends ApplicationContextSpec implements CommandOutputF void "test buildSrc is present for buildscript dependencies"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final def buildSrcBuildGradle = output["buildSrc/build.gradle"] expect: @@ -70,7 +70,7 @@ class HibernateGormSpec extends ApplicationContextSpec implements CommandOutputF void "test match values of datasource config"() { when: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final String applicationYaml = output["grails-app/conf/application.yml"] def config = new YamlSlurper().parseText(applicationYaml) diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/TestContainersSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/TestContainersSpec.groovy index ab0e5a34..e6ba79cd 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/TestContainersSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/database/TestContainersSpec.groovy @@ -106,7 +106,6 @@ class TestContainersSpec extends ApplicationContextSpec { void "test there is a dependency for every non embedded driver feature"() { when: String gradleTemplate = new BuildBuilder(beanContext) - .jdkVersion(JdkVersion.JDK_11) .features(['testcontainers', driverFeature.getName()]) .render() diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/github/workflows/PlainGithubWorkflowSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/github/workflows/PlainGithubWorkflowSpec.groovy index 00ec40fb..61403baf 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/github/workflows/PlainGithubWorkflowSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/github/workflows/PlainGithubWorkflowSpec.groovy @@ -16,7 +16,7 @@ class PlainGithubWorkflowSpec extends BeanContextSpec implements CommandOutputFi void 'test github workflow is created for #buildTool'(BuildTool buildTool, String workflowName) { when: def output = generate(ApplicationType.WEB, - new Options(TestFramework.SPOCK, JdkVersion.JDK_11), + new Options(TestFramework.SPOCK), [PlainGithubWorkflowFeature.NAME]) def workflow = output[".github/workflows/${workflowName}"] diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsBaseSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsBaseSpec.groovy index 80627b70..f0be51a5 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsBaseSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsBaseSpec.groovy @@ -12,7 +12,7 @@ class GrailsBaseSpec extends BeanContextSpec implements CommandOutputFixture { void "test grails base dependencies"() { when: - def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) def buildGradle = output['build.gradle'] then: @@ -23,7 +23,7 @@ class GrailsBaseSpec extends BeanContextSpec implements CommandOutputFixture { void "test src/main directories are present"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) expect: output.containsKey("src/main/groovy/.gitkeep") diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsDefaultPluginsSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsDefaultPluginsSpec.groovy index 90563626..7970db44 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsDefaultPluginsSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsDefaultPluginsSpec.groovy @@ -11,7 +11,7 @@ class GrailsDefaultPluginsSpec extends ApplicationContextSpec implements Command void "test that default grails plugins are present"() { given: - final Map output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final Map output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final String buildGradle = output["build.gradle"] expect: @@ -24,7 +24,7 @@ class GrailsDefaultPluginsSpec extends ApplicationContextSpec implements Command void "test i18n message properties files are present"() { given: - final Map output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final Map output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) expect: output.containsKey("grails-app/i18n/messages.properties") diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsGradlePluginSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsGradlePluginSpec.groovy index 3fa8f6e0..957e9feb 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsGradlePluginSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grails/GrailsGradlePluginSpec.groovy @@ -12,7 +12,7 @@ class GrailsGradlePluginSpec extends BeanContextSpec implements CommandOutputFix void "test build gradle file and gradle properties"() { when: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final String gradleProps = output["gradle.properties"] then: @@ -31,7 +31,7 @@ class GrailsGradlePluginSpec extends BeanContextSpec implements CommandOutputFix void "test buildSrc is present for buildscript dependencies"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final def buildSrcBuildGradle = output["buildSrc/build.gradle"] expect: diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsProfiles/GrailsProfilesSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsProfiles/GrailsProfilesSpec.groovy index b9fa872c..1cd3d87b 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsProfiles/GrailsProfilesSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsProfiles/GrailsProfilesSpec.groovy @@ -2,7 +2,6 @@ package org.grails.forge.feature.grailsProfiles import org.grails.forge.ApplicationContextSpec import org.grails.forge.application.ApplicationType -import org.grails.forge.application.generator.GeneratorContext import org.grails.forge.fixture.CommandOutputFixture import org.grails.forge.options.JdkVersion import org.grails.forge.options.Options @@ -14,7 +13,7 @@ class GrailsProfilesSpec extends ApplicationContextSpec implements CommandOutput @Unroll void "test profile dependency is present for #applicationType application"() { when: - def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + def output = generate(applicationType, new Options(TestFramework.SPOCK)) then: output.containsKey("build.gradle") @@ -27,7 +26,7 @@ class GrailsProfilesSpec extends ApplicationContextSpec implements CommandOutput void "test config"() { when: - def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + def output = generate(applicationType, new Options(TestFramework.SPOCK)) then: output.containsKey("grails-app/conf/application.yml") diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsWrapper/GrailsWrapperSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsWrapper/GrailsWrapperSpec.groovy index 5dbd6f1e..3a7298d0 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsWrapper/GrailsWrapperSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/grailsWrapper/GrailsWrapperSpec.groovy @@ -13,7 +13,7 @@ class GrailsWrapperSpec extends ApplicationContextSpec implements CommandOutputF @Unroll void "test grails-wrapper.jar, grailsw and grailsw.bat files are present for #applicationType application"() { when: - def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ['grails-wrapper']) + def output = generate(applicationType, new Options(TestFramework.SPOCK), ['grails-wrapper']) then: output.containsKey("grails-wrapper.jar") diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/lang/GrailsApplicationSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/lang/GrailsApplicationSpec.groovy index 41766499..a603f9bc 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/lang/GrailsApplicationSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/lang/GrailsApplicationSpec.groovy @@ -93,7 +93,7 @@ class GrailsApplicationSpec extends BeanContextSpec implements CommandOutputFixt void "test build plugins"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) def buildGradle = output['build.gradle'] expect: diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/logging/LogbackGroovyConfigSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/logging/LogbackGroovyConfigSpec.groovy index aab15b42..e0f8a8be 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/logging/LogbackGroovyConfigSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/logging/LogbackGroovyConfigSpec.groovy @@ -11,7 +11,7 @@ class LogbackGroovyConfigSpec extends ApplicationContextSpec implements CommandO @Unroll void "test grails-logging dependency is present for #applicationType application"() { when: - def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ['logbackGroovy']) + def output = generate(applicationType, new Options(TestFramework.SPOCK), ['logbackGroovy']) then: output.containsKey("build.gradle") @@ -26,7 +26,7 @@ class LogbackGroovyConfigSpec extends ApplicationContextSpec implements CommandO @Unroll void "test logback.xml config file is present for #applicationType application"() { when: - def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ['logbackGroovy']) + def output = generate(applicationType, new Options(TestFramework.SPOCK), ['logbackGroovy']) then: output.containsKey("grails-app/conf/logback-config.groovy") diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/logging/LogbackSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/logging/LogbackSpec.groovy index 381a3dd6..e57ecc2e 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/logging/LogbackSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/logging/LogbackSpec.groovy @@ -11,7 +11,7 @@ class LogbackSpec extends ApplicationContextSpec implements CommandOutputFixture @Unroll void "test grails-logging dependency is present for #applicationType application"() { when: - def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + def output = generate(applicationType, new Options(TestFramework.SPOCK)) then: output.containsKey("build.gradle") @@ -25,7 +25,7 @@ class LogbackSpec extends ApplicationContextSpec implements CommandOutputFixture @Unroll void "test logback-spring.xml config file is present for #applicationType application"() { when: - def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + def output = generate(applicationType, new Options(TestFramework.SPOCK)) then: output.containsKey("grails-app/conf/logback-spring.xml") diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/spring/SpringBootSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/spring/SpringBootSpec.groovy index 5b8f61ae..dd74becb 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/spring/SpringBootSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/spring/SpringBootSpec.groovy @@ -15,7 +15,7 @@ class SpringBootSpec extends BeanContextSpec implements CommandOutputFixture { when: def output = generate( applicationType, - new Options(TestFramework.SPOCK, JdkVersion.JDK_11) + new Options(TestFramework.SPOCK) ) final String build = output['build.gradle'] @@ -34,7 +34,7 @@ class SpringBootSpec extends BeanContextSpec implements CommandOutputFixture { when: def output = generate( ApplicationType.PLUGIN, - new Options(TestFramework.SPOCK, JdkVersion.JDK_11) + new Options(TestFramework.SPOCK) ) final String build = output['build.gradle'] diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/spring/SpringResourcesSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/spring/SpringResourcesSpec.groovy index 852a3131..3a2f473d 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/spring/SpringResourcesSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/spring/SpringResourcesSpec.groovy @@ -13,7 +13,7 @@ class SpringResourcesSpec extends ApplicationContextSpec implements CommandOutpu @Unroll void "test /conf/spring/resources.groovy config file is present for #applicationType application"() { when: - def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + def output = generate(applicationType, new Options(TestFramework.SPOCK)) then: output.containsKey("grails-app/conf/spring/resources.groovy") diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebSpec.groovy index b01b877e..b52a619a 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/test/GebSpec.groovy @@ -13,7 +13,7 @@ class GebSpec extends ApplicationContextSpec implements CommandOutputFixture { void "test dependencies"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final def buildGradle = output["build.gradle"] expect: @@ -27,7 +27,7 @@ class GebSpec extends ApplicationContextSpec implements CommandOutputFixture { void "test GebConfig.groovy file is present"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) expect: output.containsKey('src/integration-test/resources/GebConfig.groovy') @@ -35,7 +35,7 @@ class GebSpec extends ApplicationContextSpec implements CommandOutputFixture { void "test build.gradle contains logic to force selenium version"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final def buildGradle = output["build.gradle"] expect: @@ -47,7 +47,7 @@ class GebSpec extends ApplicationContextSpec implements CommandOutputFixture { @Unroll void "test feature geb is not supported for #applicationType application"(ApplicationType applicationType) { when: - generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ["geb"]) + generate(applicationType, new Options(TestFramework.SPOCK), ["geb"]) then: def e = thrown(IllegalArgumentException) @@ -59,7 +59,7 @@ class GebSpec extends ApplicationContextSpec implements CommandOutputFixture { void "test webdriver binaries gradle configurations"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final def buildGradle = output["build.gradle"] final def settingGradle = output["settings.gradle"] @@ -74,7 +74,7 @@ class GebSpec extends ApplicationContextSpec implements CommandOutputFixture { void "test webdriver binaries gradle configurations for windows OS"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11, OperatingSystem.WINDOWS)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, OperatingSystem.WINDOWS)) final def buildGradle = output["build.gradle"] final def settingGradle = output["settings.gradle"] diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/GrailsGspSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/GrailsGspSpec.groovy index 6310a876..7cffb4ba 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/GrailsGspSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/GrailsGspSpec.groovy @@ -73,7 +73,7 @@ class GrailsGspSpec extends ApplicationContextSpec implements CommandOutputFixtu void "test default views are present"() { when: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) then: output.containsKey("grails-app/views/index.gsp") @@ -84,7 +84,7 @@ class GrailsGspSpec extends ApplicationContextSpec implements CommandOutputFixtu @Unroll void "test grails-gsp gradle plugins and dependencies are present for #applicationType application"() { when: - final def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(applicationType, new Options(TestFramework.SPOCK)) final String build = output['build.gradle'] then: @@ -100,7 +100,7 @@ class GrailsGspSpec extends ApplicationContextSpec implements CommandOutputFixtu @Unroll void "test grails-gsp gradle plugins and dependencies are NOT present for #applicationType application"() { when: - final def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(applicationType, new Options(TestFramework.SPOCK)) final String build = output['build.gradle'] then: diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/json/ViewJsonSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/json/ViewJsonSpec.groovy index 52ec73ec..29843557 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/json/ViewJsonSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/json/ViewJsonSpec.groovy @@ -38,7 +38,7 @@ class ViewJsonSpec extends ApplicationContextSpec implements CommandOutputFixtur void "test default gson views are present"() { when: - final def output = generate(ApplicationType.REST_API, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.REST_API, new Options(TestFramework.SPOCK)) then: output.containsKey("grails-app/views/application/index.gson") @@ -51,7 +51,7 @@ class ViewJsonSpec extends ApplicationContextSpec implements CommandOutputFixtur @Unroll void "test views-json gradle plugins and dependencies are present for #applicationType application"() { when: - final def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(applicationType, new Options(TestFramework.SPOCK)) final String build = output['build.gradle'] then: @@ -68,7 +68,7 @@ class ViewJsonSpec extends ApplicationContextSpec implements CommandOutputFixtur @Unroll void "test views-json gradle plugins and dependencies are NOT present for #applicationType application"() { when: - final def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(applicationType, new Options(TestFramework.SPOCK)) final String build = output['build.gradle'] then: diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/json/ViewMarkupSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/json/ViewMarkupSpec.groovy index 4f7d9e1c..209ad303 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/json/ViewMarkupSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/view/json/ViewMarkupSpec.groovy @@ -35,7 +35,7 @@ class ViewMarkupSpec extends ApplicationContextSpec implements CommandOutputFixt void "test default gml views are present"() { when: - final def output = generate(ApplicationType.REST_API, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ["views-markup"]) + final def output = generate(ApplicationType.REST_API, new Options(TestFramework.SPOCK), ["views-markup"]) then: output.containsKey("grails-app/views/application/index.gml") @@ -48,7 +48,7 @@ class ViewMarkupSpec extends ApplicationContextSpec implements CommandOutputFixt @Unroll void "test views-markup gradle plugins and dependencies are present for #applicationType application"() { when: - final def output = generate(applicationType, new Options(TestFramework.SPOCK, JdkVersion.JDK_11), ["views-markup"]) + final def output = generate(applicationType, new Options(TestFramework.SPOCK), ["views-markup"]) final String build = output['build.gradle'] then: diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/feature/web/GrailsWebSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/feature/web/GrailsWebSpec.groovy index b5743afc..6ed36bd7 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/feature/web/GrailsWebSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/feature/web/GrailsWebSpec.groovy @@ -12,7 +12,7 @@ class GrailsWebSpec extends ApplicationContextSpec implements CommandOutputFixtu void "test grails-web feature"() { given: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final def buildGradle = output["build.gradle"] expect: @@ -21,7 +21,7 @@ class GrailsWebSpec extends ApplicationContextSpec implements CommandOutputFixtu void "test grails-web configuration"() { when: - final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK, JdkVersion.JDK_11)) + final def output = generate(ApplicationType.WEB, new Options(TestFramework.SPOCK)) final String applicationYaml = output["grails-app/conf/application.yml"] def config = new YamlSlurper().parseText(applicationYaml) diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/options/JdkVersionSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/options/JdkVersionSpec.groovy index 98b8e3c8..70279aa2 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/options/JdkVersionSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/options/JdkVersionSpec.groovy @@ -6,7 +6,7 @@ class JdkVersionSpec extends Specification { void 'test valueOf with a supported JDK version'() { expect: - JdkVersion.JDK_17 == JdkVersion.valueOf(17) + JdkVersion.DEFAULT_OPTION == JdkVersion.valueOf(JdkVersion.DEFAULT_OPTION.majorVersion()) } void 'test valueOf when the JDK version does not exist'() { @@ -15,6 +15,6 @@ class JdkVersionSpec extends Specification { then: def ex = thrown(IllegalArgumentException) - ex.message == "Unsupported JDK version: 3. Supported values are [11, 17]" + ex.message == "Unsupported JDK version: 3. Supported values are " + JdkVersion.SUPPORTED_JDKS } }