forked from mockito/mockito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
98 lines (77 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
buildscript {
repositories {
mavenLocal() //for local testing of mockito-release-tools
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3" //for publications to Bintray / central
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0' // later versions don't work on JDK6
//Needed so that release notes and release workflow plugin can be applied in separate gradle/*.gradle build files
classpath project.'dependencies.mockito-release-tools'
}
}
plugins {
id 'com.gradle.build-scan' version '1.0'
}
description = 'Mockito mock objects library core API and implementation'
ext {
artifactName = 'mockito-core'
bintrayAutoPublish = true
bintrayRepo = 'maven'
mavenCentralSync = true
}
allprojects {
repositories {
jcenter()
}
tasks.withType(JavaCompile) {
//I don't believe those warnings add value given modern IDEs
options.warnings = false
options.encoding = 'UTF-8'
}
apply plugin: 'checkstyle'
checkstyle {
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
}
}
configurations {
testUtil //TODO move to separate project
}
apply from: 'gradle/root/version.gradle'
apply from: "gradle/java-library.gradle"
dependencies {
compile 'net.bytebuddy:byte-buddy:1.6.11', 'net.bytebuddy:byte-buddy-agent:1.6.11'
provided "junit:junit:4.12", "org.hamcrest:hamcrest-core:1.3"
compile "org.objenesis:objenesis:2.5"
testCompile 'org.ow2.asm:asm:5.1'
testCompile 'org.assertj:assertj-core:1.7.1'
testRuntime configurations.provided
testUtil sourceSets.test.output
}
//need to declare dependencies before applying publishable java library
//otherwise the pom file is incorrect
apply from: "gradle/publishable-java-library.gradle"
apply from: 'gradle/root/ide.gradle'
apply from: 'gradle/root/coverage.gradle'
apply from: 'gradle/root/gradle-fix.gradle'
apply from: 'gradle/root/release.gradle'
apply from: 'gradle/mockito-core/inline-mock.gradle'
apply from: 'gradle/mockito-core/osgi.gradle'
apply from: 'gradle/mockito-core/javadoc.gradle'
apply from: 'gradle/mockito-core/license.gradle'
apply from: 'gradle/mockito-core/testing.gradle'
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}
task ciBuild {
//validate the state of the project
dependsOn { allprojects*.build }
dependsOn tasks.idea, tasks.eclipse
}
release.mustRunAfter ciBuild //Making sure that release task is only invoked after the entire ciBuild validation
//Posting Build scans to https://scans.gradle.com
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
}