-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
102 lines (87 loc) · 2.93 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import com.adarshr.gradle.testlogger.TestLoggerExtension
import com.adarshr.gradle.testlogger.theme.ThemeType
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.20")
classpath("com.adarshr:gradle-test-logger-plugin:4.0.0")
classpath("com.github.gmazzo:gradle-buildconfig-plugin:3.1.0")
classpath("org.jetbrains.kotlin:kotlin-allopen:2.0.20")
classpath("org.openjfx:javafx-plugin:0.1.0")
}
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
allprojects {
group = "com.github.tiagohm"
version = project.properties["version.code"]!!.toString()
repositories {
mavenCentral()
google()
// jcenter()
maven { setUrl("https://jitpack.io") }
}
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 == "nestalgia-bom") return@subprojects
apply {
plugin("com.adarshr.test-logger")
}
configure<TestLoggerExtension> {
theme = ThemeType.STANDARD
slowThreshold = 2000L
showStackTraces = false
showSkipped = true
showStandardStreams = true
showPassedStandardStreams = true
showSkippedStandardStreams = false
showFailedStandardStreams = true
logLevel = LogLevel.QUIET
}
tasks.withType<KotlinCompile> {
compilerOptions {
jvmTarget.set(JVM_17)
freeCompilerArgs.addAll(
"-Xjvm-default=all", "-Xjsr305=strict",
"-Xno-param-assertions", "-Xno-call-assertions", "-Xno-receiver-assertions",
"-opt-in=kotlin.io.path.ExperimentalPathApi"
)
}
}
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", "true")
systemProperty("github", System.getProperty("github", "false"))
}
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
}