Skip to content

Commit 4ef9c1c

Browse files
committed
Update to Grails 7.0.0-M5
1 parent 17f5060 commit 4ef9c1c

File tree

18 files changed

+284
-295
lines changed

18 files changed

+284
-295
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ jobs:
6262
env:
6363
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
6464
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
65-
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
65+
MAVEN_PUBLISH_URL: 'https://repo.grails.org/artifactory/plugins3-snapshots-local'
6666
working-directory: ./plugin
6767
run: ../gradlew publish

.github/workflows/release.yml

Lines changed: 63 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,41 @@ on:
33
release:
44
types: [published]
55
env:
6-
GIT_USER_NAME: 'grails-build'
7-
GIT_USER_EMAIL: 'grails-build@users.noreply.github.com'
6+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7+
JAVA_VERSION: '17.0.15' # this must be a specific version for reproducible builds
8+
RELEASE_TAG_PREFIX: 'v'
89
jobs:
910
publish:
1011
permissions:
12+
packages: read # pre-release workflow
1113
contents: write # to create release
1214
issues: write # to modify milestones
13-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-24.04
1416
outputs:
1517
release_version: ${{ steps.release_version.outputs.value }}
16-
target_branch: ${{ steps.extract_branch.outputs.value }}
18+
extract_repository_name: ${{ steps.extract_repository_name.outputs.repository_name }}
1719
steps:
20+
- name: "📝 Store the current release version"
21+
id: release_version
22+
run: |
23+
export RELEASE_VERSION="${{ github.ref_name }}"
24+
export RELEASE_VERSION=${RELEASE_VERSION:${#RELEASE_TAG_PREFIX}}
25+
echo "Found Release Version: ${RELEASE_VERSION}"
26+
echo "value=${RELEASE_VERSION}" >> $GITHUB_OUTPUT
27+
- name: "Extract repository name"
28+
id: extract_repository_name
29+
run: |
30+
echo "repository_name=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT
1831
- name: "📥 Checkout the repository"
1932
uses: actions/checkout@v4
2033
with:
21-
token: ${{ secrets.GH_TOKEN }}
34+
token: ${{ secrets.GITHUB_TOKEN }}
35+
ref: v{{ steps.release_version.outputs.value }}
36+
- name: 'Ensure Common Build Date' # to ensure a reproducible build
37+
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"
38+
- name: "Ensure source files use common date"
39+
run: |
40+
find . -depth \( -type f -o -type d \) -exec touch -d "@${SOURCE_DATE_EPOCH}" {} +
2241
- name: "🧱 Setup up node"
2342
uses: actions/setup-node@v3
2443
with:
@@ -30,81 +49,74 @@ jobs:
3049
- name: "☕️ Setup JDK"
3150
uses: actions/setup-java@v4
3251
with:
33-
distribution: 'liberica'
34-
java-version: '17'
52+
distribution: liberica
53+
java-version: ${{ env.JAVA_VERSION }}
3554
- name: "🐘 Setup Gradle"
3655
uses: gradle/actions/setup-gradle@v4
37-
- name: "📝 Store the target branch"
38-
id: extract_branch
39-
run: |
40-
echo "Determining Target Branch"
41-
TARGET_BRANCH=${GITHUB_REF#refs/heads/}
42-
echo $TARGET_BRANCH
43-
echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
44-
- name: "📝Set the current release version"
45-
id: release_version
46-
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
4756
- name: "⚙️ Run pre-release"
48-
uses: grails/github-actions/pre-release@main
49-
with:
50-
token: ${{ secrets.GITHUB_TOKEN }}
57+
uses: grails/github-actions/pre-release@asf
58+
env:
59+
RELEASE_VERSION: ${{ steps.release_version.outputs.value }}
5160
- name: "🧩 Run Assemble"
52-
if: success()
5361
id: assemble
5462
run: ./gradlew -U assemble
55-
- name: "🔐 Generate secring file"
63+
- name: "🔐 Generate key file for artifact signing"
5664
env:
5765
SECRING_FILE: ${{ secrets.SECRING_FILE }}
5866
run: echo $SECRING_FILE | base64 -d > ${{ github.workspace }}/secring.gpg
59-
- name: "🚀 Publish to Sonatype OSSRH"
60-
id: publish
67+
- name: "📤 Publish to Maven Central"
6168
env:
62-
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
63-
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
64-
NEXUS_PUBLISH_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }}
65-
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }}
69+
GRAILS_PUBLISH_RELEASE: 'true'
70+
NEXUS_PUBLISH_USERNAME: ${{ secrets.MAVEN_USERNAME }}
71+
NEXUS_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
72+
NEXUS_PUBLISH_URL: 'https://ossrh-staging-api.central.sonatype.com/service/local/'
73+
NEXUS_PUBLISH_DESCRIPTION: '${{ steps.extract_repository_name.outputs.repository_name }}:${{ steps.release_version.outputs.value }}'
6674
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
67-
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
68-
SECRING_FILE: ${{ secrets.SECRING_FILE }}
75+
SIGNING_PASSPHRASE: ${{ secrets.SECRING_PASSPHRASE }}
6976
run: >
7077
./gradlew
71-
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
72-
publishToSonatype
78+
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
79+
publishMavenPublicationToSonatypeRepository
80+
publishPluginMavenPublicationToSonatypeRepository
7381
closeSonatypeStagingRepository
82+
- name: "Generate Build Date file"
83+
run: echo "$SOURCE_DATE_EPOCH" >> build/BUILD_DATE.txt
84+
- name: "Upload Build Date file"
85+
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631
86+
with:
87+
files: build/BUILD_DATE.txt
88+
env:
89+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7490
release:
7591
needs: publish
7692
runs-on: ubuntu-latest
7793
permissions:
78-
contents: read
94+
contents: write
95+
issues: write
96+
pull-requests: write
7997
steps:
8098
- name: "📥 Checkout repository"
8199
uses: actions/checkout@v4
100+
with:
101+
token: ${{ secrets.GITHUB_TOKEN }}
102+
ref: v${{ needs.publish.outputs.release_version }}
82103
- name: "☕️ Setup JDK"
83104
uses: actions/setup-java@v4
84105
with:
85106
distribution: liberica
86-
java-version: 17
87-
- name: "📥 Checkout repository"
88-
uses: actions/checkout@v4
89-
with:
90-
token: ${{ secrets.GH_TOKEN }}
91-
ref: v${{ needs.publish.outputs.release_version }}
107+
java-version: ${{ env.JAVA_VERSION }}
92108
- name: "🐘 Setup Gradle"
93109
uses: gradle/actions/setup-gradle@v4
94-
- name: "🏆Nexus Staging Close And Release"
110+
- name: "📤 Release staging repository"
95111
env:
96-
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
97-
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
98-
NEXUS_PUBLISH_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }}
99-
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }}
112+
GRAILS_PUBLISH_RELEASE: 'true'
113+
NEXUS_PUBLISH_USERNAME: ${{ secrets.MAVEN_USERNAME }}
114+
NEXUS_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
115+
NEXUS_PUBLISH_URL: 'https://ossrh-staging-api.central.sonatype.com/service/local/'
116+
NEXUS_PUBLISH_DESCRIPTION: '${{ needs.publish.outputs.extract_repository_name }}:${{ needs.publish.outputs.release_version }}'
100117
run: >
101118
./gradlew
102119
findSonatypeStagingRepository
103120
releaseSonatypeStagingRepository
104-
- name: "⚙️Run post-release"
105-
if: success()
106-
uses: grails/github-actions/post-release@main
107-
with:
108-
token: ${{ secrets.GITHUB_TOKEN }}
109-
env:
110-
SNAPSHOT_SUFFIX: -SNAPSHOT
121+
- name: "⚙️ Run post-release"
122+
uses: apache/grails-github-actions/post-release@asf

app/build.gradle

Lines changed: 27 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,53 @@
1-
buildscript {
2-
repositories {
3-
maven { url "https://plugins.gradle.org/m2/" }
4-
maven { url "https://repo.grails.org/grails/core" }
5-
}
6-
dependencies {
7-
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
8-
classpath "org.grails.plugins:hibernate5:$grailsHibernateGradlePluginVersion"
9-
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:$assetPipelineVersion"
10-
}
11-
}
12-
131
plugins {
142
id "groovy"
15-
id "war"
16-
id "idea"
17-
id "com.bertramlabs.asset-pipeline" version "$assetPipelineVersion"
18-
id "eclipse"
3+
id "cloud.wondrify.asset-pipeline"
194
}
205

21-
apply plugin: "org.grails.grails-web"
22-
apply plugin: "org.grails.grails-gsp"
6+
apply plugin: "org.apache.grails.gradle.grails-web"
7+
apply plugin: "org.apache.grails.gradle.grails-gsp"
8+
239

10+
version = project.projectVersion
2411
group = "grails.app"
2512

2613
dependencies {
27-
implementation platform("org.grails:grails-bom:$grailsVersion")
28-
29-
implementation("org.grails:grails-core")
30-
implementation("org.grails:grails-logging")
31-
implementation("org.grails:grails-plugin-databinding")
32-
implementation("org.grails:grails-plugin-i18n")
33-
implementation("org.grails:grails-plugin-interceptors")
34-
implementation("org.grails:grails-plugin-rest")
35-
implementation("org.grails:grails-plugin-services")
36-
implementation("org.grails:grails-plugin-url-mappings")
37-
implementation("org.grails:grails-web-boot")
38-
implementation("org.grails.plugins:gsp")
39-
implementation("org.grails.plugins:hibernate5")
40-
implementation("org.grails.plugins:scaffolding")
14+
implementation platform("org.apache.grails:grails-bom:$grailsVersion")
15+
16+
implementation("org.apache.grails:grails-core")
17+
implementation("org.apache.grails:grails-logging")
18+
implementation("org.apache.grails:grails-databinding")
19+
implementation("org.apache.grails:grails-i18n")
20+
implementation("org.apache.grails:grails-interceptors")
21+
implementation("org.apache.grails:grails-rest-transforms")
22+
implementation("org.apache.grails:grails-services")
23+
implementation("org.apache.grails:grails-url-mappings")
24+
implementation("org.apache.grails:grails-web-boot")
25+
implementation("org.apache.grails:grails-gsp")
26+
implementation("org.apache.grails:grails-data-hibernate5")
27+
implementation("org.apache.grails:grails-scaffolding")
4128
implementation("org.springframework.boot:spring-boot-autoconfigure")
4229
implementation("org.springframework.boot:spring-boot-starter")
4330
implementation("org.springframework.boot:spring-boot-starter-actuator")
4431
implementation("org.springframework.boot:spring-boot-starter-logging")
4532
implementation("org.springframework.boot:spring-boot-starter-tomcat")
4633
implementation("org.springframework.boot:spring-boot-starter-validation")
47-
console("org.grails:grails-console")
48-
runtimeOnly("com.bertramlabs.plugins:asset-pipeline-grails")
34+
console("org.apache.grails:grails-console")
35+
runtimeOnly("cloud.wondrify:asset-pipeline-grails")
4936
runtimeOnly("com.h2database:h2")
5037
runtimeOnly("org.apache.tomcat:tomcat-jdbc")
5138
runtimeOnly("org.fusesource.jansi:jansi")
52-
testImplementation("org.grails:grails-gorm-testing-support")
53-
testImplementation("org.grails:grails-web-testing-support")
39+
testImplementation("org.apache.grails:grails-testing-support-datamapping")
40+
testImplementation("org.apache.grails:grails-testing-support-web")
5441

55-
integrationTestImplementation testFixtures("org.grails.plugins:geb")
42+
integrationTestImplementation testFixtures("org.apache.grails:grails-geb")
5643
testImplementation("org.spockframework:spock-core")
5744

5845
implementation project(':grails-web-console')
59-
6046
}
6147

62-
tasks.withType(Test) {
63-
useJUnitPlatform()
48+
apply {
49+
from project.rootProject.layout.projectDirectory.file('gradle/java-config.gradle')
50+
from project.rootProject.layout.projectDirectory.file('gradle/test-config.gradle')
6451
}
6552

6653
assets {

build.gradle

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
11
buildscript {
22
repositories {
3-
maven { url "https://plugins.gradle.org/m2/" }
4-
maven { url "https://repo.grails.org/grails/core" }
3+
maven { url 'https://plugins.gradle.org/m2/' }
4+
maven { url 'https://repo.grails.org/grails/restricted' }
55
}
66
dependencies {
7-
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
7+
classpath platform("org.apache.grails:grails-bom:${grailsVersion}")
8+
classpath 'org.apache.grails:grails-gradle-plugins'
89
}
910
}
1011

1112
allprojects {
1213
repositories {
14+
maven { url "https://repo.grails.org/grails/restricted" }
1315
mavenCentral()
14-
maven { url "https://repo.grails.org/grails/core" }
1516
}
1617
}
1718

1819
version project.projectVersion
1920
group "org.grails.plugins"
2021

2122
subprojects { project ->
22-
version project.projectVersion
23-
24-
apply plugin: "groovy"
25-
26-
project.compileJava.options.release = 17
27-
2823
if(project.name.endsWith('grails-web-console')) {
29-
apply plugin: "org.grails.grails-publish"
24+
apply plugin: "org.apache.grails.gradle.grails-publish"
3025

3126
grailsPublish {
3227
githubSlug = 'grails-plugins/grails-web-console'
@@ -35,7 +30,7 @@ subprojects { project ->
3530
name = 'Apache-2.0'
3631
}
3732
title = "Grails Web Console Plugin"
38-
desc = "A web-based Groovy console for interactive runtime application management and debugging"
33+
desc = "A Grails Plugin that adds a web-based Groovy console for interactive runtime application management and debugging"
3934
developers = [ziegfried: 'Siegfried Puchbauer', mingfai: 'Mingfai Ma', burtbeckwith: 'Burt Beckwith', sheehan: 'Matt Sheehan', mjhugo: 'Mike Hugo', kdybicz: 'Kamil Dybicz', vsachinv: 'vsachinv' ]
4035
}
4136
}

buildSrc/build.gradle

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* https://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
plugins {
21+
id 'groovy-gradle-plugin'
22+
}
23+
24+
file('../gradle.properties').withInputStream {
25+
Properties props = new Properties()
26+
props.load(it)
27+
project.ext.gradleProperties = props
28+
}
29+
30+
compileJava.options.release = gradleProperties.javaVersion.toString().toInteger()
31+
32+
repositories {
33+
maven { url = 'https://repo.grails.org/grails/restricted' }
34+
mavenCentral()
35+
gradlePluginPortal()
36+
}
37+
38+
dependencies {
39+
implementation platform("org.apache.grails:grails-gradle-bom:${gradleProperties.grailsVersion}")
40+
implementation 'cloud.wondrify:asset-pipeline-gradle'
41+
implementation 'org.apache.grails:grails-gradle-plugins'
42+
implementation "com.adarshr.test-logger:com.adarshr.test-logger.gradle.plugin:${gradleProperties.testLoggerVersion}"
43+
}

gradle.properties

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
projectVersion=7.0.0-SNAPSHOT
2-
3-
grailsVersion=7.0.0-M1
4-
grailsGradlePluginVersion=7.0.0-SNAPSHOT
5-
grailsHibernateGradlePluginVersion=9.0.0-M2
6-
assetPipelineVersion=5.0.5
2+
grailsVersion=7.0.0-M5
3+
javaVersion=17
4+
testLoggerVersion=4.0.0
75

86
org.gradle.caching=true
97
org.gradle.daemon=true

0 commit comments

Comments
 (0)