Skip to content

Commit

Permalink
Fix bom import, use liberica, use grails github actions, support the …
Browse files Browse the repository at this point in the history
…pre release workflow
  • Loading branch information
jdaugherty committed Dec 21, 2024
1 parent d76913b commit a035f7b
Show file tree
Hide file tree
Showing 14 changed files with 58 additions and 19 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: liberica
java-version: '17'
- name: Start MongoDB
uses: supercharge/[email protected]
Expand All @@ -36,6 +36,7 @@ jobs:
uses: gradle/gradle-build-action@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: build
publish:
Expand All @@ -49,7 +50,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: liberica
java-version: '17'
- name: Publish to repo.grails.org
id: publish
Expand Down Expand Up @@ -78,7 +79,7 @@ jobs:
if_false: ${{ github.repository }}
- name: Publish to Github Pages
if: steps.docs.outcome == 'success'
uses: micronaut-projects/github-pages-deploy-action@master
uses: grails/github-pages-deploy-action@main
env:
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/groovy-joint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ jobs:
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 }}
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
with:
build-root-directory: ../groovy
arguments: |
Expand Down Expand Up @@ -158,6 +159,7 @@ jobs:
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 }}
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: |
build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
# Otherwise:
- name: Export Gradle Properties
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
uses: micronaut-projects/github-actions/export-gradle-properties@master
- uses: micronaut-projects/github-actions/release-notes@master
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:
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
id: release_version
run: echo ::set-output name=release_version::${GITHUB_REF:11}
- name: Run pre-release
uses: micronaut-projects/github-actions/pre-release@master
uses: grails/github-actions/pre-release@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Sonatyoe OSSRH
Expand All @@ -35,14 +35,27 @@ jobs:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
echo $SECRING_FILE | base64 -d > secring.gpg
echo "Publishing Artifacts"
(set -x; ./gradlew -Psigning.secretKeyRingFile="${GITHUB_WORKSPACE}/secring.gpg" publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon)
- name: Build Documentation
if: success()
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Publishing Documentation"
./gradlew docs:docs
- name: Export Gradle Properties
uses: micronaut-projects/github-actions/export-gradle-properties@master
uses: grails/github-actions/export-gradle-properties@main
- name: Determine docs target repository
if: success()
uses: haya14busa/action-cond@v1
Expand All @@ -53,7 +66,7 @@ jobs:
if_false: ${{ github.repository }}
- name: Publish to Github Pages
if: success()
uses: micronaut-projects/github-pages-deploy-action@master
uses: grails/github-pages-deploy-action@main
env:
BETA: ${{ contains(steps.release_version.outputs.release_version, 'M') || contains(steps.release_version.outputs.release_version, 'RC') }}
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }}
Expand All @@ -67,7 +80,7 @@ jobs:
VERSION: ${{ steps.release_version.outputs.release_version }}
- name: Run post-release
if: success()
uses: micronaut-projects/github-actions/post-release@master
uses: grails/github-actions/post-release@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
env:
Expand Down
1 change: 1 addition & 0 deletions boot-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dependencies {
implementation platform("org.grails:grails-bom:$grailsVersion")

compileOnly "org.grails:grails-shell", {
exclude group:'org.apache.groovy', module:'groovy'
}
Expand Down
16 changes: 13 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ allprojects {
}
}
// mavenLocal() // do not commit uncommented, for local testing only
if (System.getenv("GITHUB_MAVEN_PASSWORD") && !grailsVersion.endsWith('-SNAPSHOT')) {
System.out.println("Adding Grails Core Repo for ${project.name}")
maven {
url = 'https://maven.pkg.github.com/grails/grails-core'
credentials {
username = 'DOES_NOT_MATTER'
password = System.getenv("GITHUB_MAVEN_PASSWORD")
}
}
}
}
}

Expand All @@ -86,7 +96,6 @@ subprojects { Project subproject ->
}

dependencies {
implementation platform("org.grails:grails-bom:$grailsVersion")
testImplementation "io.micrometer:micrometer-core:latest.integration"
testImplementation "org.hibernate.validator:hibernate-validator"
testImplementation "org.apache.groovy:groovy-test-junit5"
Expand Down Expand Up @@ -311,8 +320,9 @@ class PublishingConvention {
name = 'rx-mongodb'
projectName = 'RxGORM for MongoDB'
}
else if(name == 'json-templates') {
projectName = 'JSON Views Templates'
else if(name.endsWith('json-templates')) {
projectName = 'Grails Views'
projectDescription = "Provides JSON Views for MongoDB to the Grails framework."
}
projectArtifactId = name
}
Expand Down
1 change: 1 addition & 0 deletions examples/grails3-hibernate5-mongodb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
group "examples"

dependencies {
implementation platform("org.grails:grails-bom:$grailsVersion")

implementation project(":grails-plugin")
implementation "org.mongodb:mongodb-driver-sync"
Expand Down
2 changes: 2 additions & 0 deletions examples/grails3-mongodb-database-per-tenant/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugins {
}

dependencies {
implementation platform("org.grails:grails-bom:$grailsVersion")

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

Expand Down
1 change: 1 addition & 0 deletions examples/grails3-mongodb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
group "examples"

dependencies {
implementation platform("org.grails:grails-bom:$grailsVersion")

implementation project(":grails-plugin")
implementation "org.mongodb:mongodb-driver-sync"
Expand Down
1 change: 1 addition & 0 deletions examples/gson-templates/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
group = 'functional.tests'

dependencies {
implementation platform("org.grails:grails-bom:$grailsVersion")

implementation 'org.grails.plugins:views-json'
implementation 'org.grails.plugins:views-markup'
Expand Down
2 changes: 2 additions & 0 deletions examples/springboot-mongodb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apply plugin: 'org.springframework.boot'
ext['groovy.version'] = "$groovyVersion"

dependencies {
implementation platform("org.grails:grails-bom:$grailsVersion")

implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.mongodb:mongodb-driver-sync"
implementation project(":gorm-mongodb-spring-boot")
Expand Down
2 changes: 2 additions & 0 deletions examples/test-data-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ buildscript {
apply plugin: "java"

dependencies {
implementation platform("org.grails:grails-bom:$grailsVersion")

implementation "org.grails:grails-plugin-codecs"
implementation "org.grails:grails-plugin-datasource"
implementation "org.grails.plugins:cache"
Expand Down
14 changes: 8 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
projectVersion=9.0.0-SNAPSHOT
projectVersion=9.0.0-M2
asciidoctorGradleVersion=4.0.3
datastoreVersion=9.0.0-M2
gradleNexusPublishPluginVersion=1.3.0
grailsGradlePluginVersion=7.0.0-SNAPSHOT
grailsSpringSecurityCoreVersion=7.0.0-SNAPSHOT
grailsSpringSecurityRestVersion=6.0.0-SNAPSHOT
grailsVersion=7.0.0-SNAPSHOT
grailsViewsVersion=4.0.0-SNAPSHOT
grailsGradlePluginVersion=7.0.0-M2
grailsVersion=7.0.0-M1
grailsViewsVersion=4.0.0-M1
groovyVersion=4.0.24
mongodbDriverVersion=5.1.4
testcontainersMongodbVersion=1.20.1

# for example apps only
grailsSpringSecurityCoreVersion=7.0.0-SNAPSHOT
grailsSpringSecurityRestVersion=6.0.0-SNAPSHOT

org.gradle.caching=true
org.gradle.parallel=false
org.gradle.daemon=true
Expand Down
3 changes: 2 additions & 1 deletion grails-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ dependencies {
}
api project(":grails-datastore-gorm-mongodb-ext"), {
exclude group:'org.grails', module:'grails-datastore-gorm-mongodb'
}
exclude group:'org.grails', module:'grails-bom'
}
api project(":grails-datastore-gorm-mongodb"), {
exclude group:'org.springframework', module:'spring-context'
exclude group:'org.springframework', module:'spring-core'
Expand Down

0 comments on commit a035f7b

Please sign in to comment.