{"id":1214,"date":"2023-03-18T06:56:19","date_gmt":"2023-03-17T22:56:19","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1214"},"modified":"2023-04-29T09:40:35","modified_gmt":"2023-04-29T01:40:35","slug":"atlas-build-baseline-release-dynamic-deployment-remote-bundles-single-module-deployment-publish-bundles-to-private-maven-library","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/18\/atlas-build-baseline-release-dynamic-deployment-remote-bundles-single-module-deployment-publish-bundles-to-private-maven-library\/","title":{"rendered":"Atlas\uff1a\u6784\u5efa-\u57fa\u7ebf\u53d1\u5e03-\u52a8\u6001\u90e8\u7f72-\u8fdc\u7a0bbundle-\u5355\u6a21\u5757\u90e8\u7f72-\u53d1\u5e03bundle\u81f3\u79c1\u6709Maven\u5e93"},"content":{"rendered":"<h2>\u6784\u5efa<\/h2>\n<pre><code>cd app\n..\\gradlew.bat clean assembleDebug<\/code><\/pre>\n<p>\u4ea7\u7269\u76ee\u5f55\uff1a<code>app\/build\/ouput\/apk<\/code><\/p>\n<p><!-- more --><\/p>\n<p>AndroidManifest.xml<\/p>\n<pre><code class=\"language-xml\">&lt;application android:name=&quot;android.taobao.atlas.startup.AtlasBridgeApplication&quot;\/&gt;\n\n&lt;meta-data android:name=&quot;REAL_APPLICATION&quot; android:value=&quot;cn.appblog.atlas.DemoApplication&quot;&gt;\n&lt;meta-data android:name=&quot;multidex_enable&quot; android:value=&quot;true&quot;&gt;<\/code><\/pre>\n<h2>\u57fa\u7ebf\u53d1\u5e03<\/h2>\n<pre><code>cd app\n..\\gradlew.bat publish<\/code><\/pre>\n<p>\u4ea7\u7269\u76ee\u5f55\uff1aMaven\u4ed3\u5e93\u76ee\u5f55<\/p>\n<h2>\u52a8\u6001\u90e8\u7f72<\/h2>\n<p>\u53c2\u8003Tpatch.txt<\/p>\n<h3>Tpatch\u6784\u5efa<\/h3>\n<pre><code>cd app\n..\\gradlew.bat clean assembleDebug -DapVersion=1.0.0 -DversionName=1.0.1<\/code><\/pre>\n<p>\u4ea7\u7269\u76ee\u5f55\uff1a<code>app\/build\/ouput\/tpatch-debug<\/code><\/p>\n<ul>\n<li><code>patch-1.0.1@1.0.0tpatch<\/code><\/li>\n<li><code>update.json<\/code><\/li>\n<\/ul>\n<h3>Tpatch\u7ed3\u6784<\/h3>\n<p>\u5dee\u5f02\u5316classes.dex\u53cares\u76ee\u5f55<\/p>\n<h3>\u6267\u884c\u52a8\u6001\u90e8\u7f72<\/h3>\n<pre><code>adb push build\/outputs\/tpatch-debug\/update-1.0.0.json \/sdcard\/Android\/data\/com.taobao.demo\/cache\/update-1.0.0.json\nadb 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<\/code><\/pre>\n<h2>\u8fdc\u7a0bbundle<\/h2>\n<blockquote>\n<p>\u6ce8\uff1a\u8fdc\u7a0bbundle\u4e0d\u4f1a\u6253\u5305\u8fdbapk\u4e2d<\/p>\n<\/blockquote>\n<pre><code>adb push build\/outputs\/remote-bundles-debug\/libcom_taobao_remotebundle.so \/sdcard\/Android\/data\/com.taobao.demo\/cache<\/code><\/pre>\n<h2>\u5355\u6a21\u5757\u90e8\u7f72\uff08\u70ed\u90e8\u7f72\uff09<\/h2>\n<p>\u9700\u8981\u91cd\u542fAPP\u751f\u6548<\/p>\n<pre><code>cd firstbundle\n..\\gradlew.bat clean assemblePatchDebug<\/code><\/pre>\n<h2>\u53d1\u5e03bundle\u81f3\u79c1\u6709Maven\u5e93<\/h2>\n<h3>\u53d1\u5e03bundle\uff1afirstbundle\/build.gradle<\/h3>\n<pre><code>group = &#039;com.taobao.android.atlasdemo&#039;\nversion = &#039;1.0.0&#039;;\n\napply plugin: &#039;maven&#039;\napply plugin: &#039;maven-publish&#039;\n\npublishing {\n    repositories {\n        mavenLocal()\n    }\n    publications {\n        maven(MavenPublication) {\n            artifact &quot;${project.buildDir}\/outputs\/awb\/${project.name}-debug.awb&quot;\n            artifactId &quot;firstbundle&quot;\n        }\n    }\n}<\/code><\/pre>\n<pre><code>cd firstbundle\n..\\gradlew.bat publish<\/code><\/pre>\n<h3>\u5f15\u7528bundle\uff1aapp\/build.gradle<\/h3>\n<pre><code>\/\/bundleCompile project(&#039;:firstbundle&#039;)\ncompile &#039;com.taobao.android.atlasdemo:firstbundle:1.0.0@awb&#039;<\/code><\/pre>\n<p>\u79fb\u9664<code>setting.gradle<\/code>\u4e2d\u7684<code>include &#039;:firstbundle&#039;<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6784\u5efa cd app ..\\gradlew.bat clean assembleDebug \u4ea7\u7269\u76ee\u5f55\uff1aapp\/b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[275],"tags":[],"class_list":["post-1214","post","type-post","status-publish","format-standard","hentry","category-atlas"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1214"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1214\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}