Skip to content

Hilt migration#16143

Merged
irfano merged 25 commits intotrunkfrom
feature/dagger-to-hilt
Apr 25, 2022
Merged

Hilt migration#16143
irfano merged 25 commits intotrunkfrom
feature/dagger-to-hilt

Conversation

@irfano
Copy link
Copy Markdown
Member

@irfano irfano commented Mar 22, 2022

This is the parent feature PR for hilt migration. Child PRs: PR 1, PR 2, PR3

Hilt migration was implemented as an experiment in #15653 before, but it's a big PR and a bit outdated.
This PR aims to implement Hilt with minimum required changes. Dagger will not be removed completely. Hilt and Dagger will be used together.

To test:
There is no user-facing change. Build the app with different variants to see if it's still buildable and tests are working.

Regression Notes

  1. Potential unintended areas of impact
    Some tests might be broken. Debug and release builds might work wrong.

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    I run current tests. I built the debug app. I relied on automated tests for release build.

  3. What automated tests I added (or what prevented me from doing so)
    There is no new feature. No tests are added.

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

irfano and others added 7 commits March 6, 2022 18:33
WellSqlInitializer is added for debug and release variants. It'll be used in AppInitializer.
AppInitializer is created, and all initializing stuff is moved to AppInitializer from WordPress.
# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/WordPress.java
@irfano irfano marked this pull request as draft March 22, 2022 10:31
@irfano irfano self-assigned this Mar 22, 2022
@irfano irfano mentioned this pull request Mar 22, 2022
3 tasks
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Mar 28, 2022

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Mar 28, 2022

You can test the changes on this Pull Request by downloading the APKs:

# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/WordPress.java
@irfano irfano mentioned this pull request Apr 18, 2022
3 tasks
@peril-wordpress-mobile
Copy link
Copy Markdown

Warnings
⚠️ PR has more than 300 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@wpmobilebot
Copy link
Copy Markdown
Contributor

Found 1 violations:

The PR caused the following dependency changes:

-+--- com.google.dagger:dagger:2.41
-|    \--- javax.inject:javax.inject:1
 +--- com.google.dagger:dagger-android-support:2.41
-|    \--- com.google.dagger:dagger:2.41 (*)
+|    \--- com.google.dagger:dagger:2.41
+|         \--- javax.inject:javax.inject:1
+\--- com.google.dagger:hilt-android:2.41
+     +--- com.google.dagger:dagger:2.41 (*)
+     +--- com.google.dagger:dagger-lint-aar:2.41
+     +--- com.google.dagger:hilt-core:2.41
+     |    +--- com.google.dagger:dagger:2.41 (*)
+     |    +--- com.google.code.findbugs:jsr305:3.0.2
+     |    \--- javax.inject:javax.inject:1
+     +--- com.google.code.findbugs:jsr305:3.0.2
+     +--- androidx.activity:activity:1.3.1 (*)
+     +--- androidx.annotation:annotation:1.2.0
+     +--- androidx.fragment:fragment:1.3.6 (*)
+     +--- androidx.lifecycle:lifecycle-common:2.3.1 (*)
+     +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 (*)
+     +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 (*)
+     +--- androidx.savedstate:savedstate:1.1.0 (*)
+     +--- javax.inject:javax.inject:1
+     \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.32 -> 1.6.10 (*)

Please review and act accordingly

@irfano irfano marked this pull request as ready for review April 22, 2022 09:30
Copy link
Copy Markdown
Contributor

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

Good work everyone with the child PRs!

Thank you @irfano for taking and leading this initiative 🙇 !

The code lgtm and I smoke-tested the build from the PR by creating a new site, then going through all the possible screens I could think of, then deleting a site and selecting my main one and proceeding to do the same navigation through all possible screens I could find.

Everything worked as expected 🎉

I'd say :shipit:

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants