-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
66 lines (55 loc) · 1.71 KB
/
build.gradle.kts
File metadata and controls
66 lines (55 loc) · 1.71 KB
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
plugins {
alias(rollbarlibs.plugins.androidLibrary) apply false
alias(rollbarlibs.plugins.vanniktech) apply false
alias(rollbarlibs.plugins.spotbugs) apply false
alias(rollbarlibs.plugins.revapi) apply false
id("com.rollbar.conventions.release") apply false
}
val versionName = rootProject.extra["VERSION_NAME"] as String
allprojects {
version = versionName
repositories {
google()
mavenCentral()
}
}
subprojects {
val isExample = name.contains("examples") || parent?.name == "examples"
val isAndroid = name.contains("android")
if (isExample) {
return@subprojects
}
apply(plugin = "com.rollbar.conventions.release")
if (isAndroid) {
return@subprojects
}
apply(plugin = "java-library")
apply(from = "$rootDir/gradle/quality.gradle")
apply(from = "$rootDir/gradle/compatibility.gradle")
repositories {
mavenCentral()
}
tasks.withType<Jar>().configureEach {
manifest {
attributes(
mapOf(
"Implementation-Title" to project.name,
"Implementation-Version" to versionName
)
)
}
}
dependencies {
add("testImplementation", "junit:junit:4.13.2")
add("testImplementation", "org.hamcrest:hamcrest-all:1.3")
add("testImplementation", "org.mockito:mockito-core:5.18.0")
}
tasks.withType<JavaCompile>().configureEach {
if (JavaVersion.current().isJava9Compatible) {
options.release.set(8)
} else {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
}
}