val jdkVersion = JavaVersion.VERSION_17 allprojects { // Ensure that the generated code from the annotation processor is added to sourceset so it is included in the final jar. tasks.withType<Jar> { duplicatesStrategy = DuplicatesStrategy.EXCLUDE } tasks.compileJava { options.encoding = StandardCharsets.UTF_8.toString() sourceCompatibility = jdkVersion.toString() targetCompatibility = jdkVersion.toString() } tasks.compileTestJava { options.encoding = StandardCharsets.UTF_8.toString() sourceCompatibility = jdkVersion.toString() targetCompatibility = jdkVersion.toString() } tasks.compileKotlin { kotlinOptions { apiVersion = "1.8" jvmTarget = jdkVersion.toString() javaParameters = true } } tasks.compileTestKotlin { kotlinOptions { apiVersion = "1.8" jvmTarget = jdkVersion.toString() javaParameters = true } } tasks.withType<Test> { useJUnitPlatform() testLogging.showExceptions = true systemProperty("org.jboss.logging.provider", "log4j2") testLogging { events(FAILED, STANDARD_ERROR, SKIPPED, PASSED) exceptionFormat = FULL showExceptions = true showCauses = true showStackTraces = true } } }