-
Notifications
You must be signed in to change notification settings - Fork 0
/
integTest.gradle
35 lines (30 loc) · 1008 Bytes
/
integTest.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
sourceSets {
integTest
}
task integTest(type: Test) {
description = "Runs integration tests."
testClassesDirs = sourceSets.integTest.output.classesDirs
classpath = sourceSets.integTest.runtimeClasspath
maxHeapSize = '1024m'
mustRunAfter test
}
dependencies {
integTestCompile sourceSets.main.output
integTestCompile sourceSets.test.output
integTestCompile configurations.compile
integTestCompile configurations.testCompile
integTestRuntime configurations.runtime
integTestRuntime configurations.testRuntime
}
gradle.projectsEvaluated {
gradle.rootProject.allprojects(configureTasksToRunAfter('integTest', 'test'))
}
check.dependsOn integTest
static configureTasksToRunAfter(String taskName, String runAfterTaskName) {
return { project ->
Task task = project[taskName] as Task
project.tasks
.findAll({ it.name == runAfterTaskName })
.each({ runAfterTask -> task.mustRunAfter(runAfterTask) })
}
}