构建
cd app
..\gradlew.bat clean assembleDebug
产物目录:app/build/ouput/apk
AndroidManifest.xml
<application android:name="android.taobao.atlas.startup.AtlasBridgeApplication"/>
<meta-data android:name="REAL_APPLICATION" android:value="cn.appblog.atlas.DemoApplication">
<meta-data android:name="multidex_enable" android:value="true">
基线发布
cd app
..\gradlew.bat publish
产物目录:Maven仓库目录
动态部署
参考Tpatch.txt
Tpatch构建
cd app
..\gradlew.bat clean assembleDebug -DapVersion=1.0.0 -DversionName=1.0.1
产物目录:app/build/ouput/tpatch-debug
patch-1.0.1@1.0.0tpatchupdate.json
Tpatch结构
差异化classes.dex及res目录
执行动态部署
adb push build/outputs/tpatch-debug/update-1.0.0.json /sdcard/Android/data/com.taobao.demo/cache/update-1.0.0.json
adb push build/outputs/tpatch-debug/patch-1.0.1@1.0.0.tpatch /sdcard/Android/data/com.taobao.demo/cache/patch-1.0.1@1.0.0.tpatch
远程bundle
注:远程bundle不会打包进apk中
adb push build/outputs/remote-bundles-debug/libcom_taobao_remotebundle.so /sdcard/Android/data/com.taobao.demo/cache
单模块部署(热部署)
需要重启APP生效
cd firstbundle
..\gradlew.bat clean assemblePatchDebug
发布bundle至私有Maven库
发布bundle:firstbundle/build.gradle
group = 'com.taobao.android.atlasdemo'
version = '1.0.0';
apply plugin: 'maven'
apply plugin: 'maven-publish'
publishing {
repositories {
mavenLocal()
}
publications {
maven(MavenPublication) {
artifact "${project.buildDir}/outputs/awb/${project.name}-debug.awb"
artifactId "firstbundle"
}
}
}
cd firstbundle
..\gradlew.bat publish
引用bundle:app/build.gradle
//bundleCompile project(':firstbundle')
compile 'com.taobao.android.atlasdemo:firstbundle:1.0.0@awb'
移除setting.gradle中的include ':firstbundle'