forked from rollbar/rollbar-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
98 lines (83 loc) · 2.97 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 {
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 "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.2.4"
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()
jcenter()
}
}
subprojects { project ->
if (!project.name.contains('android') &&
!project.parent.name.equals("examples") &&
!project.name.contains('examples')) {
apply plugin: 'java-library'
// reactive-streams support will be published along with Spring Webflux
if (!project.name.startsWith('rollbar-reactive-streams')) {
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().compareTo(JavaVersion.VERSION_1_9) >= 0) {
// Use the --release javac flag, available since JDK9, which is equivalent to setting
// the source, target, and bootstrap classpath, and catches all usages of stdlib
// features not available in the target version.
options.release = 7
} else {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
if (System.env.JDK7_HOME) {
options.bootstrapClasspath = files("${System.env.JDK7_HOME}/jre/lib/rt.jar")
}
}
compileTestJava {
if (JavaVersion.current().compareTo(JavaVersion.VERSION_1_9) >= 0) {
options.release = 8
} else {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
}
}
wrapper {
gradleVersion = '6.6'
}