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

Use Anvil KSP instead of the Square KAPT one #3564

Merged
merged 6 commits into from
Oct 2, 2024

Conversation

jmartinesp
Copy link
Member

Content

Replace Anvil with Anvil KSP fork by ZacSweers.

Reuse the setupAnvil function for this.

Also add a couple of improvements to fetching the features and libraries modules for gradle configuration.

Motivation and context

Official Anvil has been without a stable release for > 9 months now, and has several broken features.

Besides this, we get:

  • Getting back configuration cache and incremental compilation.
  • Being able to update to Kotlin 2.0+.
  • No more F-Droid reproducible build issues caused by the IR code generation (hopefully).
  • Not needing KAPT anymore, although we could go back to using it if performance degrades with a pure KSP approach.

Tests

Check the project builds and runs fine.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@jmartinesp jmartinesp added the PR-Build For changes related to build, tools, CI/CD label Sep 30, 2024
@jmartinesp jmartinesp requested a review from a team as a code owner September 30, 2024 12:36
@jmartinesp jmartinesp requested review from ganfra and removed request for a team September 30, 2024 12:36
implementation(project(":services:analytics:impl"))
implementation(project(":services:analyticsproviders:posthog"))
implementation(project(":services:analyticsproviders:sentry"))

Copy link
Member

Choose a reason for hiding this comment

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

I think you want to check this change again, the current file is more recent.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah damn, I think the rebase broke it. Thanks, I'll take a look.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

github-actions bot commented Sep 30, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/i5JdGi

@jmartinesp jmartinesp added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Sep 30, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Sep 30, 2024
@jmartinesp jmartinesp force-pushed the misc/jme/anvil-ksp-fork branch from 2abbbbe to d1cf31a Compare September 30, 2024 20:56
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.00%. Comparing base (1d5509e) to head (9d05a88).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3564      +/-   ##
===========================================
- Coverage    82.69%   81.00%   -1.70%     
===========================================
  Files         1732     1756      +24     
  Lines        40977    42229    +1252     
  Branches      4964     5086     +122     
===========================================
+ Hits         33886    34207     +321     
- Misses        5337     6254     +917     
- Partials      1754     1768      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmartinesp jmartinesp force-pushed the misc/jme/anvil-ksp-fork branch from eed0c79 to 9d05a88 Compare October 2, 2024 06:36
@@ -19,7 +18,7 @@ import io.element.android.libraries.di.SingleIn
@SingleIn(AppScope::class)
@MergeComponent(AppScope::class)
interface AppComponent : NodeFactoriesBindings {
@Component.Factory
@MergeComponent.Factory
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM if CI is happy!

Copy link

sonarqubecloud bot commented Oct 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Oct 2, 2024
@jmartinesp jmartinesp enabled auto-merge (squash) October 2, 2024 11:21
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Oct 2, 2024
@jmartinesp jmartinesp merged commit 79c17f7 into develop Oct 2, 2024
29 of 30 checks passed
@jmartinesp jmartinesp deleted the misc/jme/anvil-ksp-fork branch October 2, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Build For changes related to build, tools, CI/CD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants