-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
84 lines (70 loc) · 2.4 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21")
classpath("com.gradleup.shadow:shadow-gradle-plugin:8.3.5")
}
repositories {
mavenCentral()
gradlePluginPortal()
google()
}
}
allprojects {
group = "com.github.tiagohm"
version = project.properties["version.code"]!!.toString()
repositories {
mavenCentral()
google()
}
tasks.create("downloadDependencies") {
description = "Download all dependencies to the Gradle cache"
doLast {
for (configuration in configurations) {
if (configuration.isCanBeResolved) {
configuration.files
}
}
}
}
}
subprojects {
val project = this@subprojects
if (project.name == "nebulosa-bom") return@subprojects
tasks.withType<KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
freeCompilerArgs = listOf(
"-Xjvm-default=all", "-Xjsr305=strict",
"-opt-in=kotlin.io.path.ExperimentalPathApi",
"-opt-in=kotlin.io.encoding.ExperimentalEncodingApi",
"-Xno-param-assertions", "-Xno-call-assertions", "-Xno-receiver-assertions",
)
}
}
tasks.withType<Test> {
useJUnitPlatform()
maxParallelForks = Runtime.getRuntime().availableProcessors()
reports.html.required.set(false)
reports.junitXml.required.set(false)
testLogging {
exceptionFormat = TestExceptionFormat.FULL
}
systemProperty("junit.jupiter.extensions.autodetection.enabled", "false")
systemProperty("github", System.getProperty("github", "false"))
systemProperty("root.dir", "$rootDir")
systemProperty("project.dir", "$projectDir")
systemProperty("app.dir", "$rootDir/data") // LOGBACK
}
tasks.withType<JavaCompile> {
options.isFork = true
options.encoding = Charsets.UTF_8.toString()
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
}
}
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}