Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kover doesn't follow the configured "testBuildType" for an android project. #187

Closed
gerardoepitacio opened this issue Jun 3, 2022 · 5 comments

Comments

@gerardoepitacio
Copy link

gerardoepitacio commented Jun 3, 2022

Having the example project in the branch multiple_android_flavor

https://github.com/gerardoepitacio/KoverTest/tree/feature/multiple_android_flavor

when I try to execute the task:

./gradlew :app:koverHtmlReport

throws the following error

> Task :app:compileAppQaUnitTestKotlin FAILED
e: /Users/ge/dev-test/KoverTest/app/src/test/java/com/example/koverfail04/RemoteDataProviderImplTest.kt: (8, 50): Unresolved reference: RemoteDataProviderBuilder

This is because, Kover tries to build the build type "qa", which can't reach the resource of the build type "development"

even though "testBuildType" was correctly configured in android {... } to explicitly run my test for the development build type.

Additional information about changing the test build type

Change the test build type
https://developer.android.com/studio/build/gradle-tips#change-the-test-build-type

Expected behavior, one of the following scenarios might be good to follow.

  • Kover should be able to follow the configured testBuildType, and compile only the required resources to run the tests in the configured build type.
  • Kover should generate different tasks for every build type and product flavor, to be able to generate reports for specific build type and product flavor (more recommended.).
@shanshin
Copy link
Collaborator

shanshin commented Jun 3, 2022

Relates #78

@shanshin
Copy link
Collaborator

shanshin commented Jun 3, 2022

Hi,
in the current version Kover does not support working with build types and flavours.

@gerardoeg
Copy link

There is a way to help to support the expected behavior for this Issue?.

@shanshin

@shanshin
Copy link
Collaborator

@gerardoeg, hi, thank you for the offer.
This feature is already being developed and will most likely be included in the next big release (0.7.0 or 0.8.0).

@shanshin
Copy link
Collaborator

Duplicates #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants