You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
plugins {
|
|
|
|
java
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
toolchain {
|
|
|
|
languageVersion.set(JavaLanguageVersion.of(21))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
val libs = versionCatalogs.named("libs")
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compileOnly(libs.findLibrary("lombok").get())
|
|
|
|
annotationProcessor(libs.findLibrary("lombok").get())
|
|
|
|
|
|
|
|
testImplementation(platform(libs.findLibrary("junit-bom").get()))
|
|
|
|
testImplementation(libs.findLibrary("junit-jupiter").get())
|
|
|
|
|
|
|
|
testCompileOnly(libs.findLibrary("lombok").get())
|
|
|
|
testAnnotationProcessor(libs.findLibrary("lombok").get())
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<JavaCompile> {
|
|
|
|
options.compilerArgs.add("--enable-preview")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<Test> {
|
|
|
|
useJUnitPlatform()
|
|
|
|
jvmArgs("--enable-preview")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register("deps") {
|
|
|
|
group = "build"
|
|
|
|
description = "resolves all resolvable configurations"
|
|
|
|
|
|
|
|
doLast {
|
|
|
|
configurations.filter { it.isCanBeResolved }.forEach { it.resolve() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
val application = extensions.findByType<JavaApplication>()
|
|
|
|
application?.apply {
|
|
|
|
applicationDefaultJvmArgs = listOf("--enable-preview")
|
|
|
|
}
|