From 208eed426907b235e20429dfc23473211a609e2e Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 3 Dec 2021 15:08:33 +0530 Subject: Turn on explicit API for Kotlin JVM projects (#1568) --- ...hub.android-password-store.kotlin-library.gradle.kts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts (limited to 'build-logic') diff --git a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts new file mode 100644 index 00000000..516f5e4f --- /dev/null +++ b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts @@ -0,0 +1,17 @@ +/* + * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved. + * SPDX-License-Identifier: GPL-3.0-only + */ + +import org.gradle.kotlin.dsl.withType +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { id("com.github.android-password-store.kotlin-common") } + +tasks.withType().configureEach { + kotlinOptions { + if (!name.contains("test", ignoreCase = true)) { + freeCompilerArgs += listOf("-Xexplicit-api=strict") + } + } +} -- cgit v1.2.3