-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
41 lines (37 loc) · 1.23 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
ext {
def coreBuildFilePath = 'https://raw.githubusercontent.com/grails/grails-core/6.1.x/gradle.properties'
def coreBuildFileUrl = new URL(coreBuildFilePath)
def versionNumberRegex = /projectVersion=(.*)/
def grailsVersionList = []
coreBuildFileUrl.eachLine { line ->
def matcher = (line =~ versionNumberRegex)
if(matcher) {
grailsVersionList << matcher[0][1]
}
}
if(!grailsVersionList) {
throw new GradleException("Could not find Grails version at $coreBuildFilePath")
} else if(grailsVersionList.size() > 1) {
throw new GradleException("Multiple Grails versions (${grailsVersionList}) found at $coreBuildFilePath")
}
grailsVersion = grailsVersionList[0]
}
subprojects {
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
tasks.withType(Test) {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
}
}
}