Qigsaw is a dynamic modularization library which is based on Android App Bundles. It supports dynamic delivery for split APK without reinstalling the base one.
Import qigsaw-gradle-plugin as a dependency in your main build.gradle
in the root of your project:
buildscript {
dependencies {
classpath 'com.iqiyi.android.qigsaw:gradle-plugin:1.1.4'
}
}
Then "apply" the plugin and import dependencies by adding the following lines to your app/build.gradle
.
dependencies {
//qigsaw core lib
implementation "com.iqiyi.android.qigsaw:splitcore:1.1.4"
}
...
...
apply plugin: 'com.iqiyi.qigsaw.application'
At Last, "apply" another plugin by adding the following lines to your dynamicfeature/build.gradle
.
...
...
apply plugin: 'com.iqiyi.qigsaw.dynamicfeature'
Considering that every app has its own downloader, qigsaw just provides an interface Downloader and you are expected to implement it. Learn more from the sample SampleDownloader.
Qigsaw-gradle-plugin will upload split APKs which require dynamic delivery during compilation, so you have to implement SplitApkUploader to upload split APKs to your own CND server. Learn more from the sample SampleSplitApkUploader.
How to install qigsaw? Learn more from the sample QigsawApplication.
For proguard, we have already made the proguard config automatically via qigsaw-gradle-plugin.
For multiDex, learn more from the sample multidexkeep.pro.
For more qigsaw configurations, learn more from the sample app/build.gradle.
How to install split APKs? Qigsaw provides the same APIs to Play Core Library, so you may read google developer docs to install.
How to build base and split APKs? During development, you may use qigsawAssembleDebug
task or just click Run
app in Android Studio to build. When releasing your app, use qigsawAssembleRelease
task to build.
How to update splits? Please see our Split Update Guide.
There are some issues which Qigsaw can't update or support at present.
- Can't update split AndroidManifest.xml dynamically, for example adding Android Component.
- Can't update base APK dynamically.
- Doesn't support Android OS version lower than 4.0.
- Doesn't support incremental update for split APK.
- Learn more from the Known issues about Android App Bundle.
Qigsaw supports some functions which Android App Bundle doesn't yet.
- Supports to declare Application in split AndroidManifest. Qigsaw will invoke
Applicaton#attachBaseContext
andApplicaton#onCreate
methods for split application. - Supports to declare ContentProvider in split AndroidManifest.
- Learn more from qigsaw-sample-android.
- Study the source code.
- Check wiki or FAQ for help.
- Contact us kisson_cjw@hotmail.com.
- Join QQ group chat.
For more information about contributing, issues or pull requests, please check our Qigsaw Contributing Guide.
Qigsaw is MIT licensed. Read the LICENSE file for detail.