简体   繁体   中英

How to create kotlin android sdk with jitpac?

Jitpac compiles my android sdk to Java from Kotlin. How to save sdk classes in Kotlin?

my jitpac.yml

jdk:
  - openjdk11
before_install:
  - ./scripts/prepareJitpackEnvironment.sh

It happens only with minifyEnabled true

Minification isn't meant to be done on a library level, it's the app's responsibility. So setting minifyEnabled to false is the solution.

When an app has minifyEnabled true , and it includes your library, your library's code will also be obfuscated. See the official documentation :

Code shrinking (or tree-shaking): detects and safely removes unused classes, fields, methods, and attributes from your app and its library dependencies .

Resource shrinking: removes unused resources from your packaged app, including unused resources in your app's library dependencies .

(emphasis added)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM