How do I ship an Android Library (aar) with remote dependencies (gradle)?

前端 未结 2 892
慢半拍i
慢半拍i 2020-12-10 12:48

I am trying to build an aar file with gradle that has remote dependencies. An example build script is below. As you can see I have two dependencies. The problem I\'m having

2条回答
  •  感动是毒
    2020-12-10 12:51

    you can check this link:

    Transitive dependencies not resolved for aar library using gradle

    you have to create a POM file as follows:

    
    
      4.0.0
      com.sprezzat
      app
      1.0.0
      aar
      
        
          com.bugsense.trace
          bugsense
          3.6
          compile
        
       
    
    

    and deploy it on maven.

    After that, you can define it in your android application build.gradle config like this:

    compile ('com.somepackage:LIBRARY_NAME:1.0.0@aar'){
        transitive=true
    }
    

提交回复
热议问题