Skip to content

Commit

Permalink
Fixed incompatibility with android.testFixtures.enable = true
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzo committed Sep 12, 2023
1 parent 435acf8 commit 25ff91e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions demo-project/login/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ android {
namespace = "com.example.login"
compileSdk = libs.versions.android.sdk.get().toInt()
buildFeatures.viewBinding = true
testFixtures.enable = true

defaultConfig {
minSdk = 21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ abstract class AndroidTestCoverageAggregationPlugin : Plugin<Project> {
isCanBeResolved = false
isVisible = false
attributes {
attribute(Usage.USAGE_ATTRIBUTE, objects.named(USAGE_TEST_AGGREGATION))
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.VERIFICATION))
attribute(
TestSuiteType.TEST_SUITE_TYPE_ATTRIBUTE,
Expand Down Expand Up @@ -129,6 +130,7 @@ abstract class AndroidTestCoverageAggregationPlugin : Plugin<Project> {
isCanBeResolved = false
isVisible = false
attributes {
attribute(Usage.USAGE_ATTRIBUTE, objects.named(USAGE_TEST_AGGREGATION))
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.VERIFICATION))
attribute(
TestSuiteType.TEST_SUITE_TYPE_ATTRIBUTE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.attributes.Category
import org.gradle.api.attributes.TestSuiteType
import org.gradle.api.attributes.Usage
import org.gradle.api.attributes.VerificationType
import org.gradle.api.tasks.testing.Test
import org.gradle.configurationcache.extensions.capitalized
import org.gradle.kotlin.dsl.USAGE_TEST_AGGREGATION
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.named

Expand All @@ -21,6 +23,7 @@ abstract class AndroidTestResultsAggregationPlugin : Plugin<Project> {
isCanBeResolved = false
isVisible = false
attributes {
attribute(Usage.USAGE_ATTRIBUTE, objects.named(USAGE_TEST_AGGREGATION))
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.VERIFICATION))
attribute(
TestSuiteType.TEST_SUITE_TYPE_ATTRIBUTE,
Expand Down

0 comments on commit 25ff91e

Please sign in to comment.