Hi Vitaliy,
You don't need to custom "provided" configurations in the 0.9 plugin, just
add this to your build.gradle:
*android.libraryVariants.all { variant ->*
* variant.packageLibrary.exclude( 'libs/somejars.jar' )*
*}*
Enjoy!
Best regards,
Richard Lee
On Monday, March 24, 2014 3:42:35 AM UTC-7, Vitaliy Istomov wrote:
>
> Hi guys,
>
> I am using gradle 1.11 and "android-library" plugin 0.9.0 and experiencing
> the same issue with packaging "provided files('libs/<libname>.jar')"
> entries to the .aar library: there "provided" jar files are in the
> resulting aar library.
>
> I would really appreciate the fix for this or a temporary workaround (I
> have not succeeded in finding one so far). Thanks in advance!
>
> -Vitaliy
>
> On Friday, February 28, 2014 5:55:41 PM UTC+1, Xavier Ducrohet wrote:
>>
>> This obviously should not be the case. I'll double check.
>>
>>
>> On Fri, Feb 28, 2014 at 4:04 AM, Olexandr Tereshchuk <[email protected]>wrote:
>>
>>> same for me - provided dependencies do not packaged into jar but do
>>> packaged into aar and apk
>>>
>>> Пʼятниця, 14 лютого 2014 р. 06:54:04 UTC+2 користувач Вадим П написав:
>>>
>>>> Do anybody have successful example of using "provided" with
>>>> android-library?
>>>> In my case provided files('somejar1.jar', 'somejar2.jar') and compile
>>>> files('somejar1.jar', 'somejar2.jar') are generating equal APKs
>>>>
>>>> среда, 29 января 2014 г., 20:15:01 UTC+6 пользователь Daniel Lew
>>>> написал:
>>>>>
>>>>> Hah, I'm dumb. I should've read those release notes closer. Thanks
>>>>> so much!
>>>>>
>>>>> -Daniel
>>>>>
>>>>>
>>>>> On Tue, Jan 28, 2014 at 5:47 PM, Xavier Ducrohet <[email protected]>wrote:
>>>>>
>>>>>> With Gradle 0.8 there's a new provided scope that allows you to add
>>>>>> compile-only dependencies (ie they don't get packaged in the apk).
>>>>>>
>>>>>>
>>>>>> On Tue, Jan 28, 2014 at 1:04 PM, Daniel Lew <[email protected]>wrote:
>>>>>>
>>>>>>> I wanted to revive this thread because I'm running into the same
>>>>>>> issues here. In the same way that android.jar is not included in APKs,
>>>>>>> there's some Amazon jars that are not included either.
>>>>>>>
>>>>>>> It's okay to have this workaround but it makes working in AS
>>>>>>> somewhat of a pain. I'm curious if there's ever going to be plans to
>>>>>>> improve support for this, or if we should try out Scott's suggestion of
>>>>>>> removing JARs postDex or something...
>>>>>>>
>>>>>>> -Daniel
>>>>>>>
>>>>>>>
>>>>>>> On Friday, January 3, 2014 2:37:24 PM UTC-5, Scott Culverhouse wrote:
>>>>>>>>
>>>>>>>> Thanks for the reply Xavier.
>>>>>>>>
>>>>>>>> Ok looking from another angle within the Java/Android plugin gradle
>>>>>>>> plugins is it possible to remove classes from the final dex?
>>>>>>>>
>>>>>>>> Or would I be best add a postDex task which removes them somehow or
>>>>>>>> a postPackage which baksmali/smali/rezips apk?
>>>>>>>>
>>>>>>>> On Friday, 3 January 2014 19:06:02 UTC, Xavier Ducrohet wrote:
>>>>>>>>>
>>>>>>>>> This is normal as the dependencies given to the IDE are built from
>>>>>>>>> the actual dependency graph.
>>>>>>>>>
>>>>>>>>> you are manually editing the classpath of the compile task which
>>>>>>>>> bypasses the model. There's no API to add extra dependencies to the
>>>>>>>>> model
>>>>>>>>> when you do this.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Jan 3, 2014 at 10:27 AM, Scott Culverhouse <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> It transpires I was using 0.7.3 (ie 0.7.+), I've forced it to
>>>>>>>>>> 0.7.3 and the same result in AS (Android Studio 0.4.0).
>>>>>>>>>>
>>>>>>>>>> BTW it compiles OK within AS it's just the code completion and
>>>>>>>>>> error highlighting.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Friday, 3 January 2014 18:11:47 UTC, Michael Barany wrote:
>>>>>>>>>>>
>>>>>>>>>>> Try plugin 0.7.3, there was a bug in 0.7.2 that limited it to
>>>>>>>>>>> Java 1.6
>>>>>>>>>>>
>>>>>>>>>>> On Friday, January 3, 2014 5:48:21 AM UTC-5, Scott Culverhouse
>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> The below works with the latest buildtools (19.0.1) and gradle
>>>>>>>>>>>> plugin (0.7.2) in terminal however in AS it shows "Cannot resolve
>>>>>>>>>>>> symbol"
>>>>>>>>>>>> for the jar which is "provided".
>>>>>>>>>>>>
>>>>>>>>>>>> Any ideas on how to exclude the certain classes from the dex.
>>>>>>>>>>>> This is for the xposed framework where the jar is already on the
>>>>>>>>>>>> device.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Friday, 16 August 2013 18:51:10 UTC+1, Andy Lo A Foe wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> I just ran into the same issue where I needed to exclude the
>>>>>>>>>>>>> jar for a a device provided implementation (uses-library). The
>>>>>>>>>>>>> following
>>>>>>>>>>>>> gradle config snippet worked for me:
>>>>>>>>>>>>>
>>>>>>>>>>>>> configurations {
>>>>>>>>>>>>> provided
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> android.applicationVariants.all {
>>>>>>>>>>>>> variant -> variant.javaCompile.classpath +=
>>>>>>>>>>>>> configurations.provided
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> dependencies {
>>>>>>>>>>>>> provided files('libs/samsung_ble_sdk_200.jar')
>>>>>>>>>>>>> }
>>>>>>>>>>>>>
>>>>>>>>>>>>> Last comment in https://code.google.com/p/andr
>>>>>>>>>>>>> oid/issues/detail?id=55764 helped i.e. use ".all" instead of
>>>>>>>>>>>>> ".each" for latest gradle release.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>> Andy
>>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>> 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 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/WIjtHjgoGwA/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].
>>> 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/d/optout.