forked from mockito/mockito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
111 lines (91 loc) · 3.03 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
buildscript {
repositories {
mavenLocal() //for local testing of mockito-release-tools
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0'
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.4.4' //for 'java-compatibility-check.gradle'
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.0.15'
//Using buildscript.classpath so that we can resolve shipkit from maven local, during local testing
classpath 'org.shipkit:shipkit:2.0.28'
}
}
plugins {
id 'com.gradle.build-scan' version '1.15.1'
}
description = 'Mockito mock objects library core API and implementation'
apply plugin: 'base'
archivesBaseName = "mockito-core"
apply plugin: "org.shipkit.java"
allprojects {
plugins.withId("java") {
//Only upload specific modules we select
bintrayUpload.enabled = false
}
}
apply from: 'gradle/root/ide.gradle'
apply from: 'gradle/root/gradle-fix.gradle'
apply from: 'gradle/root/java-compatibility-check.gradle'
apply from: 'gradle/java-library.gradle'
apply from: 'gradle/license.gradle'
apply from: 'gradle/root/coverage.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/testing.gradle'
apply from: 'gradle/dependencies.gradle'
allprojects { proj ->
repositories {
jcenter()
}
plugins.withId('java') {
proj.apply plugin: 'net.ltgt.errorprone'
proj.dependencies {
errorprone libraries.errorprone
}
}
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
}
dependencies {
compile libraries.bytebuddy, libraries.bytebuddyagent
compileOnly libraries.junit4, libraries.hamcrest
compile libraries.objenesis
testCompile libraries.asm
testCompile libraries.assertj
//putting 'provided' dependencies on test compile and runtime classpath
testCompileOnly configurations.compileOnly
testRuntime configurations.compileOnly
testUtil sourceSets.test.output
}
wrapper {
gradleVersion = '4.9'
distributionSha256Sum = 'e66e69dce8173dd2004b39ba93586a184628bc6c28461bc771d6835f7f9b0d28'
}
//Posting Build scans to https://scans.gradle.com
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
}
//workaround for #1444, delete when Shipkit bug is fixed
subprojects {
afterEvaluate {
def lib = publishing.publications.javaLibrary
if(lib && !lib.artifactId.startsWith("mockito-")) {
lib.artifactId = "mockito-" + lib.artifactId
}
}
}
//end workaround