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

Enhancement: Enable Jetpack Compose #5520

Closed
wants to merge 0 commits into from

Conversation

AbdhilahiRWabwire
Copy link

@AbdhilahiRWabwire AbdhilahiRWabwire commented Feb 6, 2024

Jetpack Compose

This pull request audits the Gradle Build, Updates Dependencies, Migrates from KAPT to KSP, Enables Jetpack Compose and Enables Dependabot

@nicolas-raoul
Copy link
Member

Is this about an existing bug or enhacement request? If yes would you mind providing the URL? Thanks!

@AbdhilahiRWabwire
Copy link
Author

This is GitHub Dependabot. Dependabot automatically updates dependencies in GitHub Projects. Dependabot is built into GitHub.

interval: "weekly"
time: "03:00"

- package-ecosystem: "maven"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this? Do we use Maven dependencies?

Copy link
Author

@AbdhilahiRWabwire AbdhilahiRWabwire Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependabot updates Gradle dependencies and Maven packages in unison. For this to work, both must be declared. In fact, Gradle projects benefit the most from Dependabot. Everyone loves Dependabot.

@nicolas-raoul
Copy link
Member

I think it would be great to have it indeed.
Would you mind trying that bot on your fork, so that we can see whether unit tests still pass after the bot has updated dependencies? There will probably be a lot of updates the first time, so better have the fixes ready. Thanks! :-)

@AbdhilahiRWabwire
Copy link
Author

Understood

@AbdhilahiRWabwire
Copy link
Author

AbdhilahiRWabwire commented Feb 6, 2024

@nicolas-raoul Task Complete: com.jackwharton.rxbinding could not be updated because of conflicts with io.reactivex.rxjava

@AbdhilahiRWabwire
Copy link
Author

@nicolas-raoul AVD fails if JDK is updated but the current version of Android Studio uses JDK 17 and JBR 17

@nicolas-raoul
Copy link
Member

Nice, that's very promising! :-)

Somehow the build fails with this error, any idea why?
app/src/main/java/fr/free/nrw/commons/customselector/helper/OnSwipeTouchListener.kt: (42, 9): 'onFling' overrides nothing

I am looking forward to testing the app with all of these updates. :-)

@AbdhilahiRWabwire
Copy link
Author

AbdhilahiRWabwire commented Feb 7, 2024

@nicolas-raoul Thank you sir. I am fixing that error now. It is com.android.tools.build. I believe it is a build error in general and not the class itself.

@AbdhilahiRWabwire
Copy link
Author

AbdhilahiRWabwire commented Feb 7, 2024

@nicolas-raoul

app/src/main/java/fr/free/nrw/commons/customselector/helper/OnSwipeTouchListener.kt: (42, 9): 'onFling' overrides nothing

This line of code requires a manual fix. I will have to go through the code base and fix it.

@nicolas-raoul
Copy link
Member

Wow, thanks a lot! :-)
I believe that flings are only used in that activity.

@AbdhilahiRWabwire
Copy link
Author

AbdhilahiRWabwire commented Feb 8, 2024

@nicolas-raoul

  • Fixing:
Accidental override: The following declarations have the same JVM signature (onFling(Landroid/view/MotionEvent;Landroid/view/MotionEvent;FF)Z):
  • Also:
'getMetrics(DisplayMetrics!): Unit' is deprecated. Deprecated in Java

'getter for defaultDisplay: Display!' is deprecated. Deprecated in Java

@AbdhilahiRWabwire
Copy link
Author

@nicolas-raoul Fixed Accidental override: The following declarations have the same JVM signature (onFling(Landroid/view/MotionEvent;Landroid/view/MotionEvent;FF)Z):

@AbdhilahiRWabwire
Copy link
Author

@nicolas-raoul Execution failed for task ':app:connectedBetaDebugAndroidTest'.

@nicolas-raoul
Copy link
Member

@AbdhilahiRWabwire I believe this pull request would be a wonderful addition to the app. If some updates are creating issues, how about using ignore to leave these ones untouched for now? :-)

@AbdhilahiRWabwire
Copy link
Author

AbdhilahiRWabwire commented Feb 14, 2024

@nicolas-raoul Running Dependency Audit

@AbdhilahiRWabwire
Copy link
Author

Refactoring broken Kotlin files that use KAPT

@AbdhilahiRWabwire AbdhilahiRWabwire changed the title dependabot.yml Enable Jetpack Compose Mar 14, 2024
@AbdhilahiRWabwire AbdhilahiRWabwire changed the title Enable Jetpack Compose Enhancement: Enable Jetpack Compose Mar 14, 2024
@nicolas-raoul
Copy link
Member

Thanks for all of the work!

You can mark your pull request as "draft" until it is ready to review. :-)

@AbdhilahiRWabwire
Copy link
Author

GitHub is not granting me permission to convert this Pull Request into a Draft.

@AbdhilahiRWabwire
Copy link
Author

AbdhilahiRWabwire commented Apr 8, 2024

Some Views require Android API 33 to function but I have upgraded to Android API 34. I can fix the compatibility issue in the Views by refactoring.

@AbdhilahiRWabwire
Copy link
Author

I see the Jetpack Compose Migration has begun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants