forked from jonathanhood/gradle-plugin-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
53 lines (41 loc) · 1.08 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
group = artifact_group
version = "${artifact_version}.${build_number}"
apply plugin: 'groovy'
apply plugin: 'maven'
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
compile localGroovy()
testCompile gradleTestKit()
}
task wrapper(type: Wrapper) {
gradleVersion = "2.10"
}
test {
// Always run the tests
outputs.upToDateWhen { false }
// Turn on some console logging
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
stackTraceFilters "entryPoint"
}
}
// Write the plugin's classpath to a file to share with the tests
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")
}
}
// Add the classpath file to the test runtime classpath
dependencies {
testRuntime files(createClasspathManifest)
}
sourceCompatibility = 1.7
targetCompatibility = 1.7