I have a library in the Maven Central repository. For the latest version, I added the .aar file in addition to the normal .jar.
However, I cannot force Android Studio to use the aar version of the library. In my build.gradle file, I have:
dependencies { compile 'com.android.support:appcompat-v7:19.+' compile 'com.mygroup:mylibrary:1.2.2' }
This successfully got the jar file, but how to get it to use the version of the aar library? I have tried several things, including (but not limited to):
compile 'com.mygroup:mylibrary: 1.2.2@aar ' compile group: 'com.mygroup', name: 'mylibrary', version: '1.2.2', type: 'aar' compile group: 'com.mygroup', name: 'mylibrary', version: '1.2.2', packaging: 'aar' compile group: 'com.mygroup', name: 'mylibrary', version: '1.2.2', extension: 'aar'
But he always loads the can.
Is Gradle expecting an artifact to contain only AAR (only with POM that matches)? Do I need to create a separate artifact for the AAR lib version?
source share