-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
64 lines (63 loc) · 1.94 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
57
58
59
60
61
62
63
64
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
val kotlinVersion = "1.3.72"
kotlin("jvm") version kotlinVersion apply false
kotlin("plugin.serialization") version kotlinVersion apply false
id("org.jmailen.kotlinter") version "2.4.0" apply false
id("com.github.sherter.google-java-format") version "0.9"
id("org.jetbrains.dokka") version "0.10.1" apply false
id("com.github.ben-manes.versions") version "0.28.0"
id("io.gitlab.arturbosch.detekt") version "1.9.1"
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven(url = "https://jitpack.io")
}
}
subprojects {
group = "com.github.cs125-illinois.answerable"
version = "2020.6.5"
tasks.withType<KotlinCompile> {
val javaVersion = JavaVersion.VERSION_1_8.toString()
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
kotlinOptions {
jvmTarget = javaVersion
}
}
tasks.withType<Test> {
useJUnitPlatform()
enableAssertions = true
if (JavaVersion.current() >= JavaVersion.VERSION_11) {
jvmArgs("-ea", "-Xmx1G", "-Xss256k", "--enable-preview")
} else {
jvmArgs("-ea", "-Xmx1G", "-Xss256k")
}
}
}
tasks.dependencyUpdates {
resolutionStrategy {
componentSelection {
all {
if (listOf("alpha", "beta", "rc", "cr", "m", "preview", "b", "ea", "eap", "release").any { qualifier ->
candidate.version.matches(Regex("(?i).*[.-]$qualifier[.\\d-+]*"))
}) {
reject("Release candidate")
}
}
}
}
gradleReleaseChannel = "current"
}
detekt {
input = files(
"cli/src/main/kotlin", "core/src/main/kotlin", "jeedrunner/src/main/kotlin"
)
buildUponDefaultConfig = true
}
tasks.register("check") {
dependsOn("detekt")
}