-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
51 lines (44 loc) · 1.71 KB
/
build.gradle.kts
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
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.report.ReportMergeTask
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.7.3" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
id("com.android.library") version "8.7.3" apply false
id("io.gitlab.arturbosch.detekt") version "1.23.7"
id("org.jetbrains.dokka") version "1.9.20"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
kotlin("jvm") version "2.1.0"
kotlin("plugin.serialization") version "2.1.0"
}
val detektReportMergeSarif by tasks.registering(ReportMergeTask::class) {
output = layout.buildDirectory.file("reports/detekt/merge.sarif.json")
}
allprojects {
apply(plugin = "io.gitlab.arturbosch.detekt")
tasks.withType<Detekt>().configureEach {
jvmTarget = "1.8"
reports {
xml.required = true
html.required = true
txt.required = true
sarif.required = true
md.required = true
basePath = rootDir.absolutePath
finalizedBy(detektReportMergeSarif)
}
}
detektReportMergeSarif {
input.from(tasks.withType<Detekt>().map { it.sarifReportFile })
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://your-server.com/staging"))
snapshotRepositoryUrl.set(uri("https://your-server.com/snapshots"))
username.set("your-username") // defaults to project.properties["myNexusUsername"]
password.set("your-password") // defaults to project.properties["myNexusPassword"]
}
}
}