Skip to content

Commit 1466077

Browse files
committed
Upgrade to Grails 5
1 parent a4a11f1 commit 1466077

File tree

6 files changed

+192
-152
lines changed

6 files changed

+192
-152
lines changed

build.gradle

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,24 @@
11
buildscript {
2-
ext {
3-
grailsVersion = project.grailsVersion
4-
}
52
repositories {
6-
mavenLocal()
73
maven { url "https://repo.grails.org/grails/core" }
84
}
95
dependencies {
10-
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
6+
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
7+
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.12'
118
}
129
}
1310

14-
plugins {
15-
id 'org.asciidoctor.convert' version '1.5.3'
16-
}
17-
18-
version "2.0.0.BUILD-SNAPSHOT"
19-
//version "2.0.0.M2"
11+
version project.projectVersion
2012
group "org.grails.plugins"
2113

2214
apply plugin: 'java-library'
2315
apply plugin:"eclipse"
2416
apply plugin:"idea"
17+
apply plugin: "org.asciidoctor.convert"
2518
apply plugin:"org.grails.grails-plugin"
26-
apply plugin:"org.grails.grails-plugin-publish"
27-
28-
ext {
29-
grailsVersion = project.grailsVersion
30-
gradleWrapperVersion = project.gradleWrapperVersion
31-
}
19+
apply plugin:"org.grails.internal.grails-plugin-publish"
3220

3321
repositories {
34-
mavenLocal()
3522
maven { url "https://repo.grails.org/grails/core" }
3623
}
3724

@@ -48,18 +35,18 @@ configurations.all {
4835
}
4936

5037
dependencies {
51-
provided "org.springframework.boot:spring-boot-starter-logging"
52-
provided "org.springframework.boot:spring-boot-autoconfigure"
53-
provided "org.grails:grails-core"
54-
profile "org.grails.profiles:plugin"
55-
provided "org.grails:grails-gorm-testing-support"
38+
api "org.springframework.boot:spring-boot-starter-logging"
39+
api "org.springframework.boot:spring-boot-autoconfigure"
40+
api "org.grails:grails-core"
41+
api "org.grails.profiles:plugin"
42+
api "org.grails:grails-gorm-testing-support"
5643
api("de.flapdoodle.embed:de.flapdoodle.embed.mongo:2.2.0") {
5744
exclude group: "commons-io"
5845
exclude group: "org.apache.commons", module: "commons-lang3"
5946
exclude group: "net.java.dev.jna"
6047
exclude group: "org.slf4j"
6148
}
62-
provided "org.grails.plugins:mongodb"
49+
api "org.grails.plugins:mongodb"
6350
documentation "org.codehaus.groovy:groovy-all"
6451
}
6552

@@ -90,7 +77,7 @@ asciidoctor {
9077
'sourcedir' : "${projectDir}/src/main/groovy"
9178
}
9279

93-
task apidocs(type: Groovydoc) {
80+
def apidocs = tasks.register("apidocs", Groovydoc) {
9481
source project.files('src/main/groovy')
9582

9683
destinationDir = new File(buildDir, 'docs/api')
@@ -101,7 +88,9 @@ task apidocs(type: Groovydoc) {
10188
groovyClasspath = configurations.documentation
10289
}
10390

104-
task docs(type:Copy, dependsOn:[apidocs, asciidoctor]) {
91+
def docs = tasks.register("docs", Copy) {
92+
type = "documentation"
93+
dependsOn = ["apidocs", "asciidoctor"]
10594
from "$buildDir/asciidoc/html5"
10695
into "$buildDir/docs"
10796
}
@@ -124,4 +113,20 @@ tasks.withType(GroovyCompile) {
124113
}
125114
}
126115

116+
tasks.withType(Test) {
117+
useJUnitPlatform()
118+
}
119+
120+
test {
121+
testLogging {
122+
events "passed", "skipped", "failed"
123+
124+
showExceptions true
125+
exceptionFormat "full"
126+
showCauses true
127+
showStackTraces true
128+
}
129+
}
130+
131+
127132
bootJar.enabled = false

gradle.properties

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
gormVersion=7.1.0.M2
2-
grailsVersion=4.1.0.M2
3-
gradleWrapperVersion=3.5
1+
projectVersion=2.0.0-SNAPSHOT
2+
gormVersion=7.2.1
3+
grailsVersion=5.1.8
4+
grailsGradlePluginVersion=5.1.4
45
groovyVersion=3.0.5
56
mongodbJavaDriverVersion=4.0.3

gradle/wrapper/gradle-wrapper.jar

626 Bytes
Binary file not shown.
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-6.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)