-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
test: fix studio task recognition for jacoco test tasks #17830
test: fix studio task recognition for jacoco test tasks #17830
Conversation
if you do the task registration "bare" without assigning to a variable, Android Studio will recognize your tasks as run targets for UI usage enable this by refactoring post-definition configuration into the task definition itself, so no local variable is needed and it's just a "bare" task creation
By any chance, is there a way to also be able to just run all of them at once? When I tried to run through the green arrow on
I guess it's because all simulators are off. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of those times I wish I knew gradle better. Great improvement! 🙏
When you run the
Yep, exactly that
I do not, sorry - going to go for "incremental improvement" here and say it could be solved with documentation "I have started an android emulator and run ..." for the PR checkbox text ? Also it could be that having the text say "all tests pass locally (you can launch an emulator then right-click on the androidTest and test directories and 'Run all' in Anki-Android to verify this)" At which point this PR doesn't really affect anyone but it does at least enable people to run them from the GUI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also LGTM.
I'm all for incremental improvement. Clearly not blocking. If by any luck it was an easy one-line change, I'd have loved it, but this is certainly a great PR to merge as-is! |
Purpose / Description
if you do the task registration "bare" without assigning to a variable, Android Studio will recognize your tasks as run targets for UI usage
Fixes
Nothing logged, was question from Arthur in Discord
Approach
refactoring post-definition configuration into the task definition itself, so no local variable is needed and it's just a "bare" task creation
How Has This Been Tested?
We have the play icon next to the targets now:
Learning (optional, can help others)
Meh, IDEs are weird. Should have recognized the task registration without this change
Checklist
Please, go through these checks before submitting the PR.