fat-aar-android
fat-aar-android copied to clipboard
Not compatible with Kotlin Multiplatform projects
I have a Kotlin Multiplatform library project, with targets for Android and iOS. I have 2 issues with the plugin:
- The
embedconfiguration cannot be used within thekotlinblock, by adding a dependency to a source sets compilation. I have to add adependenciesblock to myandroidblock to use embed. - More importantly, when adding
embeddependencies, 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
@wongk have you found any workaround for this? The "Cannot change attributes of configuration" error.
@natario1 the workaround I am using is to use maven instead :P
It works fine if I apply this plugin in afterEvaluate { }. Still it should be a very simple thing to fix.
@natario1 can you please share the code snippet how you have resolved it.
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.
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 [email protected] 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 .
--
I found a simple way to fix the multiplatform plugin compatibility, you can check the code in #427