grab / grab/app-sizer

Local .aar is not supported

Open
#25 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
210
Forks
12
Avg merge
1m
Merged PRs (30d)
1

Description

Hi,

We have a lib module to add a local `.aar` file as a dependency, the build.gradle looks like this:
```
configurations.maybeCreate('default')
artifacts.add('default', file('your_aar_name.aar'))
```

When i ran the analysis, It threw an error `my libs not supported`, seems because it does not match any [variant](https://github.com/grab/app-sizer/blob/40e0ced9ce5489173238f4dc55392ac7e0e465c7/sizer-gradle-plugin/src/main/kotlin/com/grab/plugin/sizer/dependencies/VariantExtractor.kt#L127).

I tried to change the approach by including the .aar directly on the app module, and depends it using this way:
`implementation fileTree(dir: 'libs', include: ['*.aar'])`.

Unfortunately I got another error:
```
task: bundleGeneralDebugAar
> Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR.
```

Any workaround for it?

Thank you.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.