-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
42 lines (34 loc) · 1.37 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
apply plugin: 'java'
defaultTasks 'jointBuild'
ext.groovyCheckoutDir = '../groovy_checkout'
ext.githubCheckoutDir = 'githubCheckout'
ext.grailsCheckoutDir = "${githubCheckoutDir}/grails"
task buildGroovy(type: Exec) {
ext.tasks = ['clean', 'jarAll']
workingDir = groovyCheckoutDir
commandLine = ['./gradlew', *tasks, '-DskipExamples=true', '-DskipTests=true']
}
task testGrails(type: GradleBuild){
if(project.hasProperty('groovy.version')) {
ext.groovyVersion = project.getProperty('groovy.version')
} else {
ext.groovyVersion = '2.3.5-SNAPSHOT'
}
ext.groovyJarPath = new File(groovyCheckoutDir, "target/libs/groovy-all-${groovyVersion}.jar")
dir = grailsCheckoutDir
startParameter.systemPropertiesArgs = ['groovy.jar': groovyJarPath.absolutePath, 'groovy.grails.joint': 'true']
tasks = ['clean', 'populateDependencies', 'test']
}
task getGrails << {
ant {
mkdir dir: githubCheckoutDir
get src:"http://github.com/grails/grails-core/zipball/master", dest:"${githubCheckoutDir}/grails-core-src.zip", verbose:"true"
unzip(src: "${githubCheckoutDir}/grails-core-src.zip", dest: githubCheckoutDir) {
mapper type: 'regexp', from:/(grails-core-[\w]*\/)(.*)/, to:/grails\/\2/
}
}
}
clean {
delete githubCheckoutDir
}
task jointBuild(dependsOn: ['getGrails', 'buildGroovy', 'testGrails'])