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

Android test variant support #194

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

Tanish-Ranjan
Copy link
Contributor

Addressing #183, this PR discovers all the test variants and adds them to the source sets.

@Tanish-Ranjan
Copy link
Contributor Author

This has been branched from android-support branch. I will rebase once #173 is merged.

Changes:
- Updated AndroidUtils to populate all fields individually so failure in retrieval of one property won't lead to the collapse of whole source set.
- Added android resource directories only if the variant is not a unit test
- Updated GradleApiConnectorTest#testAndroidSourceSets to consider the all the test variants and their dependencies
- Addressed checkstyle issues
@Tanish-Ranjan Tanish-Ranjan force-pushed the feat/android-support-tests branch from 4542f3b to 47dfa24 Compare September 5, 2024 16:46
@Tanish-Ranjan Tanish-Ranjan marked this pull request as ready for review September 5, 2024 19:14
@Tanish-Ranjan
Copy link
Contributor Author

Tested the changes with default test project by integrating with vscode-gradle extension. The test variants were retrieved successfully.

@jdneo jdneo self-requested a review September 6, 2024 01:52
@jdneo jdneo added this to the 0.4.0 milestone Sep 6, 2024
@jdneo jdneo added enhancement New feature or request android Android support related labels Sep 6, 2024
Changes:
- AndroidUtils#convertVariantToGradleSourceSet now returns a list of source sets rather than a single source set.
- AndroidUtils#addTests now returns a list of test source sets.
@jdneo jdneo merged commit e06306a into microsoft:develop Sep 13, 2024
4 checks passed
@jdneo
Copy link
Member

jdneo commented Sep 13, 2024

Thank you for your contribution! @Tanish-Ranjan

@Tanish-Ranjan Tanish-Ranjan deleted the feat/android-support-tests branch September 13, 2024 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Android support related enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants