diff --git a/README.md b/README.md index 7c535a29849d0652fa12075a1ca54c3205852ec6..7f609c16c814e6433e7b19d94aa31983d65f6501 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ implementation "dev.horrific.code.james.git-rest-wrapper:gitrest:$gitrest_versio #### Note: fixing duplicate META-INF files -Kotlin Multiplatform has a weird issue with dependency management that I haven't quite worked out. Hopefully there'll be a better solution to this in the future, but for now it's enough to just add the following to your Android modules: +Kotlin Multiplatform has a weird issue with dependency management that I haven't quite worked out; (#5)[https://code.horrific.dev/james/git-rest-wrapper/issues/5] documents some of my encounters with it. Hopefully you won't encounter this problem at all, but if you do, it should be enough to just add the following to your Android modules: ```groovy android { diff --git a/example-android/build.gradle b/example-android/build.gradle index dc99ac8a29ac1992da37440a6cb67228aead8009..07ac79d142070ae2c9a748bb55e6985e138d5140 100644 --- a/example-android/build.gradle +++ b/example-android/build.gradle @@ -21,10 +21,6 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } - - packagingOptions { - merge 'META-INF/*.kotlin_module' - } } repositories { diff --git a/gitrest/build.gradle b/gitrest/build.gradle index 20815650ff05b0438f3ef93833f18c386123978b..cec2b842c8a7a3883721d912ac2a5e4b0cd25f04 100644 --- a/gitrest/build.gradle +++ b/gitrest/build.gradle @@ -20,6 +20,13 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' + + configurations.all { + resolutionStrategy { + // excluding "-common" dependencies from Android to prevent duplicate META-INF bugs + exclude group: "org.jetbrains.kotlinx", module: "kotlinx-serialization-runtime-common" + } + } } sourceSets {