-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
45 lines (38 loc) · 1.29 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
import java.nio.file.*;
ext.fireflyPath = "$rootDir.path/../firefly/"
if (!file(fireflyPath).exists()) {
println ">> Firefly repository not found. Cloning it now. This will take a few minutes..."
exec {
workingDir = "$rootDir.path/../"
commandLine 'git', 'clone', "https://github.com/Caltech-IPAC/firefly"
}
}
allprojects {
defaultTasks 'preselect'
}
subprojects {
apply plugin: "java"
apply from: "$rootDir.path/buildScript/global.gincl"
apply from: "$fireflyPath/buildScript/global.gincl"
apply from: "$fireflyPath/buildScript/tasks.gincl"
}
task purge {
description= 'Removes all build files from this project, including node_module.'
doLast {
println('Removing build directories.')
delete "${rootDir}/build", "${rootDir}/jars/build", "${rootDir}/node_modules"
Files.delete(Paths.get("${rootDir}/yarn.lock"));
Files.delete(Paths.get("${rootDir}/package.json"));
Files.delete(Paths.get("${rootDir}/config/test"));
}
}
task clean {
description= 'Removes all build files except node_module(installed JS libraries).'
doLast {
println('Removing all build directories.')
delete "${rootDir}/build", "${rootDir}/jars/build"
}
}
task preselect {
description= 'A placeholder task to designate the task to run for each project. Similar to defaultTasks.'
}