I have a library that is split into two maven artifacts: 'com.stubworld.core:CorelibJava:1.0' 'com.stubworld.core:CorelibAndroid:1.0'
The CorelibJava artifact is built by a build.gradle script<https://friendpaste.com/A2cSMvGKJdSlaPUVZ6nVW>that uses the java gradle plugin, and is pure java with no android dependencies. The maven artifact is a jar and here is the pom file<https://friendpaste.com/i0EBG4b0NJ5WEQK9pE6sF> . The CorelibAndroid artifact is built by a build.gradle script<https://friendpaste.com/i0EBG4b0NJ5WEQK9pMVNi>that uses the android-library gradle plugin, and depends on the CorelibJava maven artifact. The maven artifact is an aar and here is the pom file<https://friendpaste.com/A2cSMvGKJdSlaPUVZ6ojv> . I tried to use these libraries from an Android project which uses the 'android' gradle plugin, and after some tweaking I managed to get it to work with the following dependencies: dependencies { compile 'com.android.support:appcompat-v7:+' compile 'com.stubworld.core:CorelibJava:1.0' compile 'com.stubworld.core:CorelibAndroid:1.0@aar' } However, I wasn't really clear on a few things: * Why do I specifically need to reference the 'com.stubworld.core:CorelibJava:1.0' artifact? Shouldn't that be automatically resolved since it's an upstream dependency of the 'com.stubworld.core:CorelibAndroid:1.0@aar' artifact? * Why is the @aar qualifier needed on the 'com.stubworld.core:CorelibAndroid:1.0@aar' artifact? I have other projects that depend on .aar maven artifacts, and I never needed to add "@aar". Basically I expected the dependencies to look like this: dependencies { compile 'com.android.support:appcompat-v7:+' compile 'com.stubworld.core:CorelibAndroid:1.0' } and just want to make sure I'm doing things right. -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
