From 86e70383677059a100f276b3b1013f0d393b71fc Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Thu, 26 Oct 2023 16:09:17 +0530 Subject: [PATCH] Set Java 11 as baseline --- .github/workflows/gradle.yml | 32 ++++++++++---------------------- .github/workflows/release.yml | 30 +++++++++++++++--------------- plugin/build.gradle | 6 +++--- 3 files changed, 28 insertions(+), 40 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 8f2e156..0e83dda 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -19,27 +19,14 @@ jobs: --health-interval 10s --health-timeout 5s --health-retries 5 - env: - WORKSPACE: ${{ github.workspace }} - GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8 steps: - uses: actions/checkout@v3 - name: Set up JDK uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: 8 - - name: Run Tests - if: github.event_name == 'pull_request' - id: tests - uses: gradle/gradle-build-action@v2 - with: - arguments: check -Dgeb.env=chromeHeadless - env: - 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 }} + java-version: 11 - name: Run Build - if: github.event_name == 'push' id: build uses: gradle/gradle-build-action@v2 env: @@ -50,17 +37,14 @@ jobs: GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} with: arguments: build -Dgeb.env=chromeHeadless - - name: Publish Test Report - if: steps.build.outcome == 'failure' || steps.tests.outcome == 'failure' - uses: scacap/action-surefire-report@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - report_paths: '**/build/test-results/test/TEST-*.xml' - - name: Publish to repo.grails.org + - name: Publish Artifacts (repo.grails.org) id: publish uses: gradle/gradle-build-action@v2 if: steps.build.outcome == 'success' && github.event_name == 'push' 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 }} ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} with: @@ -71,6 +55,10 @@ jobs: uses: gradle/gradle-build-action@v2 with: arguments: :grails-redis:groovydoc + 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 }} - name: Publish to Github Pages if: steps.docs.outcome == 'success' && github.event_name == 'push' uses: micronaut-projects/github-pages-deploy-action@master @@ -80,5 +68,5 @@ jobs: BRANCH: gh-pages FOLDER: plugin/build/docs DOC_FOLDER: gh-pages - COMMIT_EMAIL: behlp@objectcomputing.com + COMMIT_EMAIL: behlp@unityfoundation.io COMMIT_NAME: Puneet Behl \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4441c39..1ffde22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,23 +5,19 @@ on: jobs: release: runs-on: ubuntu-latest - strategy: - matrix: - java: ['8'] env: GIT_USER_NAME: puneetbehl - GIT_USER_EMAIL: behlp@objectcomputing.com + GIT_USER_EMAIL: behlp@unityfoundation.io steps: - name: Checkout repository uses: actions/checkout@v3 with: token: ${{ secrets.GH_TOKEN }} - - uses: gradle/wrapper-validation-action@v1 - name: Set up JDK uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: ${{ matrix.java }} + java-version: '11' - name: Set the current release version id: release_version run: echo ::set-output name=release_version::${GITHUB_REF:11} @@ -37,6 +33,9 @@ jobs: id: publish uses: gradle/gradle-build-action@v2 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 }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_NEXUS_URL: ${{ secrets.SONATYPE_NEXUS_URL }} @@ -47,28 +46,29 @@ jobs: with: arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository - name: Publish Documentation - id: docs - if: steps.publish.outcome == 'success' + if: success() uses: gradle/gradle-build-action@v2 with: arguments: :grails-redis:groovydoc - - name: Export Gradle Properties - uses: micronaut-projects/github-actions/export-gradle-properties@master + 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 }} - name: Publish to Github Pages - if: steps.docs.outcome == 'success' - uses: micronaut-projects/github-pages-deploy-action@master + if: success() + uses: grails/github-pages-deploy-action@v2.0.2 env: - BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }} + SKIP_SNAPSHOT: ${{ contains(steps.release_version.outputs.release_version, 'M') }} TARGET_REPOSITORY: ${{ github.repository }} GH_TOKEN: ${{ secrets.GH_TOKEN }} BRANCH: gh-pages FOLDER: plugin/build/docs DOC_FOLDER: gh-pages - COMMIT_EMAIL: behlp@objectcomputing.com + COMMIT_EMAIL: behlp@unityfoundation.io COMMIT_NAME: Puneet Behl VERSION: ${{ steps.release_version.outputs.release_version }} - name: Run post-release - if: steps.publish.outcome == 'success' && steps.docs.outcome == 'success' && success() + if: success() uses: micronaut-projects/github-actions/post-release@master with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/plugin/build.gradle b/plugin/build.gradle index 83dd63c..226ffe5 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -22,8 +22,8 @@ apply plugin: "org.grails.grails-gsp" version project.projectVersion group "org.grails.plugins" -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +sourceCompatibility = 1.11 +targetCompatibility = 1.11 repositories { mavenCentral() @@ -118,7 +118,7 @@ publishing { developer { id = 'puneetbehl' name = 'Puneet Behl' - email = 'behlp@objectcomputing.com' + email = 'behlp@unityfoundation.io' } } scm {