forked from JetBrains/Exposed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
56 lines (49 loc) · 1.54 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
52
53
54
55
56
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.report.ReportMergeTask
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
plugins {
kotlin("jvm") apply true
id("io.github.gradle-nexus.publish-plugin") apply true
id("io.gitlab.arturbosch.detekt")
}
allprojects {
apply(from = rootProject.file("buildScripts/gradle/checkstyle.gradle.kts"))
if (this.name != "exposed-tests" && this.name != "exposed-bom" && this != rootProject) {
apply(from = rootProject.file("buildScripts/gradle/publishing.gradle.kts"))
}
}
val reportMerge by tasks.registering(ReportMergeTask::class) {
output.set(rootProject.buildDir.resolve("reports/detekt/exposed.xml"))
}
subprojects {
dependencies {
detektPlugins("io.gitlab.arturbosch.detekt", "detekt-formatting", "1.21.0")
}
tasks.withType<Detekt>().configureEach detekt@{
enabled = [email protected] !== "exposed-tests"
finalizedBy(reportMerge)
reportMerge.configure {
input.from([email protected])
}
}
tasks.withType<KotlinJvmCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
apiVersion = "1.6"
languageVersion = "1.6"
}
}
}
nexusPublishing {
repositories {
sonatype {
username.set(System.getenv("exposed.sonatype.user"))
password.set(System.getenv("exposed.sonatype.password"))
useStaging.set(true)
}
}
}
repositories {
mavenLocal()
mavenCentral()
}