And what if there are 2 files uploaded to Maven Central: jar and aar?
I see that jar is picked by default. And to use aar package I have to 
specify packaging for a dependency.

On Tuesday, 4 February 2014 20:39:14 UTC+2, Xavier Ducrohet wrote:
>
> The Gradle developer I talked to told me this was the bug: 
> http://issues.gradle.org/browse/GRADLE-2984
>
>
> On Tue, Feb 4, 2014 at 8:43 AM, Traun Leyden <[email protected]<javascript:>
> > wrote:
>
>>
>> Are those artifacts in your local maven repo?
>>>
>>
>> Yep.
>>
>> Also it doesn't automatically follow transitive dependencies so you'd 
>>> need to do
>>>
>>>    compile 'com.stubworld.core:CorelibAndroid:1.0@aar' {
>>>       transitive = true
>>>    }
>>>
>>
>>  This worked, but I did have to make a minor syntax change first to wrap 
>> in parens:
>>
>>      compile('com.stubworld.core:CorelibAndroid:1.0@aar') {
>>         transitive = true
>>     }
>>  
>>
>>> This will be fixed in Gradle 1.11 and you won't need to add coreLibJava 
>>> manually or use @aar.
>>>
>>
>> Ok cool.  Do you happen to have a link to an issue so I can track it? 
>>
>>  
>>> On Mon, Feb 3, 2014 at 7:15 PM, Traun Leyden <[email protected]>wrote:
>>>
>>>>
>>>> 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.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Xavier Ducrohet
>>> Android SDK Tech Lead
>>> Google Inc.
>>> http://developer.android.com | http://tools.android.com
>>>
>>> Please do not send me questions directly. Thanks! 
>>>
>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "adt-dev" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/adt-dev/Ll2JcCfgBsQ/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> [email protected].
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>  -- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
> http://developer.android.com | http://tools.android.com
>
> Please do not send me questions directly. Thanks! 
>

-- 
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.

Reply via email to