AndroidWork
软件架构说明
- xxxx
- xxxx
- xxxx
- xxxx
- xxxx
- xxxx
- Fork 本仓库
- 新建 Feat_xxx 分支
- 提交代码
- 新建 Pull Request
-
app:module 和 lib[]:module(主module与多个子module同时需要设置多渠道编译高版本gradle)
-
例如我当前main:module主项目,applogin:module,base:module,http:module,support:module 四个子module ,首先要搞清楚各module依赖关系
-
故此操作步骤如下
-
工程的build.gradle 增加所有的依赖
-
moduleext.dimensions = [ 'main' : "main", 'applogin': "applogin", 'baselib': "baselib", 'httplib': "httplib", 'supportlib': "supportlib", ]
-
最底层的supportlib:module并没有依赖,只需要申明 defaultConfig { flavorDimensions dimensions.supportlib } productFlavors { //开发环境 PFdev { dimension dimensions.supportlib }
//测试环境 PFTest { dimension dimensions.supportlib } //正式环境 PFrelease { dimension dimensions.supportlib }
}
-
上一层 http:module 依赖supportlib:module 需要申明并依赖 defaultConfig { flavorDimensions dimensions.httplib }
productFlavors { //开发环境 PFdev { dimension dimensions.httplib missingDimensionStrategy dimensions.supportlib, "PFdev", "PFTest", "PFrelease" }
//测试环境
PFTest { dimension dimensions.httplib missingDimensionStrategy dimensions.supportlib, "PFdev", "PFTest", "PFrelease" }
//正式环境
PFrelease { dimension dimensions.httplib missingDimensionStrategy dimensions.supportlib, "PFdev", "PFTest", "PFrelease" } }
-
-
main:module 如下 defaultConfig { flavorDimensions dimensions.main }
productFlavors { //开发环境 PFdev { dimension dimensions.main missingDimensionStrategy dimensions.applogin, "PFdev", "PFTest", "PFrelease" missingDimensionStrategy dimensions.baselib, "PFdev", "PFTest", "PFrelease" missingDimensionStrategy dimensions.httplib, "PFdev", "PFTest", "PFrelease" missingDimensionStrategy dimensions.supportlib, "PFdev", "PFTest", "PFrelease" }
//测试环境 PFTest { dimension dimensions.main missingDimensionStrategy dimensions.applogin, "PFdev", "PFTest", "PFrelease" missingDimensionStrategy dimensions.baselib, "PFdev", "PFTest", "PFrelease" missingDimensionStrategy dimensions.httplib, "PFdev", "PFTest", "PFrelease" missingDimensionStrategy dimensions.supportlib, "PFdev", "PFTest", "PFrelease" } //正式环境 PFrelease { dimension dimensions.main missingDimensionStrategy dimensions.applogin, "PFdev", "PFTest", "PFrelease" missingDimensionStrategy dimensions.baselib, "PFdev", "PFTest", "PFrelease" missingDimensionStrategy dimensions.httplib, "PFdev", "PFTest", "PFrelease" missingDimensionStrategy dimensions.supportlib, "PFdev", "PFTest", "PFrelease" }
}
- 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
- Gitee 官方博客 blog.gitee.com
- 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
- GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
- Gitee 官方提供的使用手册 https://gitee.com/help
- Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/
- 多渠道打包,子module 多渠道 思路 https://blog.csdn.net/z470567554/article/details/103896625
- modulesBase:libBase 可以为添加双层结构的在new module的时候输入的module名字
- DataBinding & viewBinding 常见用法 http://www.javashuo.com/article/p-xwtlmuzw-gw.html
- Navigation Preview unavailable 问题 navigation.xml导航 需要tools:layout="@layout/xxx"才能显示