Turn on explicit API for Kotlin JVM projects (#1568)

This commit is contained in:
Harsh Shandilya 2021-12-03 15:08:33 +05:30 committed by GitHub
parent d9727f7a4c
commit 208eed4269
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 3 deletions

View file

@ -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")
}
}
}