forked from mockito/mockito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
121 lines (101 loc) · 3.92 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
buildscript {
repositories {
mavenLocal() //for local testing of mockito-release-tools
google()
gradlePluginPortal()
}
dependencies {
classpath 'gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1'
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:3.1.0'
classpath "io.github.gradle-nexus:publish-plugin:2.0.0-rc-1"
// TODO check if https://github.com/shipkit/shipkit-changelog/issues/103 is fixed, and remove workaround in shipkit.gradle.
classpath 'org.shipkit:shipkit-changelog:1.2.0'
classpath 'org.shipkit:shipkit-auto-version:1.2.2'
classpath 'com.google.googlejavaformat:google-java-format:1.19.1'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22"
}
}
plugins {
id 'com.diffplug.spotless' version '6.23.3'
id 'eclipse'
id 'com.github.ben-manes.versions' version '0.50.0'
id 'biz.aQute.bnd.builder' version '7.0.0'
id 'ru.vyarus.animalsniffer' version '1.7.1'
}
description = 'Mockito mock objects library core API and implementation'
apply plugin: 'base'
base.archivesName = 'mockito-core'
apply from: 'gradle/shipkit.gradle'
apply from: 'gradle/root/ide.gradle'
apply from: 'gradle/root/gradle-fix.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 {
mavenCentral()
google()
}
plugins.withId('java') {
proj.apply from: "$rootDir/gradle/errorprone.gradle"
proj.apply from: "$rootDir/gradle/jfr.gradle"
proj.apply from: "$rootDir/gradle/spotless.gradle"
}
tasks.withType(JavaCompile).configureEach {
//I don't believe those warnings add value given modern IDEs
options.warnings = false
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc).configureEach {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
options.setSource('11')
}
tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false
reproducibleFileOrder = true
dirMode = Integer.parseInt("0755", 8)
fileMode = Integer.parseInt("0644", 8)
}
apply plugin: 'checkstyle'
checkstyle {
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
}
}
configurations {
testUtil //TODO move to separate project
// Putting 'provided' dependencies on test compile and runtime classpath.
testCompileOnly.extendsFrom(compileOnly)
testRuntimeOnly.extendsFrom(compileOnly)
}
dependencies {
api libraries.bytebuddy, libraries.bytebuddyagent
compileOnly libraries.junit4, libraries.hamcrest, libraries.opentest4j
implementation libraries.objenesis
testImplementation libraries.assertj
testImplementation libraries.junitJupiterApi
testImplementation libraries.junitJupiterParams
testUtil sourceSets.test.output
signature 'org.codehaus.mojo.signature:java18:1.0@signature'
signature 'net.sf.androidscents.signature:android-api-level-26:8.0.0_r2@signature'
}
animalsniffer {
sourceSets = [sourceSets.main]
annotation = 'org.mockito.internal.SuppressSignatureCheck'
// See please https://github.com/mojohaus/animal-sniffer/issues/172
ignore += [
'java.lang.instrument.Instrumentation',
'java.lang.invoke.MethodHandle',
'java.lang.invoke.MethodHandles$Lookup',
'java.lang.StackWalker',
'java.lang.StackWalker$StackFrame',
'java.lang.StackWalker$Option'
]
}