forked from mockito/mockito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
129 lines (105 loc) · 2.75 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' //publishing to bintray
classpath 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.2' //rest calls to bintray api
}
}
apply plugin: 'java'
group = 'org.mockito'
description = 'Core API and implementation.'
sourceCompatibility = 1.5
targetCompatibility = 1.5
apply plugin: 'maven-publish'
apply from: 'gradle/version.gradle'
apply from: "gradle/ide.gradle"
apply from: 'gradle/coverage.gradle'
apply from: 'gradle/osgi.gradle'
apply from: 'gradle/gradle-fix.gradle'
allprojects {
repositories {
jcenter()
}
tasks.withType(JavaCompile) {
//I don't believe those warnings add value given modern IDEs
options.warnings = false
}
}
configurations {
provided
testUtil //TODO move to separate project
}
sourceSets {
main {
compileClasspath = compileClasspath + configurations.provided
}
test {
compileClasspath = compileClasspath + configurations.provided
}
}
test {
include "**/*Test.class"
testLogging {
exceptionFormat 'full'
showCauses true
}
}
dependencies {
compile 'net.bytebuddy:byte-buddy:1.4.3'
provided "junit:junit:4.12", "org.hamcrest:hamcrest-core:1.3"
compile "org.objenesis:objenesis:2.4"
testCompile 'org.ow2.asm:asm:5.0.4'
testCompile 'org.assertj:assertj-core:1.7.1'
testRuntime configurations.provided
testUtil sourceSets.test.output
}
def licenseFiles = copySpec {
//mockito license
from(".") { include 'LICENSE' }
}
task sourcesJar(type: Jar) {
jar {
baseName = 'mockito-core'
from(sourceSets.main.allSource)
with licenseFiles
}
baseName = 'mockito-core'
from(sourceSets.main.allSource)
classifier = "sources"
with licenseFiles
}
apply from: 'gradle/javadoc.gradle'
task javadocJar(type: Jar) {
baseName = 'mockito-core'
classifier = "javadoc"
with licenseFiles
from mockitoJavadoc
}
task coverageReport(dependsOn: ["test", "mockitoCoverage"]) {}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
mockitoCore(MavenPublication) {
from components.java
artifactId 'mockito-core'
artifact sourcesJar
artifact javadocJar
}
}
}
apply from: 'gradle/release.gradle'
apply from: "gradle/pom.gradle"
task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}
task ciBuild {
//validate the state of the project
dependsOn build, publishToMavenLocal, tasks.idea, tasks.eclipse
}
//Making sure that release task is only invoked after the entire ciBuild validation
release.mustRunAfter ciBuild