diff options
Diffstat (limited to 'buildSrc/src/main')
-rw-r--r-- | buildSrc/src/main/java/PasswordStorePlugin.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/buildSrc/src/main/java/PasswordStorePlugin.kt b/buildSrc/src/main/java/PasswordStorePlugin.kt index df491e0d..52641526 100644 --- a/buildSrc/src/main/java/PasswordStorePlugin.kt +++ b/buildSrc/src/main/java/PasswordStorePlugin.kt @@ -68,9 +68,12 @@ class PasswordStorePlugin : Plugin<Project> { } private fun Project.configureExplicitApi() { - configure<KotlinProjectExtension> { explicitApi() } + val project = this tasks.withType<KotlinCompile> { - kotlinOptions { freeCompilerArgs = freeCompilerArgs + listOf("-Xexplicit-api=strict") } + if (!name.contains("test", ignoreCase = true)) { + project.configure<KotlinProjectExtension> { explicitApi() } + kotlinOptions { freeCompilerArgs += listOf("-Xexplicit-api=strict") } + } } } } |