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.
java-chat-bot/buildSrc/src/main/kotlin/chat-bot.java-conventions.g...

41 lines
887 B
Plaintext

1 year ago
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")
}
val application = extensions.findByType<JavaApplication>()
application?.apply {
applicationDefaultJvmArgs = listOf("--enable-preview")
}