Exclude kotlin_module files from kotlinx-metadata-jvm during shading.
Test: N/A
Change-Id: I42b2ccb75b9a622e686b0b67ceab0dcbfbfaa66b
diff --git a/room/room-compiler-processing/build.gradle b/room/room-compiler-processing/build.gradle
index f8d3190..07001c6 100644
--- a/room/room-compiler-processing/build.gradle
+++ b/room/room-compiler-processing/build.gradle
@@ -40,6 +40,11 @@
configurations = [project.configurations.shadowed]
relocate("kotlinx.metadata", "androidx.room.jarjarred.kotlinx.metadata")
mergeServiceFiles() // kotlinx-metadata-jvm has a service descriptor that needs transformation
+ // Exclude Kotlin metadata files from kotlinx-metadata-jvm
+ exclude 'META-INF/kotlinx-metadata-jvm.kotlin_module'
+ exclude 'META-INF/kotlinx-metadata.kotlin_module'
+ exclude 'META-INF/metadata.jvm.kotlin_module'
+ exclude 'META-INF/metadata.kotlin_module'
}
jar {