diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c4237ef57..806ac14ef 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -20,7 +20,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: 17 - distribution: temurin + distribution: liberica - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 with: @@ -29,6 +29,7 @@ jobs: env: DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: > ./gradlew check @@ -42,7 +43,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: 17 - distribution: temurin + distribution: liberica - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 with: @@ -51,6 +52,7 @@ jobs: env: DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: > ./gradlew build @@ -61,6 +63,7 @@ jobs: DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} ORG_GRADLE_PROJECT_artifactoryUsername: ${{ secrets.ARTIFACTORY_USERNAME }} ORG_GRADLE_PROJECT_artifactoryPassword: ${{ secrets.ARTIFACTORY_PASSWORD }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: > ./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true @@ -70,12 +73,13 @@ jobs: env: DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: > ./gradlew views-docs:docs - name: "📤 Publish Snapshot Documentation to Github Pages" if: success() - uses: micronaut-projects/github-pages-deploy-action@grails + uses: grails/github-pages-deploy-action@grails env: BRANCH: gh-pages COMMIT_EMAIL: ${{ env.GIT_USER_EMAIL }} diff --git a/.github/workflows/groovy-joint-workflow.yml b/.github/workflows/groovy-joint-workflow.yml index 322cb782a..162d8ab96 100644 --- a/.github/workflows/groovy-joint-workflow.yml +++ b/.github/workflows/groovy-joint-workflow.yml @@ -18,7 +18,7 @@ jobs: - name: "☕️ Setup JDK" uses: actions/setup-java@v4 with: - distribution: temurin + distribution: liberica java-version: 17 - name: "🗄️ Cache local Maven repository" uses: actions/cache@v4 @@ -108,6 +108,7 @@ jobs: env: DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: | cd groovy ./gradlew pTML -x groovydoc -x javadoc -x javadocAll -x groovydocAll -x asciidoc -x docGDK @@ -122,7 +123,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: 17 - distribution: temurin + distribution: liberica - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 with: @@ -138,6 +139,7 @@ jobs: env: DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: > ./gradlew build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fbe3ec49..597d86c1a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: 17 - distribution: temurin + distribution: liberica - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 with: @@ -26,13 +26,14 @@ jobs: id: release_version run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT - name: "⚙ Run pre-release" - uses: micronaut-projects/github-actions/pre-release@master + uses: grails/github-actions/pre-release@main - name: "🧩 Run Assemble" if: success() id: assemble env: DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: ./gradlew assemble - name: "📤 Upload Distribution" if: success() @@ -54,6 +55,7 @@ jobs: ORG_GRADLE_PROJECT_sonatypeOssRepo: ${{ secrets.SONATYPE_NEXUS_URL }} SIGNING_KEY: ${{ secrets.SIGNING_KEY }} SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: > ./gradlew -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg @@ -74,7 +76,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: 17 - distribution: temurin + distribution: liberica - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 with: @@ -87,13 +89,14 @@ jobs: ORG_GRADLE_PROJECT_sonatypeOssPassword: ${{ secrets.SONATYPE_PASSWORD }} ORG_GRADLE_PROJECT_sonatypeOssStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} ORG_GRADLE_PROJECT_sonatypeOssRepo: ${{ secrets.SONATYPE_NEXUS_URL }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: > ./gradlew findSonatypeStagingRepository releaseSonatypeStagingRepository - name: "⚙️ Run post-release" if: success() - uses: micronaut-projects/github-actions/post-release@master + uses: grails/github-actions/post-release@main with: token: ${{ secrets.GITHUB_TOKEN }} docs: @@ -111,7 +114,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: 17 - distribution: temurin + distribution: liberica - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@v4 with: @@ -121,12 +124,13 @@ jobs: env: DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} run: > ./gradlew views-docs:docs - name: "📤 Publish Documentation to Github Pages" if: success() - uses: micronaut-projects/github-pages-deploy-action@grails + uses: grails/github-pages-deploy-action@grails env: BETA: ${{ contains(needs.publish.outputs.release_version, 'M') }} BRANCH: gh-pages diff --git a/build.gradle b/build.gradle index fb53c3442..b7d5f6496 100644 --- a/build.gradle +++ b/build.gradle @@ -55,6 +55,16 @@ allprojects { url = 'https://groovy.jfrog.io/artifactory/libs-snapshot-local' } } + if (System.getenv("GITHUB_MAVEN_PASSWORD") && !grailsVersion.endsWith('-SNAPSHOT')) { + System.out.println("Adding Grails Core Repo") + maven { + url = 'https://maven.pkg.github.com/grails/grails-core' + credentials { + username = 'DOES_NOT_MATTER' + password = System.getenv("GITHUB_MAVEN_PASSWORD") + } + } + } } tasks.withType(Test).configureEach { useJUnitPlatform() diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index eb457714a..b81ca5721 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -5,6 +5,24 @@ plugins { repositories { mavenCentral() maven { url = 'https://repo.grails.org/grails/core' } + + def gradleGrailsVersion = project.rootProject + .extensions + .getByType(VersionCatalogsExtension.class) + .named("buildsrcLibs") + .findVersion("grails-gradle-plugin") + .get() + .displayName + if (System.getenv("GITHUB_MAVEN_PASSWORD") && !gradleGrailsVersion.endsWith('-SNAPSHOT')) { + System.out.println("Adding Grails Core Repo") + maven { + url = 'https://maven.pkg.github.com/grails/grails-core' + credentials { + username = 'DOES_NOT_MATTER' + password = System.getenv("GITHUB_MAVEN_PASSWORD") + } + } + } } dependencies { diff --git a/core/build.gradle b/core/build.gradle index b8c0e998f..c606a804e 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -10,6 +10,7 @@ ext.set('projectDesc', 'Grails Views Core') dependencies { + api platform(libs.grails.bom) api libs.caffeine // Used in public API api libs.grails.datastore.core // MappingContext is used in public API api libs.grails.mimetypes // MimeUtility is used in public API diff --git a/gradle-plugin/build.gradle b/gradle-plugin/build.gradle index 175f28375..1c75f55d9 100644 --- a/gradle-plugin/build.gradle +++ b/gradle-plugin/build.gradle @@ -12,6 +12,7 @@ dependencies { // the gradle api is provided by java-gradle-plugin + implementation platform(libs.grails.bom) implementation libs.grails.bootstrap, { // grails-bootstrap leaks groovy-xml which is a problem for Gradle (version conflict) exclude group: 'org.codehaus.groovy', module: 'groovy-xml' diff --git a/gradle/buildsrc.libs.versions.toml b/gradle/buildsrc.libs.versions.toml index 57a4e8c80..9394d2d23 100644 --- a/gradle/buildsrc.libs.versions.toml +++ b/gradle/buildsrc.libs.versions.toml @@ -1,6 +1,6 @@ [versions] asciidoctor-gradle-jvm = '4.0.3' -grails-gradle-plugin = '7.0.0-SNAPSHOT' +grails-gradle-plugin = '7.0.0-M2' grails-views = '4.0.0-SNAPSHOT' groovy-doc = '1.0.1' nexus-publish-gradle-plugin = '1.3.0' diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bbbcc1119..e25cf4367 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -grails = '7.0.0-SNAPSHOT' -grails-gradle-plugin = '7.0.0-SNAPSHOT' +grails = '7.0.0-M1' +grails-gradle-plugin = '7.0.0-M2' groovy = '4.0.24' java-baseline = '17' micronaut = '4.6.5' @@ -10,19 +10,19 @@ spring-boot-gradle-plugin = '3.4.1' assetpipeline = { module = 'com.bertramlabs.plugins:asset-pipeline-grails' } caffeine = { module = 'com.github.ben-manes.caffeine:caffeine' } grails-bom = { module = 'org.grails:grails-bom', version.ref = 'grails' } -grails-bootstrap = { module = 'org.grails:grails-bootstrap', version.ref = 'grails' } -grails-core = { module = 'org.grails:grails-core', version.ref = 'grails' } +grails-bootstrap = { module = 'org.grails:grails-bootstrap' } +grails-core = { module = 'org.grails:grails-core' } grails-datastore-core = { module = 'org.grails:grails-datastore-core' } grails-datastore-gorm-hibernate5 = { module = 'org.grails:grails-datastore-gorm-hibernate5' } grails-datastore-gorm-mongodb = { module = 'org.grails:grails-datastore-gorm-mongodb' } grails-datastore-gorm-support = { module = 'org.grails:grails-datastore-gorm-support' } -grails-encoder = { module = 'org.grails:grails-encoder', version.ref = 'grails' } +grails-encoder = { module = 'org.grails:grails-encoder' } grails-gradle-plugin = { module = 'org.grails:grails-gradle-plugin', version.ref = 'grails-gradle-plugin' } -grails-mimetypes = { module = 'org.grails:grails-plugin-mimetypes', version.ref = 'grails' } -grails-rest = { module = 'org.grails:grails-plugin-rest', version.ref = 'grails' } +grails-mimetypes = { module = 'org.grails:grails-plugin-mimetypes' } +grails-rest = { module = 'org.grails:grails-plugin-rest' } grails-testing-support-core = { module = 'org.grails:grails-testing-support' } grails-testing-support-gorm = { module = 'org.grails:grails-gorm-testing-support' } -grails-web-urlmappings = { module = 'org.grails:grails-web-url-mappings', version.ref = 'grails' } +grails-web-urlmappings = { module = 'org.grails:grails-web-url-mappings' } groovy-core = { module = 'org.apache.groovy:groovy' } groovy-json = { module = 'org.apache.groovy:groovy-json' } groovy-templates = { module = 'org.apache.groovy:groovy-templates' }