Skip to content

Commit 7918148

Browse files
authored
Merge pull request #10 from grails-plugins/grails7
feat!: Grails 7
2 parents 271fd3f + 7cafb14 commit 7918148

File tree

106 files changed

+4778
-2078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+4778
-2078
lines changed

.github/release-drafter.yml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name-template: $RESOLVED_VERSION
2+
tag-template: v$RESOLVED_VERSION
3+
pull-request:
4+
title-templates:
5+
fix: '🐛 $TITLE (#$NUMBER)'
6+
feat: '🚀 $TITLE (#$NUMBER)'
7+
default: '$TITLE (#$NUMBER)'
8+
autolabeler:
9+
- label: 'bug'
10+
branch:
11+
- '/fix\/.+/'
12+
title:
13+
- '/fix/i'
14+
- label: 'improvement'
15+
branch:
16+
- '/improv\/.+/'
17+
title:
18+
- '/improv/i'
19+
- label: 'feature'
20+
branch:
21+
- '/feature\/.+/'
22+
title:
23+
- '/feat/i'
24+
- label: 'documentation'
25+
branch:
26+
- '/docs\/.+/'
27+
title:
28+
- '/docs/i'
29+
- label: 'maintenance'
30+
branch:
31+
- '/(chore|refactor|style|test|ci|perf|build)\/.+/'
32+
title:
33+
- '/(chore|refactor|style|test|ci|perf|build)/i'
34+
- label: 'chore'
35+
branch:
36+
- '/chore\/.+/'
37+
title:
38+
- '/chore/i'
39+
- label: 'refactor'
40+
branch:
41+
- '/refactor\/.+/'
42+
title:
43+
- '/refactor/i'
44+
- label: 'style'
45+
branch:
46+
- '/style\/.+/'
47+
title:
48+
- '/style/i'
49+
- label: 'test'
50+
branch:
51+
- '/test\/.+/'
52+
title:
53+
- '/test/i'
54+
- label: 'ci'
55+
branch:
56+
- '/ci\/.+/'
57+
title:
58+
- '/ci/i'
59+
- label: 'perf'
60+
branch:
61+
- '/perf\/.+/'
62+
title:
63+
- '/perf/i'
64+
- label: 'build'
65+
branch:
66+
- '/build\/.+/'
67+
title:
68+
- '/build/i'
69+
- label: 'deps'
70+
branch:
71+
- '/deps\/.+/'
72+
title:
73+
- '/deps/i'
74+
- label: 'revert'
75+
branch:
76+
- '/revert\/.+/'
77+
title:
78+
- '/revert/i'
79+
categories:
80+
- title: '🚀 Features'
81+
labels:
82+
- 'feature'
83+
- "type: enhancement"
84+
- "type: new feature"
85+
- "type: major"
86+
- "type: minor"
87+
- title: '💡 Improvements'
88+
labels:
89+
- 'improvement'
90+
- "type: improvement"
91+
92+
- title: '🐛 Bug Fixes'
93+
labels:
94+
- 'fix'
95+
- 'bug'
96+
- "type: bug"
97+
- title: '📚 Documentation'
98+
labels:
99+
- 'docs'
100+
- title: '🔧 Maintenance'
101+
labels:
102+
- 'maintenance'
103+
- 'chore'
104+
- 'refactor'
105+
- 'style'
106+
- 'test'
107+
- 'ci'
108+
- 'perf'
109+
- 'build'
110+
- "type: ci"
111+
- "type: build"
112+
- title: '⏪ Reverts'
113+
labels:
114+
- 'revert'
115+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
116+
version-resolver:
117+
major:
118+
labels:
119+
- 'type: major'
120+
minor:
121+
labels:
122+
- 'type: minor'
123+
patch:
124+
labels:
125+
- 'type: patch'
126+
default: patch
127+
template: |
128+
## What's Changed
129+
130+
$CHANGES
131+
132+
## Contributors
133+
134+
$CONTRIBUTORS

.github/workflows/gradle.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "Java CI"
2+
on:
3+
push:
4+
branches:
5+
- '[0-9]+.[0-9]+.x'
6+
pull_request:
7+
branches:
8+
- '[0-9]+.[0-9]+.x'
9+
workflow_dispatch:
10+
env:
11+
GRAILS_PUBLISH_RELEASE: 'false'
12+
JAVA_DISTRIBUTION: liberica
13+
JAVA_VERSION: 17.0.17
14+
jobs:
15+
test_project:
16+
name: "Test Project"
17+
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
18+
runs-on: ubuntu-24.04
19+
steps:
20+
- name: "📥 Checkout repository"
21+
uses: actions/checkout@v5
22+
- name: "☕️ Setup JDK"
23+
uses: actions/setup-java@v4
24+
with:
25+
java-version: ${{ env.JAVA_VERSION }}
26+
distribution: ${{ env.JAVA_DISTRIBUTION }}
27+
- name: "🐘 Setup Gradle"
28+
uses: gradle/actions/setup-gradle@v5
29+
- name: "🏃‍♂️ Run Tests"
30+
run: ./gradlew check --continue
31+
publish_snapshot:
32+
name: "Build Project and Publish Snapshot"
33+
runs-on: ubuntu-24.04
34+
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.repository_owner == 'grails-plugins'
35+
permissions:
36+
contents: write
37+
steps:
38+
- name: "📥 Checkout repository"
39+
uses: actions/checkout@v5
40+
- name: "☕️ Setup JDK"
41+
uses: actions/setup-java@v5
42+
with:
43+
java-version: ${{ env.JAVA_VERSION }}
44+
distribution: ${{ env.JAVA_DISTRIBUTION }}
45+
- name: "🐘 Setup Gradle"
46+
uses: gradle/actions/setup-gradle@v5
47+
- name: "📤 Publish Snapshot artifacts"
48+
env:
49+
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
50+
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
51+
MAVEN_PUBLISH_URL: 'https://repo.grails.org/artifactory/plugins3-snapshots-local'
52+
run: ./gradlew publish
53+
- name: "🔨 Generate Snapshot Documentation"
54+
run: ./gradlew docs
55+
- name: "🚀 Publish to Github Pages"
56+
uses: apache/grails-github-actions/deploy-github-pages@asf
57+
env:
58+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
GRADLE_PUBLISH_RELEASE: 'false'
60+
SOURCE_FOLDER: plugin/build/docs

.github/workflows/release.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [ published ]
5+
env:
6+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7+
GRAILS_PUBLISH_RELEASE: 'true'
8+
JAVA_DISTRIBUTION: liberica
9+
JAVA_VERSION: 17.0.17 # this must be a specific version for reproducible builds, keep in sync with .sdkmanrc
10+
REPO_NAME: ${{ github.event.repository.name }}
11+
TAG: ${{ github.event.release.tag_name }}
12+
VERSION: will be computed in each job
13+
jobs:
14+
publish:
15+
name: "Create and Stage Release Artifacts"
16+
permissions:
17+
contents: write # to add distribution to the GitHub release page
18+
issues: write # to modify milestones
19+
runs-on: ubuntu-24.04
20+
steps:
21+
- name: "📝 Establish release version"
22+
run: |
23+
echo "Release version: ${TAG#v}"
24+
echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
25+
- name: "📥 Checkout the repository"
26+
uses: actions/checkout@v5
27+
with:
28+
ref: ${{ env.TAG }}
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
- name: "📅 Store common build date" # to ensure a reproducible build
31+
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
32+
- name: "📅 Ensure source files use common date"
33+
run: find . -depth \( -type f -o -type d \) -exec touch -d "@${SOURCE_DATE_EPOCH}" {} +
34+
- name: "☕️ Setup JDK"
35+
uses: actions/setup-java@v5
36+
with:
37+
distribution: ${{ env.JAVA_DISTRIBUTION }}
38+
java-version: ${{ env.JAVA_VERSION }}
39+
- name: "🐘 Setup Gradle"
40+
uses: gradle/actions/setup-gradle@v5
41+
- name: "⚙️ Run pre-release"
42+
uses: grails/github-actions/pre-release@asf
43+
env:
44+
RELEASE_VERSION: ${{ env.VERSION }}
45+
- name: "🔐 Generate key file for artifact signing"
46+
env:
47+
SECRING_FILE: ${{ secrets.SECRING_FILE }}
48+
run: |
49+
printf "%s" "$SECRING_FILE" | base64 -d > "${{ github.workspace }}/secring.gpg"
50+
- name: "📤 Publish to Maven Central"
51+
env:
52+
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
53+
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
54+
NEXUS_PUBLISH_URL: 'https://ossrh-staging-api.central.sonatype.com/service/local/'
55+
NEXUS_PUBLISH_DESCRIPTION: '${{ env.REPO_NAME }}:${{ env.VERSION }}'
56+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
57+
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
58+
run: >
59+
./gradlew
60+
-Psigning.keyId=${SIGNING_KEY}
61+
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
62+
publishMavenPublicationToSonatypeRepository
63+
closeSonatypeStagingRepository
64+
- name: "📅 Generate Build Date file"
65+
run: echo "$SOURCE_DATE_EPOCH" >> build/BUILD_DATE.txt
66+
- name: "📤 Upload Build Date file"
67+
uses: softprops/action-gh-release@v2
68+
with:
69+
tag_name: ${{ env.TAG }}
70+
files: build/BUILD_DATE.txt
71+
release:
72+
name: "Release Staging Repository, Publish Docs and Run Post-Release"
73+
needs: publish
74+
runs-on: ubuntu-24.04
75+
permissions:
76+
contents: write
77+
issues: write
78+
pull-requests: write
79+
steps:
80+
- name: "📝 Establish release version"
81+
run: |
82+
echo "Release version: ${TAG#v}"
83+
echo "VERSION=${TAG#v}" >> "$GITHUB_ENV"
84+
- name: "📥 Checkout repository"
85+
uses: actions/checkout@v5
86+
with:
87+
ref: ${{ env.TAG }}
88+
token: ${{ secrets.GITHUB_TOKEN }}
89+
- name: "☕️ Setup JDK"
90+
uses: actions/setup-java@v5
91+
with:
92+
distribution: ${{ env.JAVA_DISTRIBUTION }}
93+
java-version: ${{ env.JAVA_VERSION }}
94+
- name: "🐘 Setup Gradle"
95+
uses: gradle/actions/setup-gradle@v5
96+
- name: "📤 Release staging repository"
97+
env:
98+
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
99+
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
100+
NEXUS_PUBLISH_URL: 'https://ossrh-staging-api.central.sonatype.com/service/local/'
101+
NEXUS_PUBLISH_DESCRIPTION: '${{ env.REPO_NAME }}:${{ env.VERSION }}'
102+
run: >
103+
./gradlew
104+
findSonatypeStagingRepository
105+
releaseSonatypeStagingRepository
106+
- name: "📖 Generate Documentation"
107+
run: ./gradlew docs
108+
- name: "📤 Publish Documentation to Github Pages"
109+
uses: apache/grails-github-actions/deploy-github-pages@asf
110+
env:
111+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112+
GRADLE_PUBLISH_RELEASE: 'true'
113+
SOURCE_FOLDER: plugin/build/docs
114+
- name: "⚙️ Run post-release"
115+
uses: apache/grails-github-actions/post-release@asf

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ out/
1010
.project
1111
.settings
1212
.classpath
13+
!buildSrc/src/main/groovy/build

.sdkmanrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
java=17.0.17-librca

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Apache License
1+
Apache License
22
Version 2.0, January 2004
33
http://www.apache.org/licenses/
44

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1-
## Docs
1+
# 🧩 Grails Logical Delete Plugin
2+
3+
[![Maven Central](https://img.shields.io/maven-central/v/org.grails.plugins/grails-logical-delete.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/org.grails.plugins/grails-logical-delete)
4+
[![Java CI](https://github.com/grails-plugins/grails-logical-delete/actions/workflows/gradle.yml/badge.svg?event=push)](https://github.com/grails-plugins/grails-logical-delete/actions/workflows/gradle.yml)
5+
6+
The **Grails Logical Delete** plugin provides a simple way to implement logical deletion (soft delete)
7+
of domain class instances in Grails applications.
8+
9+
Instead of permanently removing records from the database, the plugin marks them as deleted,
10+
allowing you to preserve data integrity, maintain audit history, and safely “undelete” entities when needed.
11+
12+
## ✨ Features
13+
14+
- **Transparent soft-deletes** — automatically updates a flag instead of issuing DELETE statements.
15+
- **Query filtering** — excludes logically deleted records from queries by default.
16+
- **Undelete support** — easily restore logically deleted records.
17+
18+
## 📚 Documentation
19+
20+
[Latest release](https://grails-plugins.github.io/grails-logical-delete/latest/) | [Latest snapshot](https://grails-plugins.github.io/grails-logical-delete/snapshot/)
221

3-
See [grails-plugins.github.io/gorm-logical-delete/](https://grails-plugins.github.io/gorm-logical-delete/).

0 commit comments

Comments
 (0)