-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
119 lines (102 loc) · 3.44 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.buildConfig = [
minSdk : 15,
compileSdk: 33,
targetSdk : 30
]
}
plugins {
alias libs.plugins.android.application apply false
alias libs.plugins.kotlin
alias libs.plugins.detekt
alias libs.plugins.dokka
alias libs.plugins.dependencyAnalysis // Usage: ./gradlew buildHealth
}
allprojects {
repositories {
google()
mavenCentral()
}
}
subprojects {
apply plugin: "maven-publish"
apply plugin: "signing"
apply plugin: "io.gitlab.arturbosch.detekt"
group = "com.gyurigrell.rxreactor"
def isRelease = Boolean.valueOf(project.hasProperty("release") ? project.property("release") as String : "false")
version = project.property("VERSION") + (isRelease ? "" : "-SNAPSHOT")
detekt {
config = files("${rootProject.projectDir}/config/detekt/detekt.yml")
baseline = file("${rootProject.projectDir}/config/detekt/detekt-baseline.xml")
buildUponDefaultConfig = true
}
dependencies {
detektPlugins libs.detekt.formatting
}
tasks.named("detekt").configure {
reports {
xml.required.set(true)
xml.outputLocation.set(file("build/reports/detekt/detekt.xml"))
html.required.set(true)
html.outputLocation.set(file("build/reports/detekt/detekt.html"))
sarif.required.set(false)
txt.required.set(false)
}
}
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
}
}
}
tasks.withType(JavaCompile).tap {
configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).tap {
configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/ggrell/RxReactor")
credentials {
username = project.findProperty("gpr.username")
password = project.findProperty("gpr.key")
}
}
maven {
name = "MavenCentralSnapshots"
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
credentials {
username = project.findProperty("ossrh.username")
password = project.findProperty("ossrh.password")
}
}
maven {
name = "MavenCentralReleases"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")
credentials {
username = project.findProperty("ossrh.username")
password = project.findProperty("ossrh.password")
}
}
}
}
}