Skip to content

Commit

Permalink
Merge pull request #457 from jdaugherty/4.0.x
Browse files Browse the repository at this point in the history
Pre release workflow support & removing async from testing support to…
  • Loading branch information
jdaugherty authored Dec 20, 2024
2 parents cbd80ba + b54f3e1 commit d6a8963
Show file tree
Hide file tree
Showing 13 changed files with 100 additions and 143 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: liberica
java-version: 17
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -31,6 +31,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 }}
- name: Publish to Github Pages
if: success()
uses: grails/github-pages-deploy-action@v2
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: liberica
java-version: ${{ matrix.java }}
- name: Run Tests
if: github.event_name == 'pull_request'
Expand All @@ -34,6 +34,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 }}
- name: Run Build
if: github.event_name == 'push'
id: build
Expand All @@ -42,6 +43,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 --refresh-dependencies
- name: Publish Test Report
Expand All @@ -62,6 +64,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 }}
- name: Generate Docs
id: docs
if: steps.publish.outcome == 'success' && github.event_name == 'push' && matrix.java == '17'
Expand All @@ -72,6 +75,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 }}
- name: Publish to Github Pages
if: steps.docs.outcome == 'success' && github.event_name == 'push' && matrix.java == '17'
uses: micronaut-projects/github-pages-deploy-action@master
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/groovy-joint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: liberica
java-version: 17
- name: "🗄️ Cache local Maven repository"
uses: actions/cache@v4
Expand Down Expand Up @@ -108,6 +108,7 @@ jobs:
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
Expand All @@ -121,7 +122,7 @@ jobs:
- name: "☕️ Setup JDK"
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: liberica
java-version: 17
- name: "🐘 Setup Gradle"
uses: gradle/actions/setup-gradle@v4
Expand All @@ -138,6 +139,7 @@ jobs:
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
-PgroovyVersion=${{needs.build_groovy.outputs.groovyVersion}}
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ on:
release:
types: [published]
env:
GIT_USER_NAME: puneetbehl
GIT_USER_EMAIL: [email protected]
GIT_USER_NAME: 'grails-build'
GIT_USER_EMAIL: '[email protected]'
jobs:
publish:
outputs:
Expand Down Expand Up @@ -37,6 +37,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 }}
- name: Upload Distribution
if: success()
uses: actions/upload-artifact@v4
Expand All @@ -60,6 +61,7 @@ jobs:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SECRING_FILE: ${{ secrets.SECRING_FILE }}
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: |
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
Expand Down Expand Up @@ -91,6 +93,7 @@ jobs:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: |
findSonatypeStagingRepository
Expand Down Expand Up @@ -126,6 +129,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: docs
- name: Publish to Github Pages
Expand Down
75 changes: 0 additions & 75 deletions .github/workflows/retry-release.yml

This file was deleted.

54 changes: 31 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ allprojects {
url = 'https://repository.apache.org/content/repositories/snapshots'
}
}

if (System.getenv("GITHUB_MAVEN_PASSWORD") && !grailsVersion.endsWith('-SNAPSHOT')) {
System.out.println("Adding Grails Core Repo")
maven {
url = 'https://maven.pkg.github.com/grails/grails-core'
credentials {
username = 'DOES_NOT_MATTER'
password = System.getenv("GITHUB_MAVEN_PASSWORD")
}
}
}
}
}

Expand Down Expand Up @@ -89,15 +100,15 @@ subprojects { project ->

dependencies {
api "org.apache.groovy:groovy:$groovyVersion"
api "org.slf4j:slf4j-api:$slf4jVersion"
api "org.slf4j:slf4j-api"

testImplementation "org.spockframework:spock-core:${spockVersion}", {
testImplementation "org.spockframework:spock-core", {
exclude module: 'groovy-all'
}
testRuntimeOnly "net.bytebuddy:byte-buddy:$bytebuddyVersion"
testRuntimeOnly "org.objenesis:objenesis:$objenesisVersion"

documentation "org.fusesource.jansi:jansi:$jansiVersion"
documentation "org.fusesource.jansi:jansi"

}

Expand All @@ -111,22 +122,19 @@ subprojects { project ->
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
compileJava.options.release = 17

dependencies {
implementation "com.github.javaparser:javaparser-core:$javaParserVersion"
compileOnly "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"

testImplementation "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
testImplementation "org.apache.groovy:groovy-test-junit5:$groovyVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
testImplementation "org.junit.platform:junit-platform-runner:$junitPlatformVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
testRuntimeOnly "org.junit.platform:junit-platform-commons:$junitPlatformVersion"
implementation platform("org.grails:grails-bom:$grailsVersion")
implementation "com.github.javaparser:javaparser-core"
compileOnly "jakarta.servlet:jakarta.servlet-api"

testImplementation "jakarta.servlet:jakarta.servlet-api"
testImplementation "org.apache.groovy:groovy-test-junit5"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.platform:junit-platform-runner"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
testRuntimeOnly "org.junit.platform:junit-platform-commons"
}

tasks.withType(Test) {
Expand Down Expand Up @@ -270,9 +278,9 @@ subprojects { subproject ->

dependencies {
if (configurations.find { it.name == 'documentation' }) {
documentation "org.fusesource.jansi:jansi:$jansiVersion"
documentation "jline:jline:$jlineVersion"
documentation "com.github.javaparser:javaparser-core:$javaParserVersion"
documentation "org.fusesource.jansi:jansi"
documentation "jline:jline"
documentation "com.github.javaparser:javaparser-core"
documentation "org.apache.groovy:groovy:${groovyVersion}"
documentation "org.apache.groovy:groovy-templates:${groovyVersion}"
documentation "org.apache.groovy:groovy-ant:$groovyVersion"
Expand Down Expand Up @@ -339,9 +347,9 @@ configurations {
dependencies {
if (configurations.find { it.name == 'documentation' }) {
documentation "info.picocli:picocli:$picocliVersion"
documentation "org.fusesource.jansi:jansi:$jansiVersion"
documentation "jline:jline:$jlineVersion"
documentation "com.github.javaparser:javaparser-core:$javaParserVersion"
documentation "org.fusesource.jansi:jansi"
documentation "jline:jline"
documentation "com.github.javaparser:javaparser-core"
documentation "org.apache.groovy:groovy:$groovyVersion"
documentation "org.apache.groovy:groovy-templates:$groovyVersion"
documentation "org.apache.groovy:groovy-ant:$groovyVersion"
Expand Down
2 changes: 1 addition & 1 deletion examples/demo33/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:events"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core-jakarta:$hibernateVersion"
implementation "org.hibernate:hibernate-core-jakarta"
implementation "org.grails.plugins:gsp"
implementation "org.grails.plugins:views-json"
implementation "org.grails.plugins:views-json-templates"
Expand Down
16 changes: 1 addition & 15 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,15 @@ developers=Jeff Brown,James Kleeh
asciidoctorJvmVersion=4.0.1
bytebuddyVersion=1.15.3
grailsGradlePluginVersion=7.0.0-SNAPSHOT
grailsVersion=7.0.0-SNAPSHOT
grailsVersion=7.0.0-M1
grailsDocsVersion=7.0.0-SNAPSHOT
asyncVersion=6.0.0-SNAPSHOT
groovyVersion=4.0.24
gradleNexusPublishPluginVersion=2.0.0
gormVersion=9.0.0-SNAPSHOT
gspVersion=7.0.0-SNAPSHOT
hibernateVersion=5.6.15.Final
jansiVersion=1.18
javassistVersion=3.30.2-GA
javaParserVersion=3.25.10
jlineVersion=2.14.6
jsonViewsVersion=4.0.0-SNAPSHOT
junitPlatformVersion=1.11.1
junitJupiterVersion=5.11.1
objenesisVersion=3.4
picocliVersion=4.7.6
htmlunitVersion=4.4.0
servletApiVersion=6.0.0
slf4jVersion=2.0.16
spockVersion=2.3-groovy-4.0
springVersion=6.2.0
springBootVersion=3.4.0

org.gradle.caching=true
org.gradle.parallel=true
Expand Down
6 changes: 2 additions & 4 deletions grails-gorm-testing-support/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

dependencies {
api "org.grails:grails-plugin-domain-class:$grailsVersion"
api "org.grails:grails-datastore-gorm-test:$gormVersion"
api "org.grails:grails-plugin-domain-class"
api "org.grails:grails-datastore-gorm-test"

api project(':grails-testing-support')
}

27 changes: 12 additions & 15 deletions grails-testing-support/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
dependencies {
api "org.springframework:spring-test:$springVersion"
api("org.grails:grails-plugin-codecs:$grailsVersion") {
api "org.springframework:spring-test"
api("org.grails:grails-plugin-codecs") {
exclude module: 'grails-plugin-mimetypes'
exclude module: 'grails-plugin-converters'
exclude module: 'grails-web'
}
api("org.grails.plugins:async:$asyncVersion") {
exclude module: 'grails-plugin-controllers'
exclude module: 'grails-core'
}
api "org.grails:grails-plugin-databinding:$grailsVersion"
api "org.grails:grails-datastore-gorm:$gormVersion"
api("org.grails:grails-test:$grailsVersion")
api "org.springframework.boot:spring-boot-test:${springBootVersion}"
api("org.spockframework:spock-spring:${spockVersion}") { transitive = false }
api("org.spockframework:spock-core:${spockVersion}") { transitive = false }

api "org.grails:grails-plugin-databinding"
api "org.grails:grails-datastore-gorm"
api("org.grails:grails-test")
api "org.springframework.boot:spring-boot-test"
api("org.spockframework:spock-spring") { transitive = false }
api("org.spockframework:spock-core") { transitive = false }
api "org.apache.groovy:groovy-test-junit5:$groovyVersion"
api "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
api "org.junit.platform:junit-platform-runner:$junitPlatformVersion"
runtimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
api "org.junit.jupiter:junit-jupiter-api"
api "org.junit.platform:junit-platform-runner"
runtimeOnly "org.junit.jupiter:junit-jupiter-engine"
}

Loading

0 comments on commit d6a8963

Please sign in to comment.