Skip to content

Commit becdd80

Browse files
authored
Merge pull request #6 from gpc/matrei/grails6
Update project to Grails 6.1.0
2 parents cc5a967 + 7c7b2f9 commit becdd80

File tree

7 files changed

+89
-94
lines changed

7 files changed

+89
-94
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Build
55

66
on:
77
push:
8-
branches: [ master ]
8+
branches: [ master, 6.x.x ]
99
pull_request:
10-
branches: [ master ]
10+
branches: [ master, 6.x.x ]
1111

1212
jobs:
1313
build:
@@ -16,10 +16,10 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v2
19-
- name: Set up JDK 8
19+
- name: Set up JDK 11
2020
uses: actions/setup-java@v2
2121
with:
22-
java-version: '8'
22+
java-version: '11'
2323
distribution: 'adopt'
2424
cache: gradle
2525
- name: Grant execute permission for gradlew

build.gradle

Lines changed: 60 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,62 @@
1-
buildscript {
2-
repositories {
3-
maven { url "https://repo.grails.org/grails/core" }
4-
maven { url "https://plugins.gradle.org/m2" }
5-
}
6-
dependencies {
7-
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
8-
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.3.4"
9-
classpath "org.grails.plugins:hibernate5:7.2.0"
10-
classpath "io.github.gradle-nexus:publish-plugin:1.0.0"
11-
}
1+
plugins {
2+
id 'eclipse'
3+
id 'idea'
4+
id 'org.grails.grails-plugin'
5+
id 'com.bertramlabs.asset-pipeline'
6+
id 'org.grails.grails-gsp'
7+
id 'maven-publish'
8+
id 'signing'
129
}
1310

14-
group "io.github.gpc"
15-
16-
apply plugin: "eclipse"
17-
apply plugin: "idea"
18-
apply plugin: "org.grails.grails-plugin"
19-
apply plugin: "asset-pipeline"
20-
apply plugin: "org.grails.grails-gsp"
21-
apply plugin: "maven-publish"
22-
apply plugin: "signing"
23-
apply plugin: "io.github.gradle-nexus.publish-plugin"
11+
group = 'io.github.gpc'
2412

2513
repositories {
26-
maven { url "https://repo.grails.org/grails/core" }
14+
mavenCentral()
15+
maven { url 'https://repo.grails.org/grails/core' }
2716
}
2817

2918
configurations {
30-
developmentOnly
31-
runtimeClasspath {
32-
extendsFrom developmentOnly
19+
configureEach {
20+
resolutionStrategy.force 'org.codehaus.groovy:groovy-xml:3.0.13'
3321
}
3422
}
3523

3624
dependencies {
3725

38-
compileOnly "io.micronaut:micronaut-inject-groovy"
39-
40-
implementation "org.grails:grails-logging"
41-
implementation "org.grails:grails-plugin-rest"
42-
implementation "org.grails:grails-plugin-databinding"
43-
implementation "org.grails:grails-plugin-i18n"
44-
implementation "org.grails:grails-plugin-services"
45-
implementation "org.grails.plugins:async"
46-
implementation "org.grails.plugins:scaffolding"
47-
implementation "org.grails.plugins:hibernate5"
48-
implementation "org.hibernate:hibernate-core:5.6.15.Final"
49-
implementation "org.grails.plugins:gsp"
50-
implementation "org.grails.plugins:mail:3.0.0"
26+
compileOnly 'io.micronaut:micronaut-inject-groovy'
27+
28+
implementation 'org.grails:grails-logging'
29+
implementation 'org.grails:grails-plugin-rest'
30+
implementation 'org.grails:grails-plugin-databinding'
31+
implementation 'org.grails:grails-plugin-i18n'
32+
implementation 'org.grails:grails-plugin-services'
33+
implementation 'org.grails.plugins:async'
34+
implementation 'org.grails.plugins:scaffolding'
35+
implementation 'org.grails.plugins:hibernate5'
36+
implementation 'org.hibernate:hibernate-core:5.6.15.Final'
37+
implementation 'org.grails.plugins:gsp'
38+
implementation 'org.grails.plugins:mail:3.0.0'
5139
// This is needed for the quartz-plugin on grails >= 4.0.x, https://github.com/grails-plugins/grails-quartz/issues/107#issuecomment-575951471
52-
implementation("org.quartz-scheduler:quartz:2.3.2") {
53-
exclude group: 'slf4j-api', module: 'c3p0'
54-
}
55-
implementation "org.grails.plugins:quartz:2.0.13"
56-
57-
profile "org.grails.profiles:web-plugin"
58-
59-
runtimeOnly "com.h2database:h2"
60-
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
61-
62-
testImplementation "org.springframework.boot:spring-boot-starter-tomcat"
63-
testImplementation "ch.qos.logback:logback-classic:1.2.12"
64-
testImplementation "ch.qos.logback:logback-core:1.2.12"
65-
testImplementation "io.micronaut:micronaut-inject-groovy"
66-
testImplementation "org.grails:grails-gorm-testing-support"
67-
testImplementation "org.grails:grails-web-testing-support"
68-
}
69-
70-
bootRun {
71-
ignoreExitValue true
72-
jvmArgs(
73-
'-Dspring.output.ansi.enabled=always',
74-
'-noverify',
75-
'-XX:TieredStopAtLevel=1',
76-
'-Xmx1024m')
77-
sourceResources sourceSets.main
78-
String springProfilesActive = 'spring.profiles.active'
79-
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
40+
implementation('org.quartz-scheduler:quartz:2.3.2') { exclude group: 'slf4j-api', module: 'c3p0' }
41+
implementation 'org.grails.plugins:quartz:2.0.13'
42+
43+
testRuntimeOnly 'com.h2database:h2'
44+
testRuntimeOnly 'org.apache.tomcat:tomcat-jdbc'
45+
46+
testImplementation 'org.springframework.boot:spring-boot-starter-tomcat'
47+
//testImplementation "ch.qos.logback:logback-classic:1.2.12"
48+
//testImplementation "ch.qos.logback:logback-core:1.2.12"
49+
testImplementation 'io.micronaut:micronaut-inject-groovy'
50+
testImplementation 'org.grails:grails-gorm-testing-support'
51+
testImplementation 'org.grails:grails-web-testing-support'
8052
}
8153

8254

83-
tasks.withType(GroovyCompile).configureEach {
84-
configure(groovyOptions) {
85-
forkOptions.jvmArgs = ['-Xmx1024m']
86-
}
55+
java {
56+
sourceCompatibility = JavaVersion.VERSION_11
57+
targetCompatibility = JavaVersion.VERSION_11
58+
withSourcesJar()
59+
withJavadocJar()
8760
}
8861

8962
tasks.withType(Test).configureEach {
@@ -194,7 +167,7 @@ ext."signing.keyId" = project.findProperty('signing.keyId') ?: System.getenv('SI
194167
ext."signing.password" = project.findProperty('signing.password') ?: System.getenv('SIGNING_PASSPHRASE')
195168
ext."signing.secretKeyRingFile" = project.findProperty('signing.secretKeyRingFile') ?: (System.getenv('SIGNING_PASSPHRASE') ?: "${System.getProperty('user.home')}/.gnupg/secring.gpg")
196169

197-
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
170+
ext.isReleaseVersion = !version.toString().endsWith("SNAPSHOT")
198171

199172
afterEvaluate {
200173
signing {
@@ -207,25 +180,28 @@ tasks.withType(Sign).configureEach {
207180
onlyIf { isReleaseVersion }
208181
}
209182

210-
nexusPublishing {
211-
repositories {
212-
sonatype {
213-
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.findProperty('sonatypeOss2Username') ?: ''
214-
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.findProperty("sonatypeOss2Password") ?: ''
215-
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.findProperty("sonatypeOssStagingProfileIdJms") ?: ''
216-
217-
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
218-
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
219-
username = ossUser
220-
password = ossPass
221-
stagingProfileId = ossStagingProfileId
183+
if(project.hasProperty('release')) {
184+
apply plugin: 'io.github.gradle-nexus.publish-plugin'
185+
nexusPublishing {
186+
repositories {
187+
sonatype {
188+
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.findProperty('sonatypeOss2Username') ?: ''
189+
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.findProperty("sonatypeOss2Password") ?: ''
190+
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.findProperty("sonatypeOssStagingProfileIdJms") ?: ''
191+
192+
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
193+
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
194+
username = ossUser
195+
password = ossPass
196+
stagingProfileId = ossStagingProfileId
197+
}
222198
}
223199
}
224200
}
225201

226202
tasks.register('snapshotVersion') {
227203
doLast {
228-
if (!project.version.endsWith('-SNAPSHOT')) {
204+
if (!project.version.toString().endsWith('-SNAPSHOT')) {
229205
ant.propertyfile(file: "gradle.properties") {
230206
entry(key: "version", value: "${project.version}-SNAPSHOT")
231207
}

buildSrc/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
repositories {
2+
mavenCentral()
3+
maven { url 'https://repo.grails.org/grails/core' }
4+
}
5+
dependencies {
6+
implementation 'org.grails:grails-gradle-plugin:6.1.0'
7+
implementation 'org.grails.plugins:hibernate5:8.0.1'
8+
implementation 'io.github.gradle-nexus:publish-plugin:1.3.0'
9+
implementation 'com.bertramlabs.plugins:asset-pipeline-gradle:4.4.0'
10+
}

gradle.properties

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
grailsVersion=5.3.3
2-
grailsGradlePluginVersion=5.3.0
31
version=4.0.0-SNAPSHOT
4-
groovyVersion=3.0.14
5-
gorm.version=7.3.3
2+
grailsVersion=6.1.0
63
org.gradle.daemon=true
74
org.gradle.parallel=true
85
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

settings.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1+
pluginManagement {
2+
repositories {
3+
mavenLocal()
4+
maven { url "https://repo.grails.org/grails/core/" }
5+
gradlePluginPortal()
6+
}
7+
plugins {
8+
id "org.grails.grails-web" version "6.1.0"
9+
id "org.grails.grails-gsp" version "6.1.0"
10+
}
11+
}
12+
113
rootProject.name = 'asynchronous-mail'

src/main/groovy/grails/plugin/asyncmail/AsynchronousMailGrailsPlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import org.quartz.TriggerKey
1212
@SuppressWarnings('unused')
1313
class AsynchronousMailGrailsPlugin extends Plugin {
1414

15-
def grailsVersion = "5.0.0 > *"
15+
def grailsVersion = "6.0.0 > *"
1616
def loadAfter = ['mail', 'quartz', 'hibernate', 'hibernate3', 'hibernate4', 'hibernate5', 'mongodb']
1717

1818
@Override

0 commit comments

Comments
 (0)