-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
69 lines (55 loc) · 1.97 KB
/
build.gradle.kts
File metadata and controls
69 lines (55 loc) · 1.97 KB
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "2.3.20" apply false
id("org.javamodularity.moduleplugin") version "2.0.0" 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 compileTestJava by tasks.existing(JavaCompile::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
configure<JavaPluginExtension> {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}
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")
}
extensions.configure(org.javamodularity.moduleplugin.extensions.TestModuleOptions::class) {
runOnClasspath = false
}
}
compileTestJava {
extensions.configure(org.javamodularity.moduleplugin.extensions.CompileTestModuleOptions::class) {
compileOnClasspath = false
}
}
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")
}
}