[英]How to add transitive dependencies of Android archive in gradle
在我們公司,我們已經開始對我們的android項目進行模塊化,並且每個項目都有多個依賴項。 我們使用JFrog人工制品來托管我們的aar文件。 這是代碼:
庫A:
compile "com.google.firebase:firebase-crash:$googlePlayServices"
compile "com.google.firebase:firebase-core:$googlePlayServices"
compile "com.squareup.retrofit2:retrofit:$retrofit"
以下無效。 我也曾嘗試刪除“ @aar”,但還是沒有。 主要項目:
compile ('com.sample.librarya:librarya:0.0.1@aar'){
transitive = true
}
因此,我必須再次向主應用程序添加改造依賴項。
我做了很多研究,讀了很多SO問題,但是這些問題都無濟於事。 我還具有在pom.xml
文件中列出的LibraryA的所有依賴項。
添加以下兩個依賴項:
compile ('com.sample.librarya:librarya:0.0.1@pom')
compile ('com.sample.librarya:librarya:0.0.1@aar')
第一個將下載pom並將其所有傳遞依賴項添加到classpath上。 第二個將下載aar。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.