blob: 2ce286cc96f0b93b0af6cca646b2c919f16eab50 (
plain)
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
|
sourceSets {
integTest {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
}
configurations {
integTestCompile.extendsFrom testCompile
integTestRuntime.extendsFrom testRuntime
}
task integTest(type: Test) {
shouldRunAfter 'test'
testClassesDirs = sourceSets.integTest.output.classesDirs
classpath = sourceSets.integTest.runtimeClasspath
}
check.dependsOn(integTest)
plugins.withType(org.gradle.plugins.ide.idea.IdeaPlugin) {
idea {
module {
testSourceDirs += sourceSets.integTest.groovy.srcDirs
testSourceDirs += sourceSets.integTest.resources.srcDirs
scopes.TEST.plus.add(configurations.integTestCompile)
scopes.TEST.plus.add(configurations.integTestRuntime)
}
}
}
task createClasspathManifest {
def outputDir = file("$buildDir/$name")
inputs.files sourceSets.main.runtimeClasspath
outputs.dir outputDir
doLast {
outputDir.mkdirs()
file("$outputDir/plugin-classpath.txt").text = sourceSets.main.runtimeClasspath.join("\n")
}
}
dependencies {
testRuntimeOnly files(createClasspathManifest)
// integTestRuntime files(createClasspathManifest) // old
}
|