Skip to content

Commit f16d063

Browse files
committed
Update project to Grails 5.3.3
1 parent 6de8366 commit f16d063

File tree

7 files changed

+61
-177
lines changed

7 files changed

+61
-177
lines changed

build.gradle

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,44 +34,36 @@ configurations {
3434
}
3535

3636
dependencies {
37-
developmentOnly("org.springframework.boot:spring-boot-devtools")
37+
3838
compileOnly "io.micronaut:micronaut-inject-groovy"
39-
console "org.grails:grails-console"
40-
implementation "org.springframework.boot:spring-boot-starter-logging"
41-
implementation "org.springframework.boot:spring-boot-starter-validation"
42-
implementation "org.springframework.boot:spring-boot-autoconfigure"
43-
implementation "org.grails:grails-core"
44-
implementation "org.springframework.boot:spring-boot-starter-actuator"
45-
implementation "org.springframework.boot:spring-boot-starter-tomcat"
46-
implementation "org.grails:grails-web-boot"
39+
4740
implementation "org.grails:grails-logging"
4841
implementation "org.grails:grails-plugin-rest"
4942
implementation "org.grails:grails-plugin-databinding"
5043
implementation "org.grails:grails-plugin-i18n"
5144
implementation "org.grails:grails-plugin-services"
52-
implementation "org.grails:grails-plugin-url-mappings"
53-
implementation "org.grails:grails-plugin-interceptors"
54-
implementation "org.grails.plugins:cache"
5545
implementation "org.grails.plugins:async"
5646
implementation "org.grails.plugins:scaffolding"
5747
implementation "org.grails.plugins:hibernate5"
58-
implementation "org.hibernate:hibernate-core:5.6.3.Final"
48+
implementation "org.hibernate:hibernate-core:5.6.15.Final"
5949
implementation "org.grails.plugins:gsp"
6050
implementation "org.grails.plugins:mail:3.0.0"
6151
// This is needed for the quartz-plugin on grails >= 4.0.x, https://github.com/grails-plugins/grails-quartz/issues/107#issuecomment-575951471
62-
implementation("org.quartz-scheduler:quartz:2.2.3") {
52+
implementation("org.quartz-scheduler:quartz:2.3.2") {
6353
exclude group: 'slf4j-api', module: 'c3p0'
6454
}
65-
implementation ('org.grails.plugins:quartz:2.0.13')
55+
implementation "org.grails.plugins:quartz:2.0.13"
56+
6657
profile "org.grails.profiles:web-plugin"
67-
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:3.3.4"
68-
runtimeOnly "org.glassfish.web:el-impl:2.2.1-b05"
58+
6959
runtimeOnly "com.h2database:h2"
7060
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
71-
runtimeOnly "javax.xml.bind:jaxb-api:2.3.1"
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"
7265
testImplementation "io.micronaut:micronaut-inject-groovy"
7366
testImplementation "org.grails:grails-gorm-testing-support"
74-
testImplementation "org.mockito:mockito-core"
7567
testImplementation "org.grails:grails-web-testing-support"
7668
}
7769

@@ -88,13 +80,13 @@ bootRun {
8880
}
8981

9082

91-
tasks.withType(GroovyCompile) {
83+
tasks.withType(GroovyCompile).configureEach {
9284
configure(groovyOptions) {
9385
forkOptions.jvmArgs = ['-Xmx1024m']
9486
}
9587
}
9688

97-
tasks.withType(Test) {
89+
tasks.withType(Test).configureEach {
9890
useJUnitPlatform()
9991
}
10092

@@ -211,7 +203,7 @@ afterEvaluate {
211203
}
212204
}
213205

214-
tasks.withType(Sign) {
206+
tasks.withType(Sign).configureEach {
215207
onlyIf { isReleaseVersion }
216208
}
217209

@@ -231,9 +223,9 @@ nexusPublishing {
231223
}
232224
}
233225

234-
task snapshotVersion {
226+
tasks.register('snapshotVersion') {
235227
doLast {
236-
if(!project.version.endsWith('-SNAPSHOT')) {
228+
if (!project.version.endsWith('-SNAPSHOT')) {
237229
ant.propertyfile(file: "gradle.properties") {
238230
entry(key: "version", value: "${project.version}-SNAPSHOT")
239231
}

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version=3.1.2-SNAPSHOT
2-
grailsVersion=5.1.1
3-
grailsGradlePluginVersion=5.1.0
4-
groovyVersion=3.0.7
5-
gorm.version=7.1.2
2+
grailsVersion=5.3.3
3+
grailsGradlePluginVersion=5.3.0
4+
groovyVersion=3.0.14
5+
gorm.version=7.3.3
66
org.gradle.daemon=true
77
org.gradle.parallel=true
88
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M

grails-app/conf/application.yml

Lines changed: 1 addition & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,4 @@
1-
---
21
grails:
32
profile: web-plugin
43
codegen:
5-
defaultPackage: grails.plugin.asyncmail
6-
gorm:
7-
reactor:
8-
# Whether to translate GORM events into Reactor events
9-
# Disabled by default for performance reasons
10-
events: false
11-
info:
12-
app:
13-
name: '@info.app.name@'
14-
version: '@info.app.version@'
15-
grailsVersion: '@info.app.grailsVersion@'
16-
spring:
17-
jmx:
18-
unique-names: true
19-
main:
20-
banner-mode: "off"
21-
groovy:
22-
template:
23-
check-template-location: false
24-
devtools:
25-
restart:
26-
additional-exclude:
27-
- '*.gsp'
28-
- '**/*.gsp'
29-
- '*.gson'
30-
- '**/*.gson'
31-
- 'logback.groovy'
32-
- '*.properties'
33-
management:
34-
endpoints:
35-
enabled-by-default: false
36-
37-
---
38-
grails:
39-
mime:
40-
disable:
41-
accept:
42-
header:
43-
userAgents:
44-
- Gecko
45-
- WebKit
46-
- Presto
47-
- Trident
48-
types:
49-
all: '*/*'
50-
atom: application/atom+xml
51-
css: text/css
52-
csv: text/csv
53-
form: application/x-www-form-urlencoded
54-
html:
55-
- text/html
56-
- application/xhtml+xml
57-
js: text/javascript
58-
json:
59-
- application/json
60-
- text/json
61-
multipartForm: multipart/form-data
62-
pdf: application/pdf
63-
rss: application/rss+xml
64-
text: text/plain
65-
hal:
66-
- application/hal+json
67-
- application/hal+xml
68-
xml:
69-
- text/xml
70-
- application/xml
71-
urlmapping:
72-
cache:
73-
maxsize: 1000
74-
controllers:
75-
defaultScope: singleton
76-
converters:
77-
encoding: UTF-8
78-
views:
79-
default:
80-
codec: html
81-
gsp:
82-
encoding: UTF-8
83-
htmlcodec: xml
84-
codecs:
85-
expression: html
86-
scriptlet: html
87-
taglib: none
88-
staticparts: none
89-
---
90-
environments:
91-
test:
92-
quartz:
93-
jdbcStore: false
94-
hibernate:
95-
cache:
96-
queries: false
97-
use_second_level_cache: false
98-
use_query_cache: false
99-
dataSource:
100-
pooled: true
101-
jmxExport: true
102-
driverClassName: org.h2.Driver
103-
username: sa
104-
password: ''
105-
dbCreate: update
106-
url: jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
4+
defaultPackage: grails.plugin.asyncmail

grails-app/conf/logback.groovy

Lines changed: 0 additions & 45 deletions
This file was deleted.

grails-app/services/grails/plugin/asyncmail/AsynchronousMailProcessService.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package grails.plugin.asyncmail
22

3+
import grails.async.Promise
34
import grails.async.Promises
45
import grails.gorm.transactions.Transactional
56
import grails.plugin.asyncmail.enums.MessageStatus
@@ -34,7 +35,7 @@ class AsynchronousMailProcessService {
3435
Queue<Long> idsQueue = new ArrayBlockingQueue<Long>(messageCount, false, messagesIds)
3536

3637
// Create some parallel tasks
37-
def promises = []
38+
def promises = [] as List<Promise>
3839
int taskCount = Math.min(asynchronousMailConfigService.taskPoolSize, messageCount)
3940

4041
log.debug("Starts $taskCount send tasks.")
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
quartz:
2+
jdbcStore: false
3+
hibernate:
4+
cache:
5+
queries: false
6+
use_second_level_cache: false
7+
use_query_cache: false
8+
dataSource:
9+
pooled: true
10+
jmxExport: true
11+
driverClassName: org.h2.Driver
12+
username: sa
13+
password: ''
14+
dbCreate: update
15+
url: jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configuration>
3+
4+
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
5+
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
6+
7+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
8+
<encoder>
9+
<charset>UTF-8</charset>
10+
<pattern>%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex</pattern>
11+
</encoder>
12+
</appender>
13+
14+
<root level="ERROR"><appender-ref ref="STDOUT"/></root>
15+
16+
<!-- Enable Asynchronous Mail plugin logging -->
17+
<logger name="grails.app.jobs.grails.plugin.asyncmail" level="TRACE" additivity="false"><appender-ref ref="STDOUT"/></logger>
18+
<logger name="grails.app.services.grails.plugin.asyncmail" level="TRACE" additivity="false"><appender-ref ref="STDOUT"/></logger>
19+
<logger name="grails.plugin.asyncmail" level="TRACE" additivity="false"><appender-ref ref="STDOUT"/></logger>
20+
21+
<!-- Enable Quartz plugin logging -->
22+
<logger name="grails.plugins.quartz" level="DEBUG" additivity="false"><appender-ref ref="STDOUT"/></logger>
23+
</configuration>

0 commit comments

Comments
 (0)