mill icon indicating copy to clipboard operation
mill copied to clipboard

Hello world Kotlin Jetpack Compose Example; Fixes:#3550

Open himanshumahajan138 opened this issue 1 year ago • 6 comments

Pull Request

Fixes: #3550

Description

Added Kotlin Android Jetpack Compose Example insuring proper integration of AndroidAppKotlinModule with Jetpack Compose

Related Issues

  • Link to related issue #3550.

Checklist

  • [x] Android hello world application with Jetpack Compose integration.
  • [x] Code is clean and follows project conventions.
  • [x] Documentation has been updated (to be done after review)

Additional Notes

@lihaoyi Sir Please review my PR First if everything from the code side is accepted then i will proceed with documentation Part for the changes Please Pardon me if I made any mistake...

himanshumahajan138 avatar Oct 18 '24 14:10 himanshumahajan138

Left some comments. Looks reasonable overall. Haven't tested it manually, but will do before merging.

lihaoyi avatar Oct 19 '24 10:10 lihaoyi

All Reviews Has been Resolved if any further changes are needed then please review this again

If Code is done, then I will move to the documentation part (please confirm once)

himanshumahajan138 avatar Oct 19 '24 17:10 himanshumahajan138

Please proceed with documentation, you do not meed to wait until code is done

lihaoyi avatar Oct 19 '24 21:10 lihaoyi

I think what you are missing here (to be precise - in your previous PR) is support of the resources: drawables (at least for the icon), strings, etc. Because no real-world app won't be released without those. There is also a question of different qualifiers support, but this is another story.

0xnm avatar Oct 20 '24 16:10 0xnm

I think what you are missing here (to be precise - in your previous PR) is support of the resources: drawables (at least for the icon), strings, etc. Because no real-world app won't be released without those. There is also a question of different qualifiers support, but this is another story.

yes Sir, i know actually when i raised this pr i just solved the unresolved reference error and i think that its working but today when i tested my android application then i came to know that its crashing(and discussed same in discord about aar full support today)

Now i am working in the rest of the implementation and if you know something about how the android aar files are handled in the backend(like how their resources are merged, manifest.xml merge, R.txt merge and many other things) i my self have reached out a lot of android developers but still didn't got the right answer

no worries i will try my best to solve this issue

any help appreciated...

himanshumahajan138 avatar Oct 20 '24 16:10 himanshumahajan138

Finally, its Done App is running and Working

Documentation also Updated; All Tests Passed

@lihaoyi Please Provide Final reviews if Required....

Please Pardon me if i made any mistake...

Screenshot: WhatsApp Image 2024-10-21 at 22 19 38_4fa92c7d

himanshumahajan138 avatar Oct 21 '24 16:10 himanshumahajan138

@himanshumahajan138 I tried this out locally, it appears that we do not make any use of Jetpack Compose in the actual application example, and everything still works even when the Compose ivydeps and imports have been commented out. This needs to use Jetpack Compose to in the application to make sure it actually works

lihaoyi avatar Oct 23 '24 06:10 lihaoyi

@lihaoyi I Will make it work also but first i think we should do something for SDK coz downloading it again and again sense out nothing

himanshumahajan138 avatar Oct 23 '24 06:10 himanshumahajan138

@lihaoyi Sir I have Updated whole android Setup, Examples and fixed that error (if ivydeps are commented)

Updations:

  • Android Sdk Paths updated and fixes the issue of re-downloading again and again
  • Changed the Whole process for AAR files from res to jar full updated
  • Professional Support for Jetpack compose
  • Previous Android Examples updated with new structure
  • optimised the code for better speed (reduce time for downloading and installing sdk)

Please Review this....

Pardon me if any mistake done by me...

himanshumahajan138 avatar Oct 24 '24 19:10 himanshumahajan138

@himanshumahajan138 example/kotlinlib/android/2-jetpack-compose-hello-world/app/src/java/com/helloworld/app/MainActivity.kt still does not make use of Jetpack compose in its implementation.

Please take the source code from https://github.com/android/codelab-android-compose/blob/main/BasicsCodelab/app/src/main/java/com/codelab/basics/MainActivity.kt and ensure it can build and run correctly

lihaoyi avatar Oct 24 '24 23:10 lihaoyi

@lihaoyi sorry sir its my bad, I will update the code... Thanks for being cooperative...

himanshumahajan138 avatar Oct 25 '24 02:10 himanshumahajan138