-
Notifications
You must be signed in to change notification settings - Fork 739
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
Decouple :vector
variants/build types
#6783
Conversation
… injectable interface to decouple from the direct access
|
||
@InstallIn(SingletonComponent::class) | ||
@Module | ||
abstract class DebugModule { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of relying on file overrides with the variants we can provide variant unique modules to the dagger graph and provide different implementations
the variant logic could also be extracted to their own modules in the future if wanted
@@ -187,7 +187,6 @@ | |||
android:name="android.support.PARENT_ACTIVITY" | |||
android:value=".features.home.HomeActivity" /> | |||
</activity> | |||
<activity android:name=".features.debug.DebugMenuActivity" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can now safely exist in only the debug sourceset as the debug implementation of DebugNavigator
is the only place to reference the activity
it looks like the pre-existing |
} | ||
|
||
@Provides | ||
fun providesFlipperProxy() = object : FlipperProxy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should delete the existing FlipperProxy
file in the release variant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah good catch! will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed 6526cf3
…by the debug module
return FDroidGuardServiceStarter(preferences, appContext) | ||
companion object { | ||
@Provides | ||
fun provideGuardServiceStarter(preferences: VectorPreferences, appContext: Context): GuardServiceStarter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it is a detail but could we rename the provide methods using the prefix provides
all the time to keep consistency in all modules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me!
import im.vector.app.features.settings.legals.FlavourLegals | ||
import javax.inject.Inject | ||
|
||
class GoogleFlavorLegals @Inject constructor() : FlavourLegals { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we rename FlavourLegals
to FlavorLegals
to be consistent in naming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I added small comments about naming.
|
SonarCloud Quality Gate failed. |
Type of change
Content
:vector
variant/build type specific logic introducing interfaces, this will allow the variant logic to be lifted out of thevector
module. It also means we can avoid including debug related entry points within the main sourceset.Motivation and context
A handful of refactors to more easily enable #6779 - lifting variant logic to the application module
Screenshots / GIFs
No UI changes
Tests
Smoke test on gplay and fdroid variants
Tested devices