Gradle:如何包括从存储库到输出AAR文件的依赖项 [英] Gradle: how to include dependencies from repositories to output aar file
问题描述
我正在尝试在Android Studio中构建arr包.该软件包包含Zendesk的依赖项:
I am trying to build an arr package in Android Studio. This package contains dependecies for Zendesk:
allprojects {
repositories {
maven { url 'https://zendesk.artifactoryonline.com/zendesk/repo' }
}
}
compile (group: 'com.zendesk', name: 'sdk', version: '1.7.0.1') {
transitive = true
}
compile (group: 'com.zopim.android', name: 'sdk', version: '1.3.1.1') {
transitive = true
}
我想为Unity3d项目构建此软件包.该软件包应包含Zendesk的所有依赖项(transitive = true属性).当我打开aar文件时,Zendesk没有任何依赖关系.怎么了?
I want to build this package for a Unity3d project. This package should contain all dependecies for Zendesk (the transitive = true property). When I open the aar file there is no dependencies for Zendesk. What is wrong?
推荐答案
默认情况下,AAR不包含任何依赖项.如果要包括它们,则必须将这些库从工件/缓存文件夹复制到包中,方法是手动执行,否则此任务可能会对您有所帮助:https://stackoverflow.com/a/33539941/4310905
By default AARs do not include any dependencies. If you want to include them you have to copy these libs from artifactory/your cache folder into your package, either by doing it manually or this task might help you: https://stackoverflow.com/a/33539941/4310905
这篇关于Gradle:如何包括从存储库到输出AAR文件的依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!