From 48b12f99c4a8d1df4537783c09550f4c3b930ee9 Mon Sep 17 00:00:00 2001 From: James Fenn Date: Fri, 26 Jun 2020 09:59:45 -0400 Subject: [PATCH] tentative solution for #5 ??? --- README.md | 2 +- example-android/build.gradle | 4 ---- gitrest/build.gradle | 7 +++++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7c535a2..7f609c1 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 dc99ac8..07ac79d 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 2081565..cec2b84 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 { -- GitLab