-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
Add hello-world Android Java & Kotlin examples using Mill (2000USD bounty) #3550
Comments
@lihaoyi |
@aybanda go ahead. Bounties aren't assignned and remain open until completed, but typically there's few enough people doing them that you dont need to worry about conflicts with others |
Bumping this to a 1000USD bounty for Java and added 1000USD bounty for further kotlin support |
I fleshed out the Java and Kotlin bounties in more detail and added intermediate milestones |
Reopened because only 1/4 tasks is complete |
This comment was marked as off-topic.
This comment was marked as off-topic.
# Pull Request Fixes: #3550 ## Description Added `Kotlin Android "Hello World" Application Example` while reusing `AndroidSdkModule`, `KotlinModule` and creating new Module `AndroidAppModule` with Kotlin Support and Proper `Documentation`. ## Related Issues - Link to related issue #3550. ## Checklist - [x] Android Support for Kotlin Added in the example section for "HelloWorld" Android Application. - [x] Added Kotlin Source files and Customized AndroidAppModule. - [x] Code is clean and follows project conventions. - [x] Documentation has been updated. - [x] Tests have been added or updated. - [x] All tests pass. ## Additional Notes Actually, I was wondering that we reused the `AndroidSdkModule` but created a new Module `AndroidAppModule` for Andorid Workflow but what we can do is to provide `Kotlin support in the Existing AndroidAppModule` and then based on user query they can use the functionality. So for this i need @lihaoyi Sir your Permission and Guidance, Please Review this PR suggest changes...
@lihaoyi Sir, What should be the name for this like we have used 1-hello-world for simple then for this what to do... what i used
|
This is An Extension for the conversation #3735 IssueError: Unresolved Reference (Kotlin Android Jetpack Compose) DescriptionError: Steps to Reproduce
Expected BehaviorIt should compile and build the application using jetpack compose Actual BehaviorGetting unresolved reference error which should not come in general coz we are using aar and jar files both and following rules. LogsActual Error: #3696 (comment) CompileClasspath(before converting aar to jar): #3696 (comment) CompileClasspath(after converting aar to jar): #3696 (comment) Additional InformationThis issue is raised to get some attention regarding the issue #3550 part 4th and i think current issue needs to be solved first Please help out, if anyone can solve this or guide me for this... |
@0xnm, I need your help in adding jetpack compose support to mill if you are available for help then please once reply its very hard to add jetpack compose support (adding compilation and resource linking) Please once Reply if You are available... |
@lihaoyi to be honest without adding jetpack compose or any other third party aar dependency support fully we can't move to other examples and follow ups coz i know the backend implementation and without proper support its not possible so i request you if we are not able to solve this problem you please hire one specialist for this who can add proper professional support for aar libraries handling and this needs to be done first for resolving follow ups |
## Part of Android support ### Relevant issues: - #3868 - #3550 ### Outline - Follow android studio + gradle standard for directory structure - Unit test support (local runs - no android device needed) - Integration test support (android tests, needs an android device/emulator) ### New features - Ability to install an apk in the default available android device (tested against AVD) - Ability to run all integration tests with the install command (android manifest with instrumentation is needed, this needs to be a functionality of integration tests support in the future instead) - Classpath resolution (runtimeDependencies) for packaging with dependencies and user's source code (tested against integration test and running the android app itself via the emulator) - Special classpath resolution and packaging for android tests (integration tests) - Mill integrates with avdmanager, adb and emulator to automate the run of integration tests by creating virtual devices and controlling the emulator (start, stop). Examples are added in documentation of both kotlin and java app. This includes the ability to use different emulators for different apps, by specifying identifiers and ports, though this use case should be rare in app development lifecycles. - Github actions & mill support to run integration tests in (headless) emulator & differentiate from local mode (windowed emulator + default gpu settings) ### 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: 1. Integration tests debug apk: This inherits the current apk construction, debug functionality needs to be added and separated from the release androidApk task 2. No testOnly for integration tests: this is easy to do, but was not added in the interest of not increasing the size of the PR and the testing surface 3. Classpath resolution: For kotlin, jvm specific dependencies are removed in a hardcoded way. 4. Desugaring: This shows as a warning in the android tests apk creation, while the flow works, the d8 will need to be configured to desugar annotations properly. 5. Emulator CI mode only recognises github actions ### Demo #### Running android tests https://github.com/user-attachments/assets/0cb47ac7-32ff-4d5c-a678-11cd18807b10 --------- Co-authored-by: irodotos7 <irodotos@vaslabs.io>
From the maintainer Li Haoyi: I'm putting a 2000USD bounty on this issue, payable by bank transfer on a merged PR implementing this.
We have a bunch of examples for generic library dev and backend server dev (spring-boot, micronaut), but we don't have any android examples.
Something like https://hereket.com/posts/android_from_command_line/ or https://github.com/authmane512/android-project-template could be good references.
As this is a large bounty, I'm breaking it down into four pieces:
example/javalib/android/1-hello-world
that contains a build that contains Java code for building a trivial hello-world android app APK, that can then be loaded into a physical phone or android emulator.trait AndroidJavaModule
inmill.javalib
, and only app-specific config should be in theexample/javalib/android/1-hello-world
exampleA more sophisticated version of the example in (1) above, demonstrating usage of:
example/kotlinlib/android/1-hello-world
, plain-old-Kotlin code, manual testing, two modules, with atrait AndroidKotlinModule
inmill.kotlinlib
The text was updated successfully, but these errors were encountered: