Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jar files not included in compiled aar on version 1.3.1+ #255

Open
kenshin171 opened this issue Dec 22, 2020 · 3 comments
Open

Jar files not included in compiled aar on version 1.3.1+ #255

kenshin171 opened this issue Dec 22, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@kenshin171
Copy link

kenshin171 commented Dec 22, 2020

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

@kenshin171 kenshin171 changed the title Jar files not included in compiled aar fomr version 1.3.1+ Jar files not included in compiled aar on version 1.3.1+ Dec 22, 2020
@kezong
Copy link
Owner

kezong commented Dec 22, 2020

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.

@kenshin171
Copy link
Author

kenshin171 commented Dec 22, 2020

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'
        }
}

Repository owner deleted a comment from valeriyo Dec 23, 2020
@mlsem
Copy link

mlsem commented Feb 24, 2021

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 ?

@kezong kezong added the bug Something isn't working label Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants