Giter Site home page Giter Site logo

Comments (7)

HuRuWo avatar HuRuWo commented on July 17, 2024

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.

leobert-lan avatar leobert-lan commented on July 17, 2024

@HuRuWo 去源码找原因非常赞👍


debugComponent=onecomponent,com.huruwo:oneoneponent:1.0.0 此处的声明是指要引入的组件,onecomponent这个会以该Module直接编译,com.huruwo:oneoneponent:1.0.0这个是指直接使用一个编译好的aar包,后者算是一个福利,对于稳定的模块,可以直接使用编译好的aar包减少编译工作量提升编译速度。

如果是引用仓库上的内容,在gradle中声明依赖就行了。

from ddcomponentforandroid.

HuRuWo avatar HuRuWo commented on July 17, 2024

com.huruwo:oneoneponent:1.0.0 引入失败了 无法找到这个aar
但是仓库中已有

from ddcomponentforandroid.

leobert-lan avatar leobert-lan commented on July 17, 2024

在gradle.properties中声明Component,以这种形式com.huruwo:oneoneponent申明是指到当前的工作空间中的componentrelease目录下找aar,另外其文件命名规则你从代码也能看出来了,应该是:“oneoneponent-release.aar”

from ddcomponentforandroid.

HuRuWo avatar HuRuWo commented on July 17, 2024

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.

leobert-lan avatar leobert-lan commented on July 17, 2024

这里并不能直接这样填,你可以试一下再定义一个前缀表示是远端仓库的,然后改一下plugin。

from ddcomponentforandroid.

HuRuWo avatar HuRuWo commented on July 17, 2024

感谢您的回答,我之前已经意识到这个问题。所以对build-gradle 做了修改,成功解决问题。

QQ截图20171110151648.png

app 中

isRunAlone=true
debugComponent=onecomponent,com.huruwo:oneoneponent:1.0.0

再次感谢

from ddcomponentforandroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.