Comments (7)
build-gradle 看到了这里:
if (str.contains(":")) {
File file = project.file("../componentrelease/" + str.split(":")[1] + "-release.aar")
if (file.exists()) {
project.dependencies.add("compile", str + "-release@aar")
System.out.println("add dependencies : " + str + "-release@aar");
} else {
throw new RuntimeException(str + " not found ! maybe you should generate a new one ")
}
} else {
project.dependencies.add("compile", project.project(':' + str))
System.out.println("add dependencies project : " + str);
}
是不是只要包含: 就会去 componentrelease 寻找 ,否则 使用 compile 引入
那这种 com.huruwo:oneoneponent:1.0.0 的 aar 应该怎样引入
from ddcomponentforandroid.
@HuRuWo 去源码找原因非常赞👍
debugComponent=onecomponent,com.huruwo:oneoneponent:1.0.0 此处的声明是指要引入的组件,onecomponent这个会以该Module直接编译,com.huruwo:oneoneponent:1.0.0这个是指直接使用一个编译好的aar包,后者算是一个福利,对于稳定的模块,可以直接使用编译好的aar包减少编译工作量提升编译速度。
如果是引用仓库上的内容,在gradle中声明依赖就行了。
from ddcomponentforandroid.
com.huruwo:oneoneponent:1.0.0 引入失败了 无法找到这个aar
但是仓库中已有
from ddcomponentforandroid.
在gradle.properties中声明Component,以这种形式com.huruwo:oneoneponent申明是指到当前的工作空间中的componentrelease目录下找aar,另外其文件命名规则你从代码也能看出来了,应该是:“oneoneponent-release.aar”
from ddcomponentforandroid.
oneoneponent-release.aar 这样的命名不能 表示版本代号
我想请教的是:
我已经发布到远程仓库,
如果在build.gradle
里面 引用 我可以直接使用compile "com.huruwo:oneoneponent:1.0.0"
但是我想利用gradle.propertie
配置 配合com.dd.comgradle
实现加载
请问 debugComponent=
这个应该填什么
已知com.huruwo:oneoneponent:1.0.0
失败
from ddcomponentforandroid.
这里并不能直接这样填,你可以试一下再定义一个前缀表示是远端仓库的,然后改一下plugin。
from ddcomponentforandroid.
感谢您的回答,我之前已经意识到这个问题。所以对build-gradle 做了修改,成功解决问题。
app 中
isRunAlone=true
debugComponent=onecomponent,com.huruwo:oneoneponent:1.0.0
再次感谢
from ddcomponentforandroid.
Related Issues (20)
- 项目报错Unable to find a matching configuration of project HOT 11
- android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? HOT 3
- 在实际公司组件化git部署用的哪种方式
- 打包后找不到子组件的类,怎么解决? HOT 1
- 建议
- basicres添加资源后编译失败 HOT 1
- 同时集成Bubly的Tinker1.9.6热修复时,打补丁包失败 HOT 2
- UI 跳转 List 数据的传递怎么使用? HOT 4
- 关于数据传递的问题 HOT 1
- 修改组件文件后,运行app,报错Failed to delete 组件名字\build\intermediates\intermediate-jars\debug\classes.jar HOT 5
- 没明白 AppShareBean不想将一些类下沉如何处理 是如何处理的 HOT 1
- 低版本无法运行的问题 HOT 1
- 低版本无法运行的问题
- 关于组件化dagger android使用相关问题 HOT 2
- gradle 5.1.1 BUG HOT 1
- 模块引入R文件报红
- 组件化,activity之间的共享动画如何处理呀? HOT 1
- 组件化库维护问题
- 依赖包版本compile 'com.android.support:appcompat-v7:26.+'
- 框架不支持App Bundle
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ddcomponentforandroid.