diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9d833c4653..6caa41671f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,8 +15,8 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: 'adopt' - java-version: '11' + distribution: 'temurin' + java-version: '17' - name: Checkout repository uses: actions/checkout@v4 with: diff --git a/.github/workflows/groovy-joint-workflow.yml b/.github/workflows/groovy-joint-workflow.yml index 98c8a1ef99..79145e1b5c 100644 --- a/.github/workflows/groovy-joint-workflow.yml +++ b/.github/workflows/groovy-joint-workflow.yml @@ -5,7 +5,7 @@ # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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, @@ -20,10 +20,10 @@ name: "Grails Joint Validation Build" on: push: branches: - - '[6-9]+.[1-9]+.x' + - '[6-9]+.[0-9]+.x' pull_request: branches: - - '[6-9]+.[1-9]+.x' + - '[6-9]+.[0-9]+.x' workflow_dispatch: permissions: contents: read @@ -40,8 +40,8 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: 'adopt' - java-version: '11.0.6' + distribution: temurin + java-version: 17 - name: Cache local Maven repository & Groovy uses: actions/cache@v4 with: @@ -49,57 +49,72 @@ jobs: ~/groovy ~/.m2/repository key: cache-local-groovy-maven-${{ github.sha }} - - name: Checkout Groovy 3_0_X (Grails 5 and later) - if: startsWith(github.ref, 'refs/heads/6.') || startsWith(github.base_ref, '6.') || startsWith(github.ref, 'refs/heads/5.') || startsWith(github.base_ref, '5.') - run: cd .. && git clone --depth 1 https://github.com/apache/groovy.git -b GROOVY_3_0_X --single-branch + - name: Checkout Groovy 4_0_X (Grails 7 and later) + run: cd .. && git clone --depth 1 https://github.com/apache/groovy.git -b GROOVY_4_0_X --single-branch - name: Set CI_GROOVY_VERSION for Grails id: groovy-version run: | cd ../groovy echo "CI_GROOVY_VERSION=$(cat gradle.properties | grep groovyVersion | cut -d\= -f2 | tr -d '[:space:]')" >> $GITHUB_ENV echo "value=$(cat gradle.properties | grep groovyVersion | cut -d\= -f2 | tr -d '[:space:]')" >> $GITHUB_OUTPUT - - name: Prepare GE Set-up Configuration - id: ge_conf + - name: Prepare Develocity Setup 1 + id: develocity_conf_1 run: | echo "VALUE<> $GITHUB_OUTPUT echo "plugins { " >> $GITHUB_OUTPUT - echo " id 'com.gradle.enterprise' version '3.15.1'" >> $GITHUB_OUTPUT - echo " id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.11.3'" >> $GITHUB_OUTPUT - echo "}" >> $GITHUB_OUTPUT - echo "" >> $GITHUB_OUTPUT - echo "gradleEnterprise {" >> $GITHUB_OUTPUT - echo " server = 'https://ge.grails.org'" >> $GITHUB_OUTPUT - echo " buildScan {" >> $GITHUB_OUTPUT - echo " publishAlways()" >> $GITHUB_OUTPUT - echo " publishIfAuthenticated()" >> $GITHUB_OUTPUT - echo " uploadInBackground = System.getenv('CI') == null" >> $GITHUB_OUTPUT - echo " capture {" >> $GITHUB_OUTPUT - echo " taskInputFiles = true" >> $GITHUB_OUTPUT - echo " }" >> $GITHUB_OUTPUT - echo " }" >> $GITHUB_OUTPUT - echo "}" >> $GITHUB_OUTPUT + echo " id 'com.gradle.enterprise' version '3.15.1'" >> $GITHUB_OUTPUT + echo " id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.11.3'" >> $GITHUB_OUTPUT + echo "}" >> $GITHUB_OUTPUT + echo "" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + - name: Prepare Develocity Setup 2 + id: develocity_conf_2 + run: | + echo "VALUE<> $GITHUB_OUTPUT + echo "gradleEnterprise {" >> $GITHUB_OUTPUT + echo " server = 'https://ge.grails.org'" >> $GITHUB_OUTPUT + echo " buildScan {" >> $GITHUB_OUTPUT + echo " publishAlways()" >> $GITHUB_OUTPUT + echo " publishIfAuthenticated()" >> $GITHUB_OUTPUT + echo " uploadInBackground = System.getenv('CI') == null" >> $GITHUB_OUTPUT + echo " capture {" >> $GITHUB_OUTPUT + echo " taskInputFiles = true" >> $GITHUB_OUTPUT + echo " }" >> $GITHUB_OUTPUT + echo " }" >> $GITHUB_OUTPUT + echo "}" >> $GITHUB_OUTPUT echo "" >> $GITHUB_OUTPUT - echo "buildCache {" >> $GITHUB_OUTPUT - echo " local { enabled = System.getenv('CI') != 'true' }" >> $GITHUB_OUTPUT - echo " remote(gradleEnterprise.buildCache) {" >> $GITHUB_OUTPUT + echo "buildCache {" >> $GITHUB_OUTPUT + echo " local { enabled = System.getenv('CI') != 'true' }" >> $GITHUB_OUTPUT + echo " remote(HttpBuildCache) {" >> $GITHUB_OUTPUT echo " push = System.getenv('CI') == 'true'" >> $GITHUB_OUTPUT - echo " enabled = true" >> $GITHUB_OUTPUT - echo " }" >> $GITHUB_OUTPUT - echo "}" >> $GITHUB_OUTPUT + echo " enabled = true" >> $GITHUB_OUTPUT + echo " url = 'https://ge.grails.org/cache/'" >> $GITHUB_OUTPUT + echo " credentials {" >> $GITHUB_OUTPUT + echo " username = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER')" >> $GITHUB_OUTPUT + echo " password = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY')" >> $GITHUB_OUTPUT + echo " }" >> $GITHUB_OUTPUT + echo " }" >> $GITHUB_OUTPUT + echo "}" >> $GITHUB_OUTPUT echo "" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - - name: Gradle Enterprise Set-up + - name: Develocity Set-up run: | cd ../groovy - # Delete exiting plugins and build-scan from settings.gradle file - sed -i '21,31d' settings.gradle - # Add Gradle Enterprise set-up related configuration after line no 20 in settings.gradle - echo "${{ steps.ge_conf.outputs.value}}" | sed -i -e "20r /dev/stdin" settings.gradle + # Delete existing plugins from settings.gradle file + sed -i '32,37d' settings.gradle + # Add Gradle Enterprise set-up related configuration after line no 31 in settings.gradle + echo "${{ steps.develocity_conf_1.outputs.value }}" | sed -i -e "31r /dev/stdin" settings.gradle + # Delete existing buildCache configuration from gradle/build-scans.gradle file + sed -i '23,46d' gradle/build-scans.gradle + # Add Gradle Enterprise set-up related configuration after line no 22 in gradle/build-scans.gradle + echo "${{ steps.develocity_conf_2.outputs.value }}" | sed -i -e "22r /dev/stdin" gradle/build-scans.gradle - name: Build and install groovy (no docs) uses: gradle/gradle-build-action@v3 env: GRADLE_SCANS_ACCEPT: yes GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} with: build-root-directory: ../groovy arguments: | @@ -120,8 +135,8 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: 'adopt' - java-version: '11' + distribution: temurin + java-version: 17 - name: Cache local Maven repository & Groovy uses: actions/cache@v4 with: @@ -137,6 +152,8 @@ jobs: uses: gradle/gradle-build-action@v3 env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} + GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} with: arguments: | build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a882a46261..75381cda55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,8 @@ on: release: types: [published] env: - GIT_USER_NAME: puneetbehl - GIT_USER_EMAIL: behlp@unityfoundation.io + GIT_USER_NAME: 'grails-build' + GIT_USER_EMAIL: 'grails-build@users.noreply.github.com' jobs: publish: outputs: @@ -18,7 +18,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: 'adopt' + distribution: 'temurin' java-version: '17' - name: Set the current release version id: release_version @@ -104,8 +104,8 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - distribution: 'adopt' - java-version: '11' + distribution: 'temurin' + java-version: '17' - name: Publish Documentation id: docs uses: gradle/gradle-build-action@v3 @@ -123,4 +123,4 @@ jobs: FOLDER: build/docs VERSION: ${{ needs.publish.outputs.release_version }} COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }} - COMMIT_NAME: "Puneet Behl" \ No newline at end of file + COMMIT_NAME: ${{ env.GIT_USER_NAME }} \ No newline at end of file diff --git a/build.gradle b/build.gradle index e1f9d87c0d..a42e56592d 100644 --- a/build.gradle +++ b/build.gradle @@ -11,23 +11,39 @@ buildscript { } } +ext { + groovyVersion = System.getenv('CI_GROOVY_VERSION') ?: project.groovyVersion + isCiBuild = System.getenv().get("TRAVIS") == 'true' || (System.getenv().get("CI") as Boolean) + isSnapshot = project.projectVersion.endsWith('-SNAPSHOT') + isReleaseVersion = !isSnapshot +} + repositories { mavenCentral() maven { url "https://repo.grails.org/grails/core" } + if(groovyVersion.endsWith('-SNAPSHOT')) { + maven { + name = 'ASF Snapshot repo' + url = 'https://repository.apache.org/content/repositories/snapshots' + } + } } group = "org.grails" version project.projectVersion -ext { - groovyVersion = System.getenv('CI_GROOVY_VERSION') ?: project.groovyVersion - isCiBuild = System.getenv().get("TRAVIS") == 'true' || (System.getenv().get("CI") as Boolean) - commonBuild = 'https://raw.githubusercontent.com/grails/grails-common-build/v2.0.3' -} +apply plugin: 'java-library' +apply plugin: 'groovy' + +ext."signing.keyId" = project.hasProperty("signing.keyId") ?: System.getenv('SIGNING_KEY') +ext."signing.secretKeyRingFile" = project.hasProperty("signing.secretKeyRingFile") ?: "${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg" +ext."signing.password" = project.hasProperty("signing.password") ?: System.getenv('SIGNING_PASSPHRASE') -apply plugin:'idea' -subprojects { +apply plugin: 'idea' + + +subprojects { subproject -> version project.projectVersion @@ -46,26 +62,66 @@ subprojects { repositories { mavenCentral() - maven { url = "https://repo.grails.org/grails/core" } + maven { url "https://repo.grails.org/grails/core" } + if(groovyVersion.endsWith('-SNAPSHOT')) { + maven { + name = 'ASF Snapshot repo' + url = 'https://repository.apache.org/content/repositories/snapshots' + } + } } - if (it.name.startsWith("examples")) { + if (subproject.name.startsWith("examples")) { apply plugin: "org.grails.grails-web" } else if (isGrailsPlugin) { apply plugin: "org.grails.grails-plugin" } else { - apply from: "${commonBuild}/common-project.gradle" + apply plugin: 'groovy' + apply plugin: 'java-library' + + repositories { + maven { url "https://repo.grails.org/grails/core" } + } + + configurations { + documentation + } + + dependencies { + api "org.apache.groovy:groovy:$groovyVersion" + api "org.slf4j:slf4j-api:$slf4jVersion" + + testImplementation "org.spockframework:spock-core:${spockVersion}", { + exclude module: 'groovy-all' + } + testImplementation "cglib:cglib-nodep:2.2.2" + testImplementation "org.objenesis:objenesis:1.4" + + documentation "org.fusesource.jansi:jansi:1.14" + + } + + test { + testLogging { + events "passed", "skipped", "failed", "standardOut", "standardError" + } + } + + groovydoc.classpath += (configurations.documentation + configurations.compileClasspath) dependencies { documentation "org.apache.groovy:groovy-dateutil:$groovyVersion" } } - apply plugin:'idea' + apply plugin: 'idea' apply plugin: 'java-library' - sourceCompatibility=1.17 - targetCompatibility=1.17 + java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } + } configurations.all { @@ -98,6 +154,7 @@ subprojects { compileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion" testImplementation "jakarta.servlet:jakarta.servlet-api:$servletApiVersion" + implementation "jakarta.persistence:jakarta.persistence-api:$jakartaPersistenceVersion" testImplementation "org.apache.groovy:groovy-test-junit5:${groovyVersion}" testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}" testImplementation "org.junit.platform:junit-platform-runner:${junitPlatformVerison}" @@ -116,25 +173,315 @@ subprojects { maxParallelForks = 4 } } + + configurations { + documentation + } + + dependencies { + if (configurations.find { subproject.name == 'documentation' }) { + documentation "org.fusesource.jansi:jansi:1.18" + documentation "jline:jline:2.14.6" + documentation "com.github.javaparser:javaparser-core:3.15.14" + documentation "org.apache.groovy:groovy:${groovyVersion}" + documentation "org.apache.groovy:groovy-ant:$groovyVersion" + documentation "org.apache.groovy:groovy-dateutil:$groovyVersion" + documentation "org.apache.groovy:groovy-cli-picocli:$groovyVersion" + } + } + + groovydoc.classpath += configurations.documentation + + ext { + isExample = subproject.name.startsWith('example') + isGrailsPlugin = subproject.name.startsWith('grails-plugin') + pomInfo = { + delegate.name subproject.title + delegate.description subproject.projectDesc + delegate.url projectUrl + + delegate.licenses { + delegate.license { + delegate.name 'The Apache Software License, Version 2.0' + delegate.url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + delegate.distribution 'repo' + } + } + + delegate.scm { + delegate.url "scm:git@github.com:${githubSlug}.git" + delegate.connection "scm:git@github.com:${githubSlug}.git" + delegate.developerConnection "scm:git@github.com:${githubSlug}.git" + } + + if (developers) { + delegate.developers { + for (dev in developers.split(',')) { + delegate.developer { + delegate.id dev.toLowerCase().replace(' ', '') + delegate.name dev + } + } + } + } + } + } + + if (!isExample) { + + apply plugin: 'maven-publish' + apply plugin: 'signing' + + Task sourcesJar = subproject.tasks.findByName("sourcesJar") + if (!sourcesJar) { + sourcesJar = tasks.create("sourcesJar", Jar) { + archiveClassifier = 'sources' + group = BasePlugin.BUILD_GROUP + description = 'Assembles a jar archive containing the main sources of this project.' + from subproject.sourceSets.main.allSource + } + } + + Task javadocJar = subproject.tasks.findByName("javadocJar") + if (!javadocJar) { + javadocJar = tasks.create("javadocJar", Jar) { + archiveClassifier = 'javadoc' + group = BasePlugin.BUILD_GROUP + description = 'Assembles a jar archive containing the generated Javadoc API documentation of this project.' + from subproject.plugins.hasPlugin(GroovyPlugin) ? subproject.tasks.getByName(GroovyPlugin.GROOVYDOC_TASK_NAME) : subproject.tasks.getByName(JavaPlugin.JAVADOC_TASK_NAME) + } + } + tasks.findByName("assemble").finalizedBy(sourcesJar, javadocJar) + + publishing { + if (isSnapshot) { + repositories { + maven { + credentials { + def u = System.getenv("ARTIFACTORY_USERNAME") ?: subproject.hasProperty("artifactoryPublishUsername") ? subproject.artifactoryPublishUsername : '' + def p = System.getenv("ARTIFACTORY_PASSWORD") ?: subproject.hasProperty("artifactoryPublishPassword") ? subproject.artifactoryPublishPassword : '' + username = u + password = p + } + if (isGrailsPlugin) { + url "https://repo.grails.org/grails/plugins3-snapshots-local" + } else { + url "https://repo.grails.org/grails/libs-snapshots-local" + } + } + } + } + + publications { + maven(MavenPublication) { + if (isGrailsPlugin) { + artifactId(subproject.name - 'grails-plugin-') + } else if (subproject.name.contains('/')) { + artifactId(subproject.name.substring(subproject.name.indexOf('/') + 1)) + } + + from components.java + + artifact sourcesJar + artifact javadocJar + + if (isGrailsPlugin) { + artifact source: "${subproject.buildDir}/classes/groovy/main/META-INF/grails-plugin.xml", + classifier: "plugin", + extension: 'xml' + } + pom.withXml { + def xml = asNode() + + xml.children().last() + pomInfo + // dependency management shouldn't be included + def n = xml.get("dependencyManagement") + if (n) xml.remove(n) + } + + } + } + } + + subproject.afterEvaluate { + signing { + required { isReleaseVersion } + sign publishing.publications.maven + } + } + + tasks.withType(Sign) { + onlyIf { isReleaseVersion } + } + + //do not generate extra load on Nexus with new staging repository if signing fails + tasks.withType(io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository).configureEach { + shouldRunAfter(tasks.withType(Sign)) + } + } } -apply from: "${commonBuild}/common-docs.gradle" -apply from: "${commonBuild}/common-publishing.gradle" +def DOCUMENTATION_GROUP = 'Documentation' + +def commonGithubOrg = 'grails' +def commonGithubSlug = 'grails-common-build' +def commonBranch = 'master' +def docResourcesDir = "${buildDir}/resources/${commonGithubSlug}-${commonBranch}/src/main/resources" + +task prepareDocResources { + group = DOCUMENTATION_GROUP + description = 'Downloads common documentation resoruces and unzips them to build folder' + doLast { + ant.mkdir(dir: buildDir) + ant.get(src: "https://github.com/${commonGithubOrg}/${commonGithubSlug}/archive/${commonBranch}.zip", dest: "${buildDir}/resources.zip") + ant.unzip(src: "${buildDir}/resources.zip", dest: "${buildDir}/resources") + } +} + +task copyLocalDocResources(type: Copy, dependsOn: prepareDocResources) { + group = DOCUMENTATION_GROUP + description = 'Copy local resources to build folder' + mustRunAfter prepareDocResources + from('src/main/docs/resources') + into docResourcesDir +} + +configurations { + documentation +} + +dependencies { + if (configurations.find { it.name == 'documentation' }) { + documentation 'info.picocli:picocli:3.8.0' + documentation "org.fusesource.jansi:jansi:1.18" + documentation "jline:jline:2.14.6" + documentation "com.github.javaparser:javaparser-core:3.15.14" + documentation "org.apache.groovy:groovy:${groovyVersion}" + documentation "org.apache.groovy:groovy-ant:$groovyVersion" + documentation "org.apache.groovy:groovy-cli-picocli:$groovyVersion" + } +} + + +def cleanTask = project.tasks.findByName("clean") +if (cleanTask == null) { + task clean(type: Delete) { + delete(buildDir) + } +} else { + cleanTask.doLast { + ant.delete(dir: "build/docs") + } +} + +tasks.withType(Groovydoc) { + group = DOCUMENTATION_GROUP + docTitle = "${project.title} - ${project.version}" + destinationDir = project.file("build/docs/api") + def files = [] + project.rootProject.subprojects + .findAll { it.name != 'docs' && !it.name.startsWith('examples') } + .each { subproject -> + if (subproject.file('src/main/groovy').exists()) { + files += subproject.files("src/main/groovy") + } + } + if (project.file('src/main/groovy').exists()) { + files += project.files("src/main/groovy") + } + source = files + classpath += configurations.documentation +} + +task publishGuide(type: grails.doc.gradle.PublishGuide) { + group = DOCUMENTATION_GROUP + description = 'Generate Guide' + dependsOn copyLocalDocResources + + targetDir = project.file("${buildDir}/docs") + sourceRepo = "https://github.com/${githubSlug}/edit/${githubBranch}/src/main/docs" + sourceDir = new File(projectDir, "src/main/docs") + propertiesFiles = [new File(rootProject.projectDir, "gradle.properties")] + asciidoc = true + resourcesDir = project.file(docResourcesDir) + properties = ['safe' : 'UNSAFE', + 'version' : project.version, + 'subtitle' : project.projectDesc, + 'api' : '../api', + 'sourceDir': rootProject.projectDir.absolutePath, + 'sourcedir': rootProject.projectDir.absolutePath, + 'javaee' : 'https://docs.oracle.com/javaee/7/api/', + 'jakartaee': 'https://jakarta.ee/specifications/platform/10/apidocs/', + 'javase' : 'https://docs.oracle.com/en/java/javase/17/docs/api/index.html', + 'groovyapi': 'http://docs.groovy-lang.org/latest/html/gapi/', + 'grailsapi': 'http://docs.grails.org/latest/api/', + 'gormapi' : 'http://gorm.grails.org/latest/api/', + 'springapi': 'https://docs.spring.io/spring/docs/current/javadoc-api/'] + doLast { + ant.move(file: "${project.buildDir}/docs/guide/single.html", + tofile: "${project.buildDir}/docs/guide/index.html", overwrite: true) + new File(project.buildDir, "docs/index.html").text = ''' + + + + + + + + +''' + } +} + +task docs(dependsOn: [groovydoc, publishGuide]) { + group = DOCUMENTATION_GROUP +} + +def assembleTask = project.tasks.findByName("assemble") +if (assembleTask == null) { + task assemble(dependsOn: docs, type: Zip) { + baseName = "${project.name}-${project.version}" + destinationDir = new File(project.buildDir, "distributions") + from project.files("${buildDir}/docs") + } +} + + +if (isReleaseVersion) { + apply plugin: 'maven-publish' + apply plugin: "io.github.gradle-nexus.publish-plugin" + + nexusPublishing { + repositories { + sonatype { + def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : '' + def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : '' + def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : '' + nexusUrl = uri("https://s01.oss.sonatype.org/service/local/") + username = ossUser + password = ossPass + stagingProfileId = ossStagingProfileId + } + } + transitionCheckOptions { + maxRetries.set(60) + delayBetween.set(java.time.Duration.ofMillis(4000)) + } + } +} tasks.named('publishGuide') { // Override value defined in grails/grails-common-build/common-docs.gradle it.properties['commandLineRef'] = "https://docs.grails.org/$grailsVersion/ref/Command%20Line" it.properties['controllersRef'] = "https://docs.grails.org/$grailsVersion/ref/Controllers" - it.properties['grailsapi'] = "https://docs.grails.org/$grailsVersion/api/" - it.properties['grailsdocs'] = "https://docs.grails.org/$grailsVersion/" - it.properties['groovyapi'] = "https://docs.groovy-lang.org/$groovyVersion/html/gapi/" - it.properties['groovyjdk'] = "https://docs.groovy-lang.org/$groovyVersion/html/groovy-jdk/" - it.properties['javase'] = 'https://docs.oracle.com/en/java/javase/11/docs/api/' + it.properties['grailsapi'] = "https://docs.grails.org/$grailsVersion/api/" + it.properties['grailsdocs'] = "https://docs.grails.org/$grailsVersion/" + it.properties['groovyapi'] = "https://docs.groovy-lang.org/$groovyVersion/html/gapi/" + it.properties['groovyjdk'] = "https://docs.groovy-lang.org/$groovyVersion/html/groovy-jdk/" + it.properties['javase'] = 'https://docs.oracle.com/en/java/javase/11/docs/api/' } boolean isNonStable(String version) { - version ==~ /(?i).+(-|\.?)(b|M|RC|Dev)\d?.*/ || - ['alpha', 'beta', 'milestone', 'rc', 'cr', 'm', 'preview', 'b', 'ea'].any { qualifier -> - version ==~ /(?i).*[.-]$qualifier[.\d-+]*/ - } + version ==~ /(?i).+(-|\.?)(b|M|RC|Dev)\d?.*/ || ['alpha', 'beta', 'milestone', 'rc', 'cr', 'm', 'preview', 'b', 'ea'].any { qualifier -> version ==~ /(?i).*[.-]$qualifier[.\d-+]*/ + } } diff --git a/gradle.properties b/gradle.properties index 27083ff6a0..a6a1246384 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,6 +14,7 @@ byteBuddyVersion=1.14.18 elApiVersion=6.0.1 servletApiVersion=6.0.0 javaParserCoreVersion=3.15.14 +jakartaPersistenceVersion=3.1.0 jansiVersion=1.18 jlineVersion=2.14.6 jspApiVersion=4.0.0 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index afba109285..a4b76b9530 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 c7d437bbb4..9355b41557 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-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d65..f5feea6d6b 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 6689b85bee..9b42019c79 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-gsp/src/main/groovy/org/grails/gsp/io/DefaultGroovyPageLocator.java b/grails-gsp/src/main/groovy/org/grails/gsp/io/DefaultGroovyPageLocator.java index be3a8f9d83..9b0a50fa11 100644 --- a/grails-gsp/src/main/groovy/org/grails/gsp/io/DefaultGroovyPageLocator.java +++ b/grails-gsp/src/main/groovy/org/grails/gsp/io/DefaultGroovyPageLocator.java @@ -20,10 +20,6 @@ import grails.plugins.PluginManagerAware; import grails.util.CollectionUtils; import grails.util.Environment; -import grails.util.Metadata; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.grails.core.io.GrailsResource; import org.grails.gsp.GroovyPage; import org.grails.gsp.GroovyPageBinding; import org.grails.io.support.GrailsResourceUtils; diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/gsp/jsp/SimpleJspTagTests.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/gsp/jsp/SimpleJspTagTests.groovy index aac77002f1..3efec61b9a 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/gsp/jsp/SimpleJspTagTests.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/gsp/jsp/SimpleJspTagTests.groovy @@ -4,8 +4,6 @@ import grails.core.DefaultGrailsApplication import grails.util.GrailsWebMockUtil import org.grails.web.pages.GroovyPagesServlet import org.grails.web.servlet.mvc.GrailsWebRequest -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test import org.springframework.core.io.DefaultResourceLoader import org.springframework.mock.web.MockServletContext import org.springframework.web.context.request.RequestContextHolder @@ -13,8 +11,6 @@ import org.springframework.web.servlet.support.JstlUtils import spock.lang.Shared import spock.lang.Specification -import static org.junit.jupiter.api.Assertions.assertEquals - /** * @author Graeme Rocher * @since 1.0 diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/plugins/web/DefaultDateHelperSpec.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/plugins/web/DefaultDateHelperSpec.groovy index 1c2067cc60..9148325a8f 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/plugins/web/DefaultDateHelperSpec.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/plugins/web/DefaultDateHelperSpec.groovy @@ -217,7 +217,7 @@ class DefaultDateHelperSpec extends Specification { given: DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.of('UTC')) - def date = new java.sql.Date(localDate.atStartOfDay(ZoneId.of("UTC")).toInstant().toEpochMilli()) + def date = new java.sql.Date(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant().toEpochMilli()) expect: helper.format(formatter, date) == '1941-01-05' diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/web/pages/GroovyPageRenderingTests.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/web/pages/GroovyPageRenderingTests.groovy index 8d28000227..c4a906295c 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/web/pages/GroovyPageRenderingTests.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/web/pages/GroovyPageRenderingTests.groovy @@ -4,7 +4,6 @@ import grails.testing.web.taglib.TagLibUnitTest import grails.util.Environment import org.grails.gsp.GroovyPagesException import org.grails.plugins.web.taglib.ApplicationTagLib -import org.grails.web.taglib.AbstractGrailsTagTests import spock.lang.Specification /** diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/AbstractGrailsTagTests.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/AbstractGrailsTagTests.groovy index 8fd108efa6..3a2c5d72dd 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/AbstractGrailsTagTests.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/AbstractGrailsTagTests.groovy @@ -46,7 +46,6 @@ import org.springframework.context.support.StaticMessageSource import org.springframework.core.convert.support.DefaultConversionService import org.springframework.core.io.Resource import org.springframework.core.io.support.PathMatchingResourcePatternResolver -import org.springframework.mock.web.MockHttpServletRequest import org.springframework.mock.web.MockHttpServletResponse import org.springframework.mock.web.MockServletContext import org.springframework.ui.context.Theme diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/ApplyCodecTagSpec.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/ApplyCodecTagSpec.groovy index 9daa5db4af..654a4bd28e 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/ApplyCodecTagSpec.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/ApplyCodecTagSpec.groovy @@ -16,7 +16,6 @@ package org.grails.web.taglib import grails.testing.web.taglib.TagLibUnitTest import org.grails.plugins.web.taglib.ApplicationTagLib - import spock.lang.Specification class ApplyCodecTagSpec extends Specification implements TagLibUnitTest { diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/FormTagLib2Tests.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/FormTagLib2Tests.groovy index 2f2d105d6b..13659e8182 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/FormTagLib2Tests.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/FormTagLib2Tests.groovy @@ -1,12 +1,13 @@ package org.grails.web.taglib -import org.junit.jupiter.api.Assertions -import static org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test +import org.w3c.dom.Document import java.text.DateFormat -import org.w3c.dom.Document + +import static org.junit.jupiter.api.Assertions.assertNotNull +import static org.junit.jupiter.api.Assertions.assertThrows /** * Tests for the FormTagLib.groovy file which contains tags to help with the diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/FormTagLibTests.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/FormTagLibTests.groovy index 7acd5fbbd7..8ae3df8751 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/FormTagLibTests.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/FormTagLibTests.groovy @@ -3,12 +3,10 @@ package org.grails.web.taglib import grails.core.GrailsUrlMappingsClass import grails.testing.web.taglib.TagLibUnitTest import grails.util.MockRequestDataValueProcessor +import org.grails.buffer.FastStringWriter import org.grails.core.AbstractGrailsClass import org.grails.core.artefact.UrlMappingsArtefactHandler import org.grails.plugins.web.taglib.FormTagLib -import org.grails.buffer.FastStringWriter -import org.springframework.context.ConfigurableApplicationContext -import spock.lang.Ignore import spock.lang.Specification /** diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/NamespacedNamedUrlMappingTests.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/NamespacedNamedUrlMappingTests.groovy index 860af215ac..b06958ca05 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/NamespacedNamedUrlMappingTests.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/NamespacedNamedUrlMappingTests.groovy @@ -1,11 +1,7 @@ package org.grails.web.taglib import grails.artefact.Artefact -import grails.testing.spock.OnceBefore import grails.testing.web.UrlMappingsUnitTest -import grails.testing.web.taglib.TagLibUnitTest -import org.grails.core.artefact.UrlMappingsArtefactHandler -import org.grails.plugins.web.taglib.ApplicationTagLib import spock.lang.Specification class NamespacedNamedUrlMappingTests extends Specification implements UrlMappingsUnitTest { diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/NamespacedTagLibRenderMethodTests.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/NamespacedTagLibRenderMethodTests.groovy index 69e0a5e663..fa0868f5bf 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/NamespacedTagLibRenderMethodTests.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/NamespacedTagLibRenderMethodTests.groovy @@ -3,8 +3,6 @@ package org.grails.web.taglib import grails.artefact.Artefact import grails.testing.web.taglib.TagLibUnitTest import org.grails.core.io.MockStringResourceLoader -import org.grails.core.artefact.TagLibArtefactHandler -import org.grails.plugins.web.taglib.ApplicationTagLib import spock.lang.Specification /** diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/RenderTagLibTests.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/RenderTagLibTests.groovy index 5bae3f4376..95204d5e19 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/RenderTagLibTests.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/RenderTagLibTests.groovy @@ -18,12 +18,10 @@ package org.grails.web.taglib import grails.artefact.Artefact import grails.testing.web.UrlMappingsUnitTest import grails.util.GrailsUtil -import org.grails.buffer.FastStringWriter import org.grails.core.io.MockStringResourceLoader import org.grails.gsp.GroovyPageBinding import org.grails.plugins.web.taglib.RenderTagLib import org.grails.taglib.GrailsTagException -import org.grails.web.sitemesh.GSPSitemeshPage import org.grails.web.util.GrailsApplicationAttributes import org.springframework.web.servlet.support.RequestContextUtils as RCU import spock.lang.Specification diff --git a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/UploadFormTagTests.groovy b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/UploadFormTagTests.groovy index 160dd557ca..13a21422fa 100644 --- a/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/UploadFormTagTests.groovy +++ b/grails-plugin-gsp/src/test/groovy/org/grails/web/taglib/UploadFormTagTests.groovy @@ -2,7 +2,6 @@ package org.grails.web.taglib import grails.testing.web.taglib.TagLibUnitTest import org.grails.plugins.web.taglib.ApplicationTagLib -import org.junit.Test import spock.lang.Specification /** diff --git a/grails-taglib/src/test/groovy/org/grails/taglib/GroovyPageTagWriterSpec.groovy b/grails-taglib/src/test/groovy/org/grails/taglib/GroovyPageTagWriterSpec.groovy index 72fb2a29ed..a362b0aef9 100644 --- a/grails-taglib/src/test/groovy/org/grails/taglib/GroovyPageTagWriterSpec.groovy +++ b/grails-taglib/src/test/groovy/org/grails/taglib/GroovyPageTagWriterSpec.groovy @@ -1,6 +1,6 @@ package org.grails.taglib -import org.grails.taglib.GroovyPageTagWriter + import spock.lang.Issue import spock.lang.Specification diff --git a/grails-web-gsp/src/main/groovy/org/grails/web/gsp/GroovyPagesTemplateRenderer.java b/grails-web-gsp/src/main/groovy/org/grails/web/gsp/GroovyPagesTemplateRenderer.java index 3fa2a6ec11..4517d0a82c 100644 --- a/grails-web-gsp/src/main/groovy/org/grails/web/gsp/GroovyPagesTemplateRenderer.java +++ b/grails-web-gsp/src/main/groovy/org/grails/web/gsp/GroovyPagesTemplateRenderer.java @@ -20,7 +20,6 @@ import grails.util.Environment; import grails.util.GrailsNameUtils; import grails.util.GrailsStringUtils; -import groovy.lang.GroovyObject; import groovy.text.Template; import org.codehaus.groovy.runtime.InvokerHelper; import org.grails.buffer.CodecPrintWriter; diff --git a/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/TldReader.groovy b/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/TldReader.groovy index 99fef6547b..8356772158 100644 --- a/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/TldReader.groovy +++ b/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/TldReader.groovy @@ -17,7 +17,6 @@ package org.grails.gsp.jsp import groovy.transform.CompileStatic import groovy.transform.TypeCheckingMode - import org.apache.commons.logging.Log import org.apache.commons.logging.LogFactory import org.grails.io.support.SpringIOUtils diff --git a/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/WebXmlTagLibraryReader.groovy b/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/WebXmlTagLibraryReader.groovy index 8dbf3185d2..3b3ab57d11 100644 --- a/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/WebXmlTagLibraryReader.groovy +++ b/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/WebXmlTagLibraryReader.groovy @@ -17,7 +17,6 @@ package org.grails.gsp.jsp import groovy.transform.CompileStatic import groovy.transform.TypeCheckingMode - import org.grails.io.support.SpringIOUtils /** diff --git a/grails-web-taglib/src/main/groovy/grails/artefact/gsp/TagLibraryInvoker.groovy b/grails-web-taglib/src/main/groovy/grails/artefact/gsp/TagLibraryInvoker.groovy index f5311d92ce..91f5030b67 100644 --- a/grails-web-taglib/src/main/groovy/grails/artefact/gsp/TagLibraryInvoker.groovy +++ b/grails-web-taglib/src/main/groovy/grails/artefact/gsp/TagLibraryInvoker.groovy @@ -19,13 +19,12 @@ import grails.util.Environment import grails.util.GrailsMetaClassUtils import grails.web.api.WebAttributes import groovy.transform.CompileStatic -import org.grails.taglib.encoder.WithCodecHelper import org.grails.taglib.NamespacedTagDispatcher import org.grails.taglib.TagLibraryLookup -import org.grails.taglib.TagOutput import org.grails.taglib.TagLibraryMetaUtils +import org.grails.taglib.TagOutput +import org.grails.taglib.encoder.WithCodecHelper import org.springframework.beans.factory.annotation.Autowired -import org.springframework.context.ApplicationContext /** * A trait that adds the ability invoke tags to any class diff --git a/grails-web-taglib/src/test/groovy/org/grails/compiler/web/taglib/TagLibraryTransformerSpec.groovy b/grails-web-taglib/src/test/groovy/org/grails/compiler/web/taglib/TagLibraryTransformerSpec.groovy index 310de9e7d5..1fd62b28a5 100644 --- a/grails-web-taglib/src/test/groovy/org/grails/compiler/web/taglib/TagLibraryTransformerSpec.groovy +++ b/grails-web-taglib/src/test/groovy/org/grails/compiler/web/taglib/TagLibraryTransformerSpec.groovy @@ -2,9 +2,7 @@ package org.grails.compiler.web.taglib import grails.artefact.Artefact import grails.compiler.ast.ClassInjector - import org.grails.compiler.injection.GrailsAwareClassLoader - import spock.lang.Issue import spock.lang.Specification