kezong / fat-aar-android

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

Not compatible with Kotlin Multiplatform projects #114

Open wongk opened 4 years ago

wongk commented 4 years ago

I have a Kotlin Multiplatform library project, with targets for Android and iOS. I have 2 issues with the plugin:

  1. The embed configuration cannot be used within the kotlin block, by adding a dependency to a source sets compilation. I have to add a dependencies block to my android block to use embed.
  2. More importantly, when adding embed dependencies, I get the following gradle errors:

Failed to notify project evaluation listener. Cannot change attributes of configuration ':iosApiElements' after it has been resolved Cannot change attributes of configuration ':iosArm64ApiElements' after it has been resolved

natario1 commented 4 years ago

@wongk have you found any workaround for this? The "Cannot change attributes of configuration" error.

wongk commented 4 years ago

@natario1 the workaround I am using is to use maven instead :P

natario1 commented 4 years ago

It works fine if I apply this plugin in afterEvaluate { }. Still it should be a very simple thing to fix.

hathorr-hub commented 3 years ago

@natario1 can you please share the code snippet how you have resolved it.

natario1 commented 3 years ago

I ended up writing my own fat AAR plugin - https://github.com/deepmedia/Grease because I was having many issues with this one. Not sure if it fits your needs, but you can try it out.

hathorr-hub commented 3 years ago

Hello Mattia, Thanks for the email. I have applied your plugins. I have one more question regarding that. I have a aar which is locally added into the project as a module dependency. I am trying to add that as greaseRelease("trasformer-release") but I am getting error

A problem occurred evaluating project ':FAT-AAR-Generator'.

Supplied String module notation 'transformer-release' is invalid. Example notations: 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:javadoc'.

Not able to get how to resolve this issue. Your help is much appreciated.

On Mon, Feb 8, 2021 at 8:11 PM Mattia Iavarone notifications@github.com wrote:

I ended up writing my own fat AAR plugin - https://github.com/deepmedia/Grease because I was having many issues with this one. Not sure if it fits your needs, but you can try it out.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kezong/fat-aar-android/issues/114#issuecomment-775196643, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB67APRWM5R433MEEVSIU2LS57Z2DANCNFSM4KHXQIWA .

--