Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 53c9a54

Browse files
authored
Merge pull request #784 from jdaugherty/9.0.x
Fix bom import, use liberica, use grails github actions, support the pre release workflow
2 parents d76913b + a035f7b commit 53c9a54

File tree

14 files changed

+58
-19
lines changed

14 files changed

+58
-19
lines changed

.github/workflows/gradle.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up JDK
2727
uses: actions/setup-java@v4
2828
with:
29-
distribution: temurin
29+
distribution: liberica
3030
java-version: '17'
3131
- name: Start MongoDB
3232
uses: supercharge/[email protected]
@@ -36,6 +36,7 @@ jobs:
3636
uses: gradle/gradle-build-action@v3
3737
env:
3838
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
39+
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
3940
with:
4041
arguments: build
4142
publish:
@@ -49,7 +50,7 @@ jobs:
4950
- name: Set up JDK
5051
uses: actions/setup-java@v4
5152
with:
52-
distribution: temurin
53+
distribution: liberica
5354
java-version: '17'
5455
- name: Publish to repo.grails.org
5556
id: publish
@@ -78,7 +79,7 @@ jobs:
7879
if_false: ${{ github.repository }}
7980
- name: Publish to Github Pages
8081
if: steps.docs.outcome == 'success'
81-
uses: micronaut-projects/github-pages-deploy-action@master
82+
uses: grails/github-pages-deploy-action@main
8283
env:
8384
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
8485
GH_TOKEN: ${{ secrets.GH_TOKEN }}

.github/workflows/groovy-joint-workflow.yml

+2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
116116
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
117117
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
118+
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
118119
with:
119120
build-root-directory: ../groovy
120121
arguments: |
@@ -158,6 +159,7 @@ jobs:
158159
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
159160
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
160161
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
162+
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
161163
with:
162164
arguments: |
163165
build

.github/workflows/release-notes.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
# Otherwise:
3232
- name: Export Gradle Properties
3333
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
34-
uses: micronaut-projects/github-actions/export-gradle-properties@master
35-
- uses: micronaut-projects/github-actions/release-notes@master
34+
uses: grails/github-actions/export-gradle-properties@main
35+
- uses: grails/github-actions/release-notes@main
3636
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
3737
id: release_notes
3838
with:

.github/workflows/release.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
id: release_version
2424
run: echo ::set-output name=release_version::${GITHUB_REF:11}
2525
- name: Run pre-release
26-
uses: micronaut-projects/github-actions/pre-release@master
26+
uses: grails/github-actions/pre-release@main
2727
with:
2828
token: ${{ secrets.GITHUB_TOKEN }}
2929
- name: Publish to Sonatyoe OSSRH
@@ -35,14 +35,27 @@ jobs:
3535
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
3636
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
3737
SECRING_FILE: ${{ secrets.SECRING_FILE }}
38+
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
3839
run: |
3940
echo $SECRING_FILE | base64 -d > secring.gpg
4041
echo "Publishing Artifacts"
4142
(set -x; ./gradlew -Psigning.secretKeyRingFile="${GITHUB_WORKSPACE}/secring.gpg" publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon)
43+
- name: Build Documentation
44+
if: success()
45+
env:
46+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
47+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
48+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
49+
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
50+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
51+
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
52+
SECRING_FILE: ${{ secrets.SECRING_FILE }}
53+
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
54+
run: |
4255
echo "Publishing Documentation"
4356
./gradlew docs:docs
4457
- name: Export Gradle Properties
45-
uses: micronaut-projects/github-actions/export-gradle-properties@master
58+
uses: grails/github-actions/export-gradle-properties@main
4659
- name: Determine docs target repository
4760
if: success()
4861
uses: haya14busa/action-cond@v1
@@ -53,7 +66,7 @@ jobs:
5366
if_false: ${{ github.repository }}
5467
- name: Publish to Github Pages
5568
if: success()
56-
uses: micronaut-projects/github-pages-deploy-action@master
69+
uses: grails/github-pages-deploy-action@main
5770
env:
5871
BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }}
5972
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
@@ -67,7 +80,7 @@ jobs:
6780
VERSION: ${{ steps.release_version.outputs.release_version }}
6881
- name: Run post-release
6982
if: success()
70-
uses: micronaut-projects/github-actions/post-release@master
83+
uses: grails/github-actions/post-release@main
7184
with:
7285
token: ${{ secrets.GITHUB_TOKEN }}
7386
env:

boot-plugin/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
dependencies {
22
implementation platform("org.grails:grails-bom:$grailsVersion")
3+
34
compileOnly "org.grails:grails-shell", {
45
exclude group:'org.apache.groovy', module:'groovy'
56
}

build.gradle

+13-3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ allprojects {
6767
}
6868
}
6969
// mavenLocal() // do not commit uncommented, for local testing only
70+
if (System.getenv("GITHUB_MAVEN_PASSWORD") && !grailsVersion.endsWith('-SNAPSHOT')) {
71+
System.out.println("Adding Grails Core Repo for ${project.name}")
72+
maven {
73+
url = 'https://maven.pkg.github.com/grails/grails-core'
74+
credentials {
75+
username = 'DOES_NOT_MATTER'
76+
password = System.getenv("GITHUB_MAVEN_PASSWORD")
77+
}
78+
}
79+
}
7080
}
7181
}
7282

@@ -86,7 +96,6 @@ subprojects { Project subproject ->
8696
}
8797

8898
dependencies {
89-
implementation platform("org.grails:grails-bom:$grailsVersion")
9099
testImplementation "io.micrometer:micrometer-core:latest.integration"
91100
testImplementation "org.hibernate.validator:hibernate-validator"
92101
testImplementation "org.apache.groovy:groovy-test-junit5"
@@ -311,8 +320,9 @@ class PublishingConvention {
311320
name = 'rx-mongodb'
312321
projectName = 'RxGORM for MongoDB'
313322
}
314-
else if(name == 'json-templates') {
315-
projectName = 'JSON Views Templates'
323+
else if(name.endsWith('json-templates')) {
324+
projectName = 'Grails Views'
325+
projectDescription = "Provides JSON Views for MongoDB to the Grails framework."
316326
}
317327
projectArtifactId = name
318328
}

examples/grails3-hibernate5-mongodb/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
group "examples"
66

77
dependencies {
8+
implementation platform("org.grails:grails-bom:$grailsVersion")
89

910
implementation project(":grails-plugin")
1011
implementation "org.mongodb:mongodb-driver-sync"

examples/grails3-mongodb-database-per-tenant/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ plugins {
33
}
44

55
dependencies {
6+
implementation platform("org.grails:grails-bom:$grailsVersion")
7+
68
implementation project(":grails-plugin")
79
implementation "org.mongodb:mongodb-driver-sync"
810

examples/grails3-mongodb/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
group "examples"
66

77
dependencies {
8+
implementation platform("org.grails:grails-bom:$grailsVersion")
89

910
implementation project(":grails-plugin")
1011
implementation "org.mongodb:mongodb-driver-sync"

examples/gson-templates/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ plugins {
88
group = 'functional.tests'
99

1010
dependencies {
11+
implementation platform("org.grails:grails-bom:$grailsVersion")
1112

1213
implementation 'org.grails.plugins:views-json'
1314
implementation 'org.grails.plugins:views-markup'

examples/springboot-mongodb/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ apply plugin: 'org.springframework.boot'
33
ext['groovy.version'] = "$groovyVersion"
44

55
dependencies {
6+
implementation platform("org.grails:grails-bom:$grailsVersion")
7+
68
implementation "org.springframework.boot:spring-boot-starter-web"
79
implementation "org.mongodb:mongodb-driver-sync"
810
implementation project(":gorm-mongodb-spring-boot")

examples/test-data-service/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ buildscript {
1212
apply plugin: "java"
1313

1414
dependencies {
15+
implementation platform("org.grails:grails-bom:$grailsVersion")
16+
1517
implementation "org.grails:grails-plugin-codecs"
1618
implementation "org.grails:grails-plugin-datasource"
1719
implementation "org.grails.plugins:cache"

gradle.properties

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
projectVersion=9.0.0-SNAPSHOT
1+
projectVersion=9.0.0-M2
22
asciidoctorGradleVersion=4.0.3
33
datastoreVersion=9.0.0-M2
44
gradleNexusPublishPluginVersion=1.3.0
5-
grailsGradlePluginVersion=7.0.0-SNAPSHOT
6-
grailsSpringSecurityCoreVersion=7.0.0-SNAPSHOT
7-
grailsSpringSecurityRestVersion=6.0.0-SNAPSHOT
8-
grailsVersion=7.0.0-SNAPSHOT
9-
grailsViewsVersion=4.0.0-SNAPSHOT
5+
grailsGradlePluginVersion=7.0.0-M2
6+
grailsVersion=7.0.0-M1
7+
grailsViewsVersion=4.0.0-M1
108
groovyVersion=4.0.24
119
mongodbDriverVersion=5.1.4
1210
testcontainersMongodbVersion=1.20.1
1311

12+
# for example apps only
13+
grailsSpringSecurityCoreVersion=7.0.0-SNAPSHOT
14+
grailsSpringSecurityRestVersion=6.0.0-SNAPSHOT
15+
1416
org.gradle.caching=true
1517
org.gradle.parallel=false
1618
org.gradle.daemon=true

grails-plugin/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ dependencies {
1818
}
1919
api project(":grails-datastore-gorm-mongodb-ext"), {
2020
exclude group:'org.grails', module:'grails-datastore-gorm-mongodb'
21-
}
21+
exclude group:'org.grails', module:'grails-bom'
22+
}
2223
api project(":grails-datastore-gorm-mongodb"), {
2324
exclude group:'org.springframework', module:'spring-context'
2425
exclude group:'org.springframework', module:'spring-core'

0 commit comments

Comments
 (0)