From a82f8dda860714f446373e6c9406f13d8d6a2547 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 13 Aug 2021 18:40:34 +0530 Subject: Disable explicit API for tests (#1483) * build: disable explicit API for test tasks * Remove `internal` modifier from test classes --- buildSrc/src/main/java/PasswordStorePlugin.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'buildSrc') 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 { } private fun Project.configureExplicitApi() { - configure { explicitApi() } + val project = this tasks.withType { - kotlinOptions { freeCompilerArgs = freeCompilerArgs + listOf("-Xexplicit-api=strict") } + if (!name.contains("test", ignoreCase = true)) { + project.configure { explicitApi() } + kotlinOptions { freeCompilerArgs += listOf("-Xexplicit-api=strict") } + } } } } -- cgit v1.2.3