-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
61 lines (55 loc) · 1.91 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
ext {
def coreBuildFilePath = "https://raw.githubusercontent.com/grails/grails-core/$grailsCoreBranch/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 { prj ->
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
String useMavenLocal = project.findProperty('mavenLocal')
repositories {
if (useMavenLocal || useMavenLocal != 'last') {
println "Using mavenLocal() first on project `${prj.name}`"
mavenLocal()
}
maven { url "https://repo.grails.org/grails/core" }
mavenCentral()
if (useMavenLocal == 'last') {
println "Using mavenLocal() last on project `${prj.name}`"
mavenLocal()
}
if(groovyVersion.endsWith('-SNAPSHOT')) {
maven {
name = 'ASF Snapshot repo'
url = 'https://repository.apache.org/content/repositories/snapshots'
}
}
}
tasks.withType(Test) {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
}
}
apply plugin: 'java'
compileJava.options.release = 17
}