kezong / fat-aar-android

A gradle plugin that merge dependencies into the final aar file works with AGP 3.+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jar files not included in compiled aar on version 1.3.1+

kenshin171 opened this issue · comments

Describe the issue
A clear and detailed description of what the issue is.

Build Environment

  • Operating System: MacOs Big Sur 11.1
  • Gradle Plugin Version: 4.1.1]
  • Gradle Version: 6.7.1
  • Fat-aar Version: 1.3.1, 1.3.3

Versions 1.3.1 and 1.3.3 seems to miss out bundling of the jar files into the aar.

I reverted to 1.2.19, and I can see the libs folder with my jar files inside the aar when I build the aar.

Version 1.2.19
image

Version 1.3.1 & 1.3.3
image

Is it set configurations.embed.transitive = true
change to:

fataar {
    /**
     * If transitive is true, local jar module and remote library's dependencies will be embed.
     * If transitive is false, just embed first level dependency
     * Local aar project does not support transitive, always embed first level
     * Default value is false
     * @since 1.3.0
     */
    transitive = true
}

The 1.3.+ version is not compatible configurations.embed.transitive.
It would be fixed in the next release.

I did not have this config at all.
Adding this makes no difference to the generated aar.
My jar files are still not bundled inside.

this is how i am including the jar files, in my app folders build.grade

  embed(name:'bcprov-jdk15on-167-shaded', ext:'jar')
  embed(name:'bcpkix-jdk15on-167-shaded', ext:'jar')

in my project's build.gradle i have

repositories {
.... omitted......
 flatDir {
            dirs 'libs'
        }
}
commented

Could you please show us an example on how to use

fataar {
    /**
     * If transitive is true, local jar module and remote library's dependencies will be embed.
     * If transitive is false, just embed first level dependency
     * Local aar project does not support transitive, always embed first level
     * Default value is false
     * @since 1.3.0
     */
    transitive = true
}

it seems not working for me, i am putting this code in

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    fataar{
         transitive = true
    }.....

is this the right way to use it ?