diff options
Diffstat (limited to 'buildSrc/src')
-rw-r--r-- | buildSrc/src/main/java/BaseProjectConfig.kt | 3 | ||||
-rw-r--r-- | buildSrc/src/main/java/SlimTests.kt | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/buildSrc/src/main/java/BaseProjectConfig.kt b/buildSrc/src/main/java/BaseProjectConfig.kt index f3a33713..f9687c3c 100644 --- a/buildSrc/src/main/java/BaseProjectConfig.kt +++ b/buildSrc/src/main/java/BaseProjectConfig.kt @@ -121,6 +121,7 @@ internal fun TestedExtension.configureCommonAndroidOptions() { sourceSets { named("main") { java.srcDirs("src/main/kotlin") } named("test") { java.srcDirs("src/test/kotlin") } + named("androidTest") { java.srcDirs("src/androidTest/kotlin") } } packagingOptions { @@ -128,6 +129,8 @@ internal fun TestedExtension.configureCommonAndroidOptions() { resources.excludes.add("**/*.txt") resources.excludes.add("**/*.kotlin_module") resources.excludes.add("**/plugin.properties") + resources.excludes.add("**/META-INF/AL2.0") + resources.excludes.add("**/META-INF/LGPL2.1") } compileOptions { diff --git a/buildSrc/src/main/java/SlimTests.kt b/buildSrc/src/main/java/SlimTests.kt index e06c7c8c..4057032b 100644 --- a/buildSrc/src/main/java/SlimTests.kt +++ b/buildSrc/src/main/java/SlimTests.kt @@ -21,7 +21,10 @@ internal fun Project.configureSlimTests() { if (providers.gradleProperty(SLIM_TESTS_PROPERTY).forUseAtConfigurationTime().isPresent) { // disable unit test tasks on the release build type for Android Library projects extensions.findByType<LibraryAndroidComponentsExtension>()?.run { - beforeVariants(selector().withBuildType(BuildType.RELEASE.name)) { it.enableUnitTest = false } + beforeVariants(selector().withBuildType(BuildType.RELEASE.name)) { + it.enableUnitTest = false + it.enableAndroidTest = false + } } // disable unit test tasks on the release build type and free flavor for Android Application @@ -30,6 +33,7 @@ internal fun Project.configureSlimTests() { beforeVariants(selector().withBuildType(BuildType.RELEASE.name)) { it.enableUnitTest = false } beforeVariants(selector().withFlavor(FlavorDimensions.FREE to ProductFlavors.NON_FREE)) { it.enableUnitTest = false + it.enableAndroidTest = false } } } |