forked from deephaven/deephaven-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
82 lines (73 loc) · 3.1 KB
/
build.gradle
File metadata and controls
82 lines (73 loc) · 3.1 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
plugins {
id 'base'
id 'io.deephaven.project.register'
}
import java.util.concurrent.TimeUnit
(tasks.clean as Delete).delete(
// Only the build rpm task outputs to the $rootDir/target directory. Add it to the clean task.
'target',
'buildSrc/out',
// Some tests pollute the root directory; add them to clean
"$rootDir/tmp",
"$rootDir/test",
"$rootDir/test.*",
// TODO: find the tests polluting root directory and fix them
)
clean.doLast {
delete "$rootDir/test"
delete "$rootDir/test.*"
// TODO: find the tests polluting root directory and fix them
}
project.tasks.register('outputVersion') {task ->
def versionFile = project.layout.buildDirectory.file('version')
task.inputs.property('version', project.version)
task.outputs.file(versionFile)
task.doLast {
versionFile.get().asFile.text = project.version
}
}
project.tasks.register('printVersion') {task ->
task.doLast {
println(project.version)
}
}
tasks.register('nightly') {
it.group 'Deephaven lifecycle'
it.description 'A lifecycle task that defines the nightly tasks to be run in CI, see .github/workflows/nighty-check-ci.yml'
it.dependsOn allprojects.collect {
allprojects.collect { it.tasks.matching { it.name == LifecycleBasePlugin.CHECK_TASK_NAME } } +\
allprojects.collect { it.tasks.matching { it.name == 'testOutOfBand' } } +\
allprojects.collect { it.tasks.matching { it.name == 'testSerial' } } +\
allprojects.collect { it.tasks.matching { it.name == 'testParallel' } }
}
}
tasks.register('prepareCompose') {
it.group 'Deephaven lifecycle'
it.description 'A lifecycle task that prepares prerequisites for local docker compose builds'
it.dependsOn project(':docker-server-jetty').tasks.findByName('buildDocker-server-jetty')
}
tasks.register('smoke') {
it.group 'Deephaven lifecycle'
it.description 'A lifecycle task for a local-development workflow to make sure things are looking "OK"'
it.dependsOn allprojects.collect {
allprojects.collect { it.tasks.matching { it.name == 'gwtCompile' } } +\
allprojects.collect { it.tasks.matching { it.name == 'compileTestJava' } } +\
allprojects.collect { it.tasks.matching { it.name == 'spotlessCheck' } }
}
it.dependsOn project(':server').tasks.findByName(LifecycleBasePlugin.CHECK_TASK_NAME)
it.dependsOn project(':docker-server-slim').tasks.findByName('prepareDocker')
it.dependsOn project(':docker-server').tasks.findByName('prepareDocker')
it.dependsOn project(':docker-server-jetty').tasks.findByName('prepareDocker')
it.dependsOn project(':web').tasks.findByName(LifecycleBasePlugin.ASSEMBLE_TASK_NAME)
it.dependsOn project(':Generators').tasks.findByName(LifecycleBasePlugin.CHECK_TASK_NAME)
}
if (findProperty('debugCI') == 'true') {
gradle.buildFinished {
BuildResult result ->
if (result.failure) {
result.failure.printStackTrace()
println "Pausing the build so errors can be diagnosed"
Thread.sleep(TimeUnit.HOURS.toMillis(3))
}
}
}