Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
50102a6
ci: improve GitHub workflows for clarity and stability
matrei Jan 22, 2025
ba6bba7
build: switch to Gradle's `test-report-aggregation` Gradle Plugin
matrei Jan 22, 2025
d15c26b
build: remove unused `idea` Gradle Plugin
matrei Jan 22, 2025
2f09ed8
build(deps): upgrade `common-custom-user-data-gradle-plugin` to `2.1`
matrei Jan 22, 2025
6a62220
build: set correct tag for Develocity build scans
matrei Jan 22, 2025
6e027c1
build: remove unused `groovyVersion` property
matrei Jan 22, 2025
01f060f
build: remove unnecessary snapshot guard
matrei Jan 22, 2025
da611f2
build: correct typo in developer ID
matrei Jan 22, 2025
63cc614
build: optimize and clean up build configuration
matrei Jan 22, 2025
aea8748
build: add test event logging
matrei Jan 22, 2025
7ad9c49
build: add `clean` task for root project
matrei Jan 22, 2025
b32716e
build: cleanup dependencies for better stability and clarity
matrei Jan 22, 2025
09c0a42
chore: remove unused imports
matrei Jan 22, 2025
11bf8e4
refactor: remove unused method in test
matrei Jan 22, 2025
4edc323
fix: replace usage of deprecated `BeanUtils.instantiate` method
matrei Jan 22, 2025
b25d820
refactor: replace deprecated `AbstractGlobalExtension` with `IGlobalE…
matrei Jan 22, 2025
4264dae
test: replace `@Ignore` with `@PendingFeature`
matrei Jan 22, 2025
0f435b9
test: remove `@Ignore` from passing `HasManyDefaultMappedBySpec` test
matrei Jan 22, 2025
fdfc89c
test: replace deprecated `@RunWith` with `@Suite`
matrei Jan 22, 2025
58750ee
refactor: replace deprecated `AccessControlException` with `SecurityE…
matrei Jan 22, 2025
5a09262
chore: update license headers for changes files
matrei Jan 22, 2025
6e59c57
ci: fix typo in step name
matrei Jan 22, 2025
85123f6
build: fix building with Groovy snapshots
matrei Jan 22, 2025
2c3a056
build: fix typo in `test-report/build.gradle`
matrei Jan 22, 2025
e05d6b8
test: use `@PendingFeatureIf` for selective test execution
matrei Jan 23, 2025
9bf583a
ci: add Java version matrix with 17 and 21
matrei Jan 24, 2025
c00a24d
build: restore `groovy-test-junit5` for JUnit 5 compatibility
matrei Jan 24, 2025
b1463b2
build: use `compileOnlyApi` to expose AST transforms to downstream co…
matrei Jan 24, 2025
b72eb62
test: unignore passing test in `WhereMethodSpec`
matrei Jan 24, 2025
254c760
build: use `org.grails.grails-publish` for publishing
matrei Jan 24, 2025
9a8242a
fix(deps): bump `com.gradle.develocity` from `3.19` to `3.19.1`
matrei Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 53 additions & 39 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java CI
name: "Java CI"
on:
push:
branches:
Expand All @@ -8,83 +8,97 @@ on:
- '[7-9]+.[0-9]+.x'
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
packages: read
strategy:
fail-fast: false
matrix:
java: [17, 21]
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: "📥 Checkout the repository"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: liberica
java-version: 17
- name: Setup Gradle
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Run Build
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "🔨 Run Build"
id: build
run: ./gradlew build
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 --continue
publish:
if: github.event_name == 'push'
needs: ["build"]
runs-on: ubuntu-latest
needs: build
runs-on: ubuntu-24.04
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: "📥 Checkout the repository"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: 17
- name: Setup Gradle
distribution: liberica
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Publish to Artifactory (repo.grails.org)
run: ./gradlew -Dorg.gradle.internal.publish.checksums.insecure=true publish
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "📤 Publish Snapshot to repo.grails.org"
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 }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
GRADLE_PUBLISH_RELEASE: 'false'
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
run: ./gradlew --no-build-cache publish
trigger-build-gorm-impls:
if: github.event_name == 'push'
needs: ["build", "publish"]
runs-on: ubuntu-latest
needs: [build, publish]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Extract branch name
- name: "📝 Store the target branch"
id: extract_branch
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
- name: Create Snapshot Message for the Workflow Dispatch
run: |
echo "🔍 Determine Target Branch"
TARGET_BRANCH=${GITHUB_REF#refs/heads/}
echo $TARGET_BRANCH
echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
- name: "📝 Create Snapshot Message for the Workflow Dispatch"
id: dispatch_message
run: echo "value={\"message\":\"New Core Snapshot $(date) - $GITHUB_SHA\"}" >> $GITHUB_OUTPUT
- name: Invoke the Java CI workflow in GORM Hibernate5
uses: benc-uk/[email protected]
run: echo "value={\"message\":\"New Data Mapping Snapshots $(date) - $GITHUB_SHA\"}" >> $GITHUB_OUTPUT
- name: "📡 Invoke the Java CI workflow in GORM Hibernate5"
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
with:
workflow: Java CI
repo: grails/gorm-hibernate5
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
- name: Invoke the Java CI workflow in GORM Hibernate6
uses: benc-uk/[email protected]
- name: "📡 Invoke the Java CI workflow in GORM Hibernate6"
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
with:
workflow: Java CI
repo: grails/gorm-hibernate6
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
- name: Invoke the Java CI workflow in GORM MongoDB
uses: benc-uk/[email protected]
- name: "📡 Invoke the Java CI workflow in GORM MongoDB"
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
with:
workflow: Java CI
repo: grails/gorm-mongodb
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
inputs: ${{ steps.dispatch_message.outputs.value }}
- name: Invoke the Java CI workflow in GORM Neo4j
uses: benc-uk/[email protected]
- name: "📡 Invoke the Java CI workflow in GORM Neo4j"
uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1.2.4 (Use commit sha as this is a 3rd party action)
with:
workflow: Java CI
repo: grails/gorm-neo4j
Expand Down
42 changes: 16 additions & 26 deletions .github/workflows/groovy-joint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ on:
workflow_dispatch:
permissions:
contents: read
packages: read
jobs:
build_groovy:
runs-on: ubuntu-latest
name: "Build Groovy"
runs-on: ubuntu-24.04
outputs:
groovyVersion: ${{ steps.groovy-version.outputs.value }}
steps:
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: 17
distribution: liberica
- name: "🗄️ Cache local Maven repository"
uses: actions/cache@v4
with:
Expand All @@ -45,8 +47,8 @@ jobs:
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: "📝 Store Groovy version to use when building this project"
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "📝 Store Groovy version to use when building the project"
id: groovy-version
run: |
cd groovy
Expand All @@ -68,27 +70,20 @@ jobs:
run: |
echo "VALUE<<EOF" >> $GITHUB_OUTPUT
echo "def isAuthenticated = System.getenv('DEVELOCITY_ACCESS_KEY') != null" >> $GITHUB_OUTPUT
echo "def isBuildCacheAuthenticated =" >> $GITHUB_OUTPUT
echo " System.getenv('DEVELOCITY_BUILD_CACHE_NODE_USER') != null &&" >> $GITHUB_OUTPUT
echo " System.getenv('DEVELOCITY_BUILD_CACHE_NODE_KEY') != null" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "develocity {" >> $GITHUB_OUTPUT
echo " server = 'https://ge.grails.org'" >> $GITHUB_OUTPUT
echo " buildScan {" >> $GITHUB_OUTPUT
echo " tag('groovy')" >> $GITHUB_OUTPUT
echo " tag('grails-datamapping')" >> $GITHUB_OUTPUT
echo " publishing.onlyIf { isAuthenticated }" >> $GITHUB_OUTPUT
echo " uploadInBackground = false" >> $GITHUB_OUTPUT
echo " }" >> $GITHUB_OUTPUT
echo "}" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
echo "buildCache {" >> $GITHUB_OUTPUT
echo " local { enabled = false }" >> $GITHUB_OUTPUT
echo " remote(develocity.buildCache) {" >> $GITHUB_OUTPUT
echo " push = isBuildCacheAuthenticated" >> $GITHUB_OUTPUT
echo " push = isAuthenticated" >> $GITHUB_OUTPUT
echo " enabled = true" >> $GITHUB_OUTPUT
echo " usernameAndPassword(" >> $GITHUB_OUTPUT
echo " System.getenv('DEVELOCITY_BUILD_CACHE_NODE_USER') ?: ''," >> $GITHUB_OUTPUT
echo " System.getenv('DEVELOCITY_BUILD_CACHE_NODE_KEY') ?: ''" >> $GITHUB_OUTPUT
echo " )" >> $GITHUB_OUTPUT
echo " }" >> $GITHUB_OUTPUT
echo "}" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
Expand All @@ -105,42 +100,37 @@ jobs:
# Add Develocity setup 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: "🔨 Publish Groovy to local maven repository (no docs)"
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

build_project:
needs: [build_groovy]
name: "Build Project"
needs: build_groovy
runs-on: ubuntu-latest
steps:
- name: "📥 Checkout project"
uses: actions/checkout@v4
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: 17
distribution: liberica
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
- name: "🗄️ Restore local Maven repository from cache"
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: cache-local-maven-${{ github.sha }}
- name: "🪶 Add mavenLocal repository to build"
run: sed -i 's|// mavenLocal() // Keep|mavenLocal() // Keep|' build.gradle
- name: "🔨 Build and test project using the locally built Groovy snapshot"
- name: "🔨 Build and test the project using the locally built Groovy snapshot"
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
./gradlew build --continue
-PgroovyVersion=${{needs.build_groovy.outputs.groovyVersion}}
-x groovydoc
-x groovydoc
41 changes: 7 additions & 34 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Changelog
name: "Release Drafter"
on:
issues:
types: [closed,reopened]
Expand All @@ -8,42 +8,15 @@ on:
pull_request:
types: [opened, reopened, synchronize]
pull_request_target:
types: [opened, reopened, synchronize]
types: [opened, reopened, synchronize]
workflow_dispatch:
jobs:
release_notes:
update_release_draft:
permissions:
contents: read # limit to read access
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check if it has release drafter config file
id: check_release_drafter
run: |
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
echo "has_release_drafter=${has_release_drafter}" >> $GITHUB_OUTPUT
- name: Extract branch name
id: extract_branch
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
# If it has release drafter:
- uses: release-drafter/release-drafter@v6
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
- name: "📝 Update Release Draft"
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# Otherwise:
- name: Export Gradle Properties
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
uses: grails/github-actions/export-gradle-properties@main
- uses: grails/github-actions/release-notes@main
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
id: release_notes
with:
token: ${{ secrets.GH_TOKEN }}
- uses: ncipollo/release-action@v1
if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true'
with:
allowUpdates: true
commit: ${{ steps.release_notes.outputs.current_branch }}
draft: true
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
tag: v${{ steps.release_notes.outputs.next_version }}
bodyFile: CHANGELOG.md
token: ${{ secrets.GH_TOKEN }}
Loading
Loading