forked from bmuschko/gradle-clover-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·95 lines (78 loc) · 2.19 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "org.ajoberstar:gradle-git:1.7.2"
}
}
plugins {
id 'groovy'
id 'idea'
}
group = 'com.bmuschko'
defaultTasks 'clean', 'build'
apply from: "gradle/release.gradle"
apply from: "gradle/integration-test.gradle"
apply from: "gradle/functional-test.gradle"
apply from: "gradle/additional-artifacts.gradle"
apply from: "gradle/publishing.gradle"
apply from: "gradle/documentation.gradle"
task wrapper(type: Wrapper) {
gradleVersion = '4.4.1'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(GroovyCompile) {
groovyOptions.encoding = 'UTF-8'
options.encoding = 'UTF-8'
}
tasks.withType(Test) {
if (project.hasProperty('rerun')) {
outputs.upToDateWhen { false }
}
testLogging {
showStandardStreams = true
events 'started', 'passed', 'failed', 'skipped'
}
}
repositories {
jcenter()
mavenLocal()
}
dependencies {
compile localGroovy()
compile gradleApi()
testCompile gradleTestKit()
testCompile 'junit:junit:4.12'
testCompile 'commons-io:commons-io:2.5'
testCompile('org.spockframework:spock-core:1.0-groovy-2.4') {
exclude group: 'org.codehaus.groovy'
}
}
ext.compatibilityVersion = '1.7'
sourceCompatibility = compatibilityVersion
targetCompatibility = compatibilityVersion
jar {
manifest {
attributes 'Implementation-Title': 'Gradle Clover plugin',
'Implementation-Version': version,
'Built-By': System.getProperty("user.name"),
'Built-Date': new Date(),
'Built-JDK': System.getProperty("java.version")
}
}
idea.project {
jdkName = '1.8'
languageLevel = compatibilityVersion
ipr.withXml { provider ->
def node = provider.asNode()
// Use GIT
def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' }
vcsConfig.mapping[0].'@vcs' = 'Git'
// Set Gradle home
def gradleSettings = node.appendNode('component', [name: 'GradleSettings'])
gradleSettings.appendNode('option', [name: 'SDK_HOME', value: gradle.gradleHomeDir])
}
}