summaryrefslogtreecommitdiff
path: root/build-logic/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'build-logic/build.gradle.kts')
-rw-r--r--build-logic/build.gradle.kts22
1 files changed, 5 insertions, 17 deletions
diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts
index 0f3d9342..6f7a78c0 100644
--- a/build-logic/build.gradle.kts
+++ b/build-logic/build.gradle.kts
@@ -2,28 +2,16 @@
* Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
-import org.gradle.api.JavaVersion
-import org.gradle.api.tasks.compile.JavaCompile
-import org.gradle.kotlin.dsl.withType
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { `kotlin-dsl` }
-tasks.withType<JavaCompile>().configureEach {
- sourceCompatibility = JavaVersion.VERSION_17.toString()
- targetCompatibility = JavaVersion.VERSION_17.toString()
+private val jvmToolchainAction = Action<JavaToolchainSpec> {
+ languageVersion.set(JavaLanguageVersion.of(17))
+ vendor.set(JvmVendorSpec.ADOPTIUM)
}
-tasks.withType<KotlinCompile>().configureEach {
- kotlinOptions {
- jvmTarget = JavaVersion.VERSION_17.toString()
- freeCompilerArgs =
- freeCompilerArgs +
- listOf(
- "-opt-in=kotlin.RequiresOptIn",
- )
- }
-}
+java.toolchain(jvmToolchainAction)
+kotlin.jvmToolchain(jvmToolchainAction)
gradlePlugin {
plugins {