What are .kotlin_builtins files and can I omit them from my uberjars?

后端 未结 2 1402
野趣味
野趣味 2020-12-31 10:17

I\'m working on integrating proguard to my gradle build for an application written in Kotlin. I\'m finding that proguard is stripping out the Kotlin standard library (as it

2条回答
  •  生来不讨喜
    2020-12-31 11:04

    You can optimize/omit these from yours JARs/APKs:

    packagingOptions {
      exclude "/META-INF/*.kotlin_module"
      exclude "**/kotlin/**"
    }
    

    Even better:

    packagingOptions {
      exclude "/META-INF/*.kotlin_module"
      exclude "**/kotlin/**"
      exclude "**/*.txt"
      exclude "**/*.xml"
      exclude "**/*.properties"
    }
    

    Source: https://github.com/jaredsburrows/android-gif-example/blob/master/build.gradle.kts#L127

提交回复
热议问题