Okay. Finally worked out that the solution seems to be to use the
following format for the dependency entry:
compile group: 'com.mydomain', name: 'mylibrary', version:
'1.2.2-beta-1', type: 'aar'
On Tuesday, June 17, 2014 2:27:19 AM UTC+12, Paul LeBeau wrote:
>
> Hi all
>
> I have an Android library project and, up till now, I have been pushing
> jar files to the Maven Central repository. For the latest release I have
> pushed a .aar file as well for use by Android Studio users.
>
> However when I try to test the aar file in a project, it doesn't work.
> Android Studio only seems to be able to find the jar version.
>
> My apps build.gradle dependency clause looks like this:
>
> dependencies {
> compile 'com.android.support:appcompat-v7:19.+'
> compile 'com.mydomain:mylibrary:1.2.2-beta-1'
> }
>
> This loads the Jar file successfully. However I want it to use the aar
> file because it contains a custom View class and I need access to the
> resources.
>
> Is there a way to force it to fetch the aar artifact? I've tried the @aar
> trick:
>
> dependencies {
> compile 'com.android.support:appcompat-v7:19.+'
> compile 'com.mydomain:mylibrary:1.2.2-beta-1@aar'
> }
>
> But that doesn't work.
>
> I suppose, at a guess, that it is because my POM file is for the jar (?)
> Is there a way around this issue, or do I need to have a completely
> different artifact name for the aar version of my library?
>
> Paul
>
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" 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/d/optout.