-
Notifications
You must be signed in to change notification settings - Fork 76
/
build.gradle
84 lines (71 loc) · 2.3 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
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "de.marcphilipp.gradle:nexus-publish-plugin:0.4.0"
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.2"
classpath "com.github.spotbugs.snom:spotbugs-gradle-plugin:4.8.0"
classpath "com.palantir.gradle.revapi:gradle-revapi:1.4.4"
}
}
apply plugin: 'io.codearte.nexus-staging'
nexusStaging {
packageGroup = GROUP
username = System.getenv('NEXUS_USERNAME')
password = System.getenv('NEXUS_PASSWORD')
numberOfRetries = 180
delayBetweenRetriesInMillis = 3000
}
allprojects {
version VERSION_NAME
repositories {
google()
mavenCentral()
}
}
subprojects { project ->
if (!project.name.contains('android') && !project.parent.name.equals("examples") && !project.name.contains('examples')) {
apply plugin: 'java-library'
apply from: "$rootDir/gradle/release.gradle"
apply from: "$rootDir/gradle/quality.gradle"
apply from: "$rootDir/gradle/compatibility.gradle"
repositories {
mavenCentral()
}
jar {
manifest {
attributes(
"Implementation-Title": project.name,
"Implementation-Version": VERSION_NAME
)
}
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.8.0'
}
compileJava {
if (JavaVersion.current().isJava9Compatible()) {
options.release = 8
} else {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
compileTestJava {
if (JavaVersion.current().isJava9Compatible()) {
options.release = 8
} else {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
}
}
wrapper {
gradleVersion = '6.9.4'
}