Skip to content

Commit

Permalink
Upgrade to Grails 7.0.0-snapshot (#136)
Browse files Browse the repository at this point in the history
* Update to Upgrade to Grails 7.0.0-snapshot, Java 17, Spring Framwork 6.2.0.  Fix all Unit Test!

* Remove .toml and buildSrc Dir

* Upgrade to Grails Publish

* Update to add more developers

* Add the github workflows

* Add the Author Back
  • Loading branch information
amondel2 authored Dec 20, 2024
1 parent df2c39a commit e2044ba
Show file tree
Hide file tree
Showing 22 changed files with 130 additions and 272 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches:
- '[3-9]+.[0-9]+.x'
env:
GIT_USER_NAME: puneetbehl
GIT_USER_EMAIL: behlp@unityfoundation.io
GIT_USER_NAME: 'grails-build'
GIT_USER_EMAIL: 'grails-build@users.noreply.github.com'

jobs:

Expand All @@ -20,13 +20,12 @@ jobs:
fail-fast: true
matrix:
java: [17]

steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4
with:
distribution: temurin
distribution: 'liberica'
java-version: ${{ matrix.java }}
- uses: gradle/actions/setup-gradle@v3
env:
Expand All @@ -43,7 +42,9 @@ jobs:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4
with: { java-version: 17, distribution: temurin }
with:
distribution: 'liberica'
java-version: 17

- name: Build Project
uses: gradle/actions/setup-gradle@v3
Expand All @@ -57,12 +58,11 @@ jobs:
uses: gradle/actions/setup-gradle@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
ORG_GRADLE_PROJECT_artifactoryPublishUsername: ${{ secrets.ARTIFACTORY_USERNAME }}
ORG_GRADLE_PROJECT_artifactoryPublishPassword: ${{ secrets.ARTIFACTORY_PASSWORD }}
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }}
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }}
MAVEN_PUBLISH_URL: ${{ secrets.MAVEN_PUBLISH_SNAPSHOT_URL }}
with:
arguments: |
-Dorg.gradle.internal.publish.checksums.insecure=true
publish
arguments: publish

- name: Generate Snapshot Documentation
if: success()
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4
with: { java-version: 17, distribution: temurin }
with:
distribution: 'liberica'
java-version: 17

- name: Get the current release version
id: release_version
Expand All @@ -33,16 +35,14 @@ jobs:
uses: gradle/actions/setup-gradle@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
NEXUS_PUBLISH_USERNAME: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
NEXUS_PUBLISH_PASSWORD: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
NEXUS_PUBLISH_NEXUS_URL: ${{ secrets.NEXUS_PUBLISH_RELEASE_URL }}
NEXUS_PUBLISH_STAGING_PROFILE_ID: ${{ secrets.NEXUS_PUBLISH_STAGING_PROFILE_ID }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
with:
arguments: |
-Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg
publishToSonatype
closeAndReleaseSonatypeStagingRepository
arguments: -Psigning.secretKeyRingFile=${{ github.workspace }}/secring.gpg publishToSonatype closeAndReleaseSonatypeStagingRepository

- name: Generate Documentation
if: success()
Expand Down
2 changes: 2 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enable auto-env through the sdkman_auto_env config - https://sdkman.io/usage#env
java=17.0.12-librca
112 changes: 87 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,46 +1,108 @@
import org.grails.gradle.plugin.doc.PublishGuideTask

buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
mavenCentral()
}
dependencies {
classpath "org.grails.grails-doc:org.grails.grails-doc.gradle.plugin:$grailsVersion"
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
}
}

plugins {
id 'groovy'
id 'java-library'
id 'io.github.gradle-nexus.publish-plugin'
id 'maven-publish'
id 'signing'
id "java-library"
id "eclipse"
id "idea"
}


version = projectVersion
group = 'org.grails.plugins'
ext.set('grailsVersion', libs.versions.grails.get())
ext.set('isReleaseVersion', !version.toString().endsWith('-SNAPSHOT'))
ext.set('isSnapshot', !isReleaseVersion)

apply plugin: 'org.grails.grails-plugin' // Needs to be applied after grailsVersion has been set
apply plugin: "org.grails.grails-plugin"
apply plugin: 'org.grails.grails-doc'
apply plugin: 'org.grails.grails-publish'


repositories {
mavenLocal()
mavenCentral()
maven { url = 'https://repo.grails.org/grails/core' }
}

compileJava {
options.release = 17
}

repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
}

dependencies {

api libs.quartz
api "org.quartz-scheduler:quartz:$quartzVersion"

implementation "org.grails:grails-bootstrap"
implementation "org.grails:grails-core"
implementation "org.apache.groovy:groovy-sql"
implementation "org.springframework:spring-beans"
implementation "org.springframework:spring-context"
implementation "org.springframework:spring-context-support"
compileOnly "org.apache.groovy:groovy"
compileOnly "jakarta.annotation:jakarta.annotation-api"

testImplementation "org.spockframework:spock-core"

testRuntimeOnly "org.slf4j:slf4j-nop:$slf4jVersion" // Get rid of warning about missing slf4j implementation during test task
}

jar {
exclude "application.groovy"
exclude "src/test/projects/**"
}

test {
useJUnitPlatform()
}

implementation libs.grails.bootstrap
implementation libs.grails.core
implementation libs.groovy.sql
implementation libs.spring.beans
implementation libs.spring.context
implementation libs.spring.context.support

compileOnly libs.groovy.core // CompileStatic and Slf4j
compileOnly libs.javax.annotation.api // Provided
configurations.register('groovydocConfiguration')
configurations.register('guideConfiguration')

testImplementation libs.spock.core
dependencies {

groovydocConfiguration localGroovy(), {
because 'groovydoc needs to run with the same version as Gradle'
}

guideConfiguration "org.grails:grails-docs"
guideConfiguration "org.apache.groovy:groovy-templates"
}

tasks.withType(Groovydoc).configureEach {
access = GroovydocAccess.PRIVATE
processScripts = false
includeMainForScripts = false
includeAuthor = true
classpath = configurations.groovydocConfiguration
groovyClasspath = configurations.groovydocConfiguration
}

testRuntimeOnly libs.slf4j.nop // Get rid of warning about missing slf4j implementation during test task
tasks.withType(PublishGuideTask).configureEach {
classpath = configurations.guideConfiguration
}

apply from: layout.projectDirectory.file('gradle/java-config.gradle')
apply from: layout.projectDirectory.file('gradle/grails-plugin-config.gradle')
apply from: layout.projectDirectory.file('gradle/testing-config.gradle')
apply from: layout.projectDirectory.file('gradle/documentation-config.gradle')
apply from: layout.projectDirectory.file('gradle/publishing.gradle')
grailsPublish {
githubSlug = 'grails/grails-quartz'
license {
name = 'Apache-2.0'
}
title = 'Grails Quartz Plugin'
desc = 'This plugin allows your Grails application to schedule jobs to be executed using a specified interval or cron expression.'
developers = ['burtbeckwith': 'Burt Beckwith', 'jeffscottbrown': 'Jeff Scott Brown', 'graemerocher': 'Graeme Rocher',
'ryanvanderwerf':'Ryan Vanderwerf','sergeynebolsin': 'Sergey Nebolsin', 'puneetbehl': 'Puneet Behl',
'vitaliisamolovskikh':'Vitalii Samolovskikh']
}
9 changes: 0 additions & 9 deletions buildSrc/build.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions buildSrc/settings.gradle

This file was deleted.

10 changes: 4 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
projectVersion=4.0.0-SNAPSHOT

# This prevents the Grails Gradle Plugin from unnecessarily excluding slf4j-simple in the generated POMs
# https://github.com/grails/grails-gradle-plugin/issues/222
slf4jPreventExclusion=true
grailsVersion=7.0.0-SNAPSHOT
quartzVersion=2.5.0
slf4jVersion =2.0.16

websiteUrl=https://grails.github.io/grails-quartz/latest/
issueTrackerUrl=https://github.com/grails/grails-quartz/issues
vcsUrl=https://github.com/grails/grails-quartz
slf4jPreventExclusion=true

org.gradle.caching=true
org.gradle.daemon=true
Expand Down
7 changes: 0 additions & 7 deletions gradle/buildsrc.libs.versions.toml

This file was deleted.

29 changes: 0 additions & 29 deletions gradle/documentation-config.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions gradle/grails-plugin-config.gradle

This file was deleted.

5 changes: 0 additions & 5 deletions gradle/java-config.gradle

This file was deleted.

23 changes: 0 additions & 23 deletions gradle/libs.versions.toml

This file was deleted.

Loading

0 comments on commit e2044ba

Please sign in to comment.