-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathbuild.gradle.kts
64 lines (52 loc) · 1.75 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 {
kotlin("jvm") version "2.0.0" apply false
id("org.javamodularity.moduleplugin") version "1.8.15" apply false
}
subprojects {
apply(plugin = "kotlin")
apply(plugin = "org.javamodularity.moduleplugin")
//region https://docs.gradle.org/current/userguide/kotlin_dsl.html#using_kotlin_delegated_properties
val test by tasks.existing(Test::class)
val implementation by configurations
val testImplementation by configurations
val testRuntimeOnly by configurations
val jUnitVersion: String by project
val jUnitPlatformVersion: String by project
//endregion
//region KOTLIN
if (gradle.gradleVersion >= "8.0") {
configure<JavaPluginExtension> {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}
} else {
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
//endregion
repositories {
mavenCentral()
}
configure<org.javamodularity.moduleplugin.extensions.ModularityExtension> {
improveEclipseClasspathFile()
moduleVersion("1.2.3")
}
test {
useJUnitPlatform()
testLogging {
events("PASSED", "FAILED", "SKIPPED", "STANDARD_OUT")
}
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:$jUnitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$jUnitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jUnitVersion")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:$jUnitPlatformVersion")
}
}