-
Notifications
You must be signed in to change notification settings - Fork 267
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
[Experimental] Add Dynamic Feature Module (no on-demand) #637
base: master
Are you sure you want to change the base?
Conversation
Your app is deployed! Try it via https://deploygate.com/distributions/0b41907c86db0f71dc34f6019dca808b6bd1f505 |
Apk comparision results
Generated by 🚫 Danger |
@@ -0,0 +1,3 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> |
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.
The resource R.xml.preferences appears to be unused |
@@ -2,4 +2,5 @@ | |||
<string name="app_name" translatable="false">DroidKaigi 2019</string> | |||
<string name="app_logo_description" translatable="false">logo image</string> | |||
<string name="entire_survey_request">Please fill out the entire survey</string> | |||
<string name="title_staff_dfm">Staff</string> |
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.
The resource R.string.title_staff_dfm appears to be unused |
@@ -28,6 +29,10 @@ open class App : DaggerApplication() { | |||
@Inject lateinit var systemStore: SystemStore | |||
@Inject lateinit var systemActionCreator: SystemActionCreator | |||
|
|||
val appCmponent: AppComponent by lazy { |
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.
📝
modules = [ | ||
StaffModule::class | ||
], | ||
dependencies = [AppComponent::class] |
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.
📝
Why experimental
|
Brilliant! Very cool 🆒 |
If we can include this PR, probably we will use apk.
How about this? val isContainsDfm = SplitInstallManagerFactory
.create(activity)
.installedModules.contains("staff_dfm")
Navigation.findNavController(activity, R.id.root_nav_host_fragment)
.navigate(
if (isContainsDfm) {
R.id.staff_search
} else {
activityActionCreator.openUrl("https://droidkaigi.jp/2019/staff")
}
) |
I investigated this matter. It seems I had used bundletool but got an error from D8 due to Android Binding related class duplicate. So I've tried to disable DataBinding on stuff_dfm and move related layouts to the base module, then the universal apk is available and works fine. This is just my guess: Workaround
|
Perhaps it may be resolved by setting |
@takahirom Yes, it works. I'd tried to import progaurd settings and made a universal apk. I confirmed it worked fine! ( we need to disable resource shrinking and use proguard instead of r8 though) |
FYIUsing bundletool in my project which uses AGP 3.3 was working. (My project needs additional proguard.pro configuration though.) |
Is that fixed by #669 ? 👀 |
@@ -2,4 +2,5 @@ | |||
<string name="app_name" translatable="false">DroidKaigi 2019</string> |
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.
The resource R.string.app_name appears to be unused |
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.
It looks Android Lint bug 👀
@STAR-ZERO If you have any problem, Please tell me. 👀 |
I got a below error when run
Stacktrace
|
Does your problem still exist? |
Yes 😢 I try to fix but it will take a while. |
😢 |
Same to me 🤔 |
Sorry, I could not pull. 😭 I can reproduce this. |
For your reference 🙏 transform register exception cause class Stacktrace
|
@STAR-ZERO |
Generated by 🚫 Danger |
Issue
Overview (Required)
feature/staff_dfm
Links
Screenshot