kezong / fat-aar-android

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

How to exlcude "org.jetbrains.kotlin:kotlin-stdlib" #419

Open dyguests opened 6 months ago

dyguests commented 6 months ago

Describe the issue

I got a android project with kotlin.

I use fat-aar to export aars. Then I want dependency the aars for a other project(Unity -> Android), it failed:

log

   > Duplicate class kotlin.ArrayIntrinsicsKt found 
in 
modules Module_Plugin_Facebook-release-runtime (:Module_Plugin_Facebook-release:)  //my custom module
and 
kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0)

It seems that "org.jetbrains.kotlin:kotlin-stdlib:1.8.0" is not dependency by implementation xxx, bu it dependency by plugins{ id 'org.jetbrains.kotlin.android' }

So, How to exclude it?

Build Environment

dyguests commented 6 months ago

fixed: Don‘t use

fataar {
    transitive = true
}

Just embed manually.

dyguests commented 6 months ago

'embed manually' takes to much time, Is that possible to use transitive = true?