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

Add hello-world Android Java & Kotlin examples using Mill (2000USD bounty) #3550

Open
2 of 4 tasks
lihaoyi opened this issue Sep 15, 2024 · 13 comments · Fixed by #3659 or #3679 · May be fixed by #3769
Open
2 of 4 tasks

Add hello-world Android Java & Kotlin examples using Mill (2000USD bounty) #3550

lihaoyi opened this issue Sep 15, 2024 · 13 comments · Fixed by #3659 or #3679 · May be fixed by #3769
Labels
Milestone

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Sep 15, 2024


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:

  1. 500USD Android Java Support:
  • A folder in 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.
  • Just the simplest plain-old-Java android app is fine: no need fancier features or C++ code or whatever.
  • Manual testing of the final APK is fine, but the process to build it should be exercised in the example.
  • The app should have two modules containing Java code, one depending on another, to demonstrate how splitting of a app codebase into modules works
  • Android-specific config should be extracted into a trait AndroidJavaModule in mill.javalib, and only app-specific config should be in the example/javalib/android/1-hello-world example
  • Both the library code and the example code should be rigorously documented w.r.t. how it is used and how it fits into the larger Android ecosystem
  1. 500USD Advanced Android Java Example
  1. 500USD Android Kotlin Support:
  • Same as (1) above, except for Kotlin: example/kotlinlib/android/1-hello-world, plain-old-Kotlin code, manual testing, two modules, with a trait AndroidKotlinModule in mill.kotlinlib
  1. 500USD Jetpack Compose Example
  • A hello-world example demonstating usage of the Jetpack Compose framework for Android with Kotlin
@lihaoyi lihaoyi added the bounty label Sep 15, 2024
@aybanda
Copy link

aybanda commented Sep 15, 2024

@lihaoyi
can you assign this to me? I can start working on this immediately

@lihaoyi
Copy link
Member Author

lihaoyi commented Sep 15, 2024

@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

@himanshumahajan138
Copy link
Contributor

@lihaoyi I Guess i Fixed #3550 Issue please check my PR : #3596

@lihaoyi lihaoyi changed the title Add hello-world android Java example using Mill (500USD bounty) Add hello-world android Java example using Mill (1000USD bounty) Sep 26, 2024
@lihaoyi
Copy link
Member Author

lihaoyi commented Sep 26, 2024

Bumping this to a 1000USD bounty for Java and added 1000USD bounty for further kotlin support

@lihaoyi lihaoyi changed the title Add hello-world android Java example using Mill (1000USD bounty) Add hello-world Android Java & Kotlin examples using Mill (1000USD bounty) Sep 26, 2024
@lihaoyi lihaoyi changed the title Add hello-world Android Java & Kotlin examples using Mill (1000USD bounty) Add hello-world Android Java & Kotlin examples using Mill (1500USD bounty) Sep 26, 2024
@lihaoyi lihaoyi changed the title Add hello-world Android Java & Kotlin examples using Mill (1500USD bounty) Add hello-world Android Java & Kotlin examples using Mill (2000USD bounty) Sep 26, 2024
@himanshumahajan138
Copy link
Contributor

@lihaoyi Please Check my pr #3596 i have everything running fine in local but getting problem with the live test i dont know whats happening please do consider my efforts and review the pr once

@lihaoyi
Copy link
Member Author

lihaoyi commented Sep 28, 2024

I fleshed out the Java and Kotlin bounties in more detail and added intermediate milestones

@himanshumahajan138
Copy link
Contributor

i think first milestone is almost done by me #3596 and now the main thing is to add documentation but @lihaoyi please explain me how and in what format documentation will be ?

@lihaoyi
Copy link
Member Author

lihaoyi commented Oct 5, 2024

Reopened because only 1/4 tasks is complete

@nabby27

This comment was marked as off-topic.

lihaoyi pushed a commit that referenced this issue Oct 8, 2024
# 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 lihaoyi reopened this Oct 8, 2024
@himanshumahajan138
Copy link
Contributor

himanshumahajan138 commented Oct 8, 2024

@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 2-jetpack-compose-hello-world

  1. 500USD Jetpack Compose Example
  • A hello-world example demonstating usage of the Jetpack Compose framework for Android with Kotlin

@himanshumahajan138
Copy link
Contributor

This is An Extension for the conversation #3735

Issue

Error: Unresolved Reference (Kotlin Android Jetpack Compose)

Description

Error: Unresolved Reference (This Issue comes out when we are trying to implement androidx libraries related to issue: #3550 and pr: #3696)

Steps to Reproduce

  1. Cherry Pick the commits of Pr: [WIP] Hello world Kotlin Jetpack Compose Example; Fixes:#3550 #3696
  2. Run the Command ./mill -i -j3 -k example.kotlinlib.android[2-jetpack-compose-hello-world].__.local.testCached
  3. After running it will get unresolved reference error for andoridx libraries

Expected Behavior

It should compile and build the application using jetpack compose

Actual Behavior

Getting unresolved reference error which should not come in general coz we are using aar and jar files both and following rules.

Logs

Actual Error: #3696 (comment)

CompileClasspath(before converting aar to jar): #3696 (comment)

CompileClasspath(after converting aar to jar): #3696 (comment)

Additional Information

This 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...

himanshumahajan138 added a commit to himanshumahajan138/mill that referenced this issue Oct 19, 2024
himanshumahajan138 added a commit to himanshumahajan138/mill that referenced this issue Oct 19, 2024
himanshumahajan138 added a commit to himanshumahajan138/mill that referenced this issue Oct 19, 2024
himanshumahajan138 added a commit to himanshumahajan138/mill that referenced this issue Oct 21, 2024
himanshumahajan138 added a commit to himanshumahajan138/mill that referenced this issue Oct 24, 2024
@himanshumahajan138
Copy link
Contributor

@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...

@himanshumahajan138
Copy link
Contributor

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment