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

@ -6,6 +6,7 @@
plugins {
id("com.github.android-password-store.android-library")
id("com.github.android-password-store.kotlin-android")
id("com.github.android-password-store.kotlin-library")
id("com.vanniktech.maven.publish")
id("org.jetbrains.dokka")
id("com.github.android-password-store.psl-plugin")

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

View file

@ -4,7 +4,7 @@
*/
plugins {
kotlin("jvm")
id("com.github.android-password-store.kotlin-common")
id("com.github.android-password-store.kotlin-library")
}
dependencies { implementation(libs.thirdparty.kotlinResult) }

View file

@ -5,7 +5,7 @@
plugins {
kotlin("jvm")
id("com.github.android-password-store.kotlin-common")
id("com.github.android-password-store.kotlin-library")
}
dependencies {

View file

@ -2,9 +2,10 @@
* Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
plugins {
kotlin("jvm")
id("com.github.android-password-store.kotlin-common")
id("com.github.android-password-store.kotlin-library")
}
dependencies {

View file

@ -6,6 +6,7 @@
plugins {
id("com.github.android-password-store.android-library")
id("com.github.android-password-store.kotlin-android")
id("com.github.android-password-store.kotlin-library")
id("com.vanniktech.maven.publish")
id("org.jetbrains.dokka")
}