configure java compile task with java 17

This commit is contained in:
baheroff 2024-10-01 18:00:33 +03:00
parent e0a2f0edfa
commit 0cb4867db0
1 changed files with 12 additions and 2 deletions

View File

@ -7,8 +7,8 @@ plugins {
// The kotlin-dsl plugin requires a repository to be declared
repositories {
maven { url = uri("https://nexus.lan.ubrr.ru/repository/gradle-central") }
maven { url = uri("https://nexus.lan.ubrr.ru/repository/maven-jcenter") }
//maven { url = uri("https://nexus.lan.ubrr.ru/repository/gradle-central") }
//maven { url = uri("https://nexus.lan.ubrr.ru/repository/maven-jcenter") }
jcenter()
google()
gradlePluginPortal()
@ -28,6 +28,16 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))
}
//val compileJava: JavaCompile by tasks
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
//compileJava.apply {
// sourceCompatibility = JavaVersion.VERSION_17.toString()
// targetCompatibility = JavaVersion.VERSION_17.toString()
//}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "17"