File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 33
44demo解读请参考文章[ Android彻底组件化demo发布] ( http://www.jianshu.com/p/59822a7b2fad )
55
6+ ### 分支说明:
7+ 常驻分支:
8+
9+ * master
10+ * dev
11+ * release
12+
13+ 功能性分支:
14+
15+ * feature/xxxxx
16+
17+ 其中:
18+ master分支作为版本主干,控制release标签
19+
20+ ** dev分支作为开发主干分支** ,feature类型分支从dev迁出,相关功能开发完成后合并到dev,版本功能开发完成后,从dev迁出合并到release分支,“测试”通过后合并到master,发布标签,再从master合并到dev继续迭代。
21+
22+ ** 注意:** 发现项目的bug、优化建议可以建立issue,如果提交bug的修复代码,** pull-request朝dev分支提交** ,带上issue号。
23+
24+ 原则上:分支合并操作由仓库主负责人操作。
25+
626### 实现功能:
727- 组件可以单独调试
828- 组件之间通过接口+实现的方式进行数据传输
@@ -14,12 +34,14 @@ demo解读请参考文章[Android彻底组件化demo发布](http://www.jianshu.c
1434### 使用指南
1535#### 1、主项目引用编译脚本
1636在根目录的gradle.properties文件中,增加属性:
37+
1738``` ini
1839mainmodulename =app
1940```
2041其中mainmodulename是项目中的host工程,一般为app
2142
2243在根目录的build.gradle中增加配置
44+
2345``` gradle
2446buildscript {
2547 repositories {
@@ -36,6 +58,7 @@ buildscript {
3658
3759#### 2、拆分组件为module工程
3860在每个组件的工程目录下新建文件gradle.properties文件,增加以下配置:
61+
3962``` ini
4063isRunAlone =true
4164debugComponent =sharecomponent
@@ -45,12 +68,15 @@ compileComponent=com.mrzhang.share:sharecomponent
4568
4669#### 3、应用组件化编译脚本
4770在组件和host的build.gradle都增加配置:
71+
4872``` gradle
4973apply plugin: 'com.dd.comgradle'
5074```
75+
5176不需要在引用com.android.application或者com.android.library
5277
5378同时增加以下extension配置:
79+
5480``` gradle
5581combuild {
5682 applicatonName = 'com.mrzhang.reader.runalone.application.ReaderApplication'
You can’t perform that action at this time.
0 commit comments