forked from Beagle-PSE/Beagle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
58 lines (52 loc) · 1.48 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
/**
* Collections of subprojects. Useful for configure blocks: configure(prototypeSubprojects){}
*/
/**
* Prototype subprojects. Detected by being in the 'Prototypes' subfolder
*/
ext.prototypeSubprojects = subprojects.findAll { project ->
project.name.startsWith('Prototype')
}
/**
* Java subprojects. Detected by having the 'src/main/java' folder.
*/
ext.javaSubprojects = subprojects.findAll { project ->
file("$project.projectDir/src/main/java").exists()
}
/**
* Eclipse Plugin subprojects. Detected by having 'org.eclipse.pde.PluginNature' in their
* .project file.
*/
ext.eclipseSubprojects = subprojects.findAll { project ->
file("$project.projectDir/.project").with {
exists() && text.contains('org.eclipse.pde.PluginNature')
}
}
allprojects {
// All subprojects have a build and clean task
if (tasks.findByPath('build') == null) {
task build {
group 'Build'
description 'Assembles and tests this project.'
}
}
if (tasks.findByPath('clean') == null) {
task clean {
group 'Build'
description 'Deletes the build directory.'
doLast {
file(buildDir).deleteDir()
}
}
}
buildscript {
fileTree("$projectDir/buildSrc/src/tasks/gradle/buildscript-dependencies").include('*.gradle').each { file ->
project.apply from: file, to: buildscript
}
}
// import all tasks defined in src/build/groovy
fileTree("$projectDir/buildSrc/src/tasks/gradle").include('*.gradle').sort().each { file ->
project.apply from: file
}
defaultTasks 'build'
}