adwiv / android-fat-aar

Gradle script that allows you to merge and embed dependencies in generted aar file
The Unlicense
1.46k stars 435 forks source link

Missing classes.jar #2

Closed ikabar closed 9 years ago

ikabar commented 9 years ago

HI,

First of all I would like to say this is a great project. So thank you.

I tried to use your project to solve the problem of creating an AAR that depends on two other AAR that will be a standalone (fatAAR).

At first I used the fat-aar.gradle as is but I noticed you are only copying the jar's and not the classes of the actual AAR.

I ended up adding them my self jars += fileTree(dir: "$aarPath", include: ['*.jar']);

That did the trick for me.

I'm trying to understand how did the solution worked for you without this line?

Thanks again.

Ika.

adwiv commented 9 years ago

Hi Ika,

I checked the aar file format spec and you are correct. The aar spec says that the classes.jar would be at root folder.

However at least for me, the android studio does some rearrangement when it explods the aar folder into the build directory. It moves the classes.jar to jars/classes.jar and any other libraries to jars/libs folder.

Are you using android studio? Are you embedding an unzipped aar file or is it downloaded automatically?

Anyway, I would anyway add the support for the /classes.jar and /libs/*.jar in case someone tries with unzipped aar.

Cheers, Adwiv

ikabar commented 9 years ago

Great, thanks.

adwiv commented 9 years ago

Fixed in 011cbf2706efc4a7b8e4c6af5e13b085b1aa38b4