kezong / fat-aar-android

A gradle plugin that merge dependencies into the final aar file works with AGP 3.+
MIT License
3.13k stars 621 forks source link

Release latest changes to Maven Central #348

Closed GabrielBottari closed 2 years ago

GabrielBottari commented 2 years ago

New changes we're recently made to support the library with Gradle version 7.0.2+. It is currently not available on the latest release, as it dates back a few months. Can we have a new version released on Maven Central? @kezong

Thank you!

Judas commented 2 years ago

I'd be glad to get an ETA on this too.

kezong commented 2 years ago

Have you solved the problems you encountered by updating the latest plugin source locally? I hope you can help check it.

DDeg commented 2 years ago

I use plugin built from PR#341 on pretty large project. Works fine on AGP 7.0.3 + Gradle 7.2 for a while now, aar and jar includes correctly.

Judas commented 2 years ago

After testing with the latest version on master branch it seems there is still an issue. External dependencies are embedded correctly, but the ones from submodules projects using embed(project(":submodule")) are not embedded in the final aar.

Tested with AGP 7.0.3 and Gradle 7.2

GabrielBottari commented 2 years ago

After testing with the latest version on master branch it seems there is still an issue. External dependencies are embedded correctly, but the ones from submodules projects using embed(project(":submodule")) are not embedded in the final aar.

Tested with AGP 7.0.3 and Gradle 7.2

That is indeed the issue I was facing.. Submodules aren't being embedded properly

DDeg commented 2 years ago

@Judas @GabrielBottari can you share test project configuration where issue is reproducible? It works just fine on my project with many submodules included as embed dependencies.

Judas commented 2 years ago

Here is a simple project to reproduce. It's a library project embedding a sublibrary module. The library project has dev & prod flavors. If you run the ./gradlew clean assembleDevDebug you'll see that the sublibrary classes are not embedded in the library generated aar (using latest master plugin).

I'm still debugging with my local plugin, for now I am trying to find why FlavorArtifact.getBundleTask returns a null TaskProvider EmbedTest.zip

Judas commented 2 years ago

@DDeg Have you been able to test/reproduce the issue ? @kezong would you have some time to review the PR to check if the proposed workaround is relevant ?

GabrielBottari commented 2 years ago

For some reason, it seems to work for me right now for gradle 7.0.2 for the latest release 1.3.6. I'll keep testing and let you guys know if it breaks again.

Judas commented 2 years ago

@kezong with the PR about this issue now being merged, is there any release incoming? Or are there other Gradle 7 issues pending?

FDuhen commented 2 years ago

Bump, having the issue described here with Gradle 7.2 and AGP 7.1.0, a release would be appreciated

kezong commented 2 years ago

Released in version 1.3.7