From 6e9299deac732b8ae41164b8c89699ac93764cff Mon Sep 17 00:00:00 2001 From: James Daugherty Date: Thu, 19 Dec 2024 22:57:14 -0500 Subject: [PATCH] Updating Scaffolding to M1 --- .github/workflows/gradle.yml | 3 +++ .github/workflows/release.yml | 2 ++ build.gradle | 16 +++++++++++----- gradle.properties | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 4635e14..a4f07f5 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -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 build - name: "📤 Publish Snapshot to repo.grails.org" if: success() && github.event_name == 'push' @@ -43,6 +44,8 @@ jobs: publish - name: "Generate Java & Groovydoc" run: ./gradlew javadoc groovydoc + env: + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - name: "📖 Publish docs to Github Pages" if: success() && github.event_name == 'push' uses: micronaut-projects/github-pages-deploy-action@grails diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 898f085..6b764b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,6 +32,7 @@ jobs: - name: "📤 Publish to Sonatype" id: publish env: + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }} @@ -50,6 +51,7 @@ jobs: id: assemble if: steps.publish.outcome == 'success' env: + GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} DEVELOCITY_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} DEVELOCITY_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} run: ./gradlew assemble diff --git a/build.gradle b/build.gradle index 8ec8aa1..cfba506 100644 --- a/build.gradle +++ b/build.gradle @@ -11,14 +11,20 @@ group = 'org.grails.plugins' repositories { mavenCentral() maven { url = 'https://repo.grails.org/grails/core' } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(17) + 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") + } + } } } +compileJava.options.release = 17 + dependencies { implementation platform("org.grails:grails-bom:$grailsVersion") api "org.grails:grails-plugin-rest" diff --git a/gradle.properties b/gradle.properties index 302fb13..8ef843a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ projectVersion=6.0.0-SNAPSHOT -grailsVersion=7.0.0-SNAPSHOT +grailsVersion=7.0.0-M1 groovyVersion=4.0.24 org.gradle.caching=true