-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Working towards android support #4169
Conversation
unit test for android java example See merge request vaslabs-ltd/mill!2
…d-examples' 3350 consolidate android kotlin java See merge request vaslabs-ltd/mill!3
…d-examples' 3350 consolidate android kotlin java See merge request vaslabs-ltd/mill!4
I think it's ready for another go on a review. Some of the tests seem flaky, but let me know if I nicked something. Also good to test it locally. One note: It seems that running 2 emulators is sometimes too much for github actions (although it passed at least once in my copy). So if you want we can use the android emulator action and use a shared one. But I wanted to have the emulator functionality in mill too, for a more out of the box CI experience |
@@ -452,4 +512,230 @@ trait AndroidAppModule extends JavaModule { | |||
PathRef(Task.dest) | |||
} | |||
|
|||
/** The name of the virtual device to be created by [[createAndroidVirtualDevice]] */ | |||
def virtualDeviceIdentifier: String = "test" |
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.
Let's prefix most of the task names here with android
. AndroidAppModule
is expected to be mixed into JavaModule
or KotlinModule
or ScalaModule
, so it would be good to prefix the tasks to avoid conflicts.
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.
done, let me know if I missed any
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.
Some last nits but looks really good overall, once those are settled I think we can merge it and close out the relevant bounties
Thanks for mentioning, I had a brief look and a few things conflict others we complement each other (e.g. I've changed everything to use the standard android structure after a brief discussion with @lihaoyi ) and you've done the android manifest merging. I think my PR should go first to get the standard structure and the emulator work out, and then we could either work together to merge yours or any other arrangement you'd like |
…tead. Try to workaround the android emulator timeout by sleeping a bit in kotlin test to allow the javatest to finish
I'm going to try and merge this PR before merging #4188, since it's been open WIP for a while and I don't want to drag it out too long |
@vaslabs great now it's Merged Actually i was waiting for this merge coz i was working on the jetpack compose support, so @vaslabs are you familiar with how gradle or other build tools work with jetpack compose or in general how they manage the aar dependency resolution ? Moreover, may be now we can move to jetpack compose (aar dependency resolution) part coz its required for further android support Relevant PR: #3769 (may be i will close this and open a new coz its very old and have conflicts) Hope you Understand! |
Part of Android support
Relevant issues:
Outline
New features
Github actions
A sample repo to demonstrate what's needed to run the emulator https://github.com/vaslabs-ltd/test-android-emulator
In the end what slowed me down was that for github actions, the AVD home env var was needed, which wasn't obvious until I've tested it in isolation . All the flags and kvm configs are also needed and it's what https://github.com/ReactiveCircus/android-emulator-runner does
Stubs and missing features
An effort was made to standardise the structure faster, so follow up PRs will not use a non-standard structure. Things that are working but not "production ready" are:
Demo
Running android tests
mill_android_tests_demo.mp4