diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 2240915..666740d 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -14,8 +14,6 @@ * limitations under the License. */ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { `kotlin-dsl` } @@ -32,8 +30,6 @@ dependencies { implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20-RC2") } -tasks.withType { - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() - } +kotlinDslPluginOptions { + jvmTarget.set(provider { java.targetCompatibility.toString() }) } diff --git a/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.library-conventions.gradle.kts b/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.library-conventions.gradle.kts index 25275fa..7f911bc 100644 --- a/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.library-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/io.github.nstdio.http.ext.library-conventions.gradle.kts @@ -25,6 +25,9 @@ plugins { group = "io.github.nstdio" java { + targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_11 + withJavadocJar() withSourcesJar() } @@ -49,9 +52,6 @@ dependencies { } tasks.withType().configureEach { - sourceCompatibility = JavaVersion.VERSION_11.toString() - targetCompatibility = JavaVersion.VERSION_11.toString() - options.encoding = "UTF-8" options.compilerArgs = listOf("-Xlint:all", "-Xlint:-deprecation") }