summaryrefslogtreecommitdiff
path: root/build-logic/kotlin-plugins/src
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-12-03 15:08:33 +0530
committerGitHub <noreply@github.com>2021-12-03 09:38:33 +0000
commit208eed426907b235e20429dfc23473211a609e2e (patch)
tree1df46bc45d473161255fb792a7770d76880e5f24 /build-logic/kotlin-plugins/src
parentd9727f7a4c9513f20168013924f742f850e2009d (diff)
Turn on explicit API for Kotlin JVM projects (#1568)
Diffstat (limited to 'build-logic/kotlin-plugins/src')
-rw-r--r--build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-library.gradle.kts17
1 files changed, 17 insertions, 0 deletions
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<KotlinCompile>().configureEach {
+ kotlinOptions {
+ if (!name.contains("test", ignoreCase = true)) {
+ freeCompilerArgs += listOf("-Xexplicit-api=strict")
+ }
+ }
+}