Join GitHub today
ProGuard configuration for Kotlin 1.2 #402
We upgraded to Kotlin 1.2 but got warnings at compile time and crashes at runtime. This is a ProGuard config change makes the app working again.
Hesitant to submit a PR just yet because I didn't spend too much time to see if this is the minimum config to get it working with kotlin 1.2. The crashes were reported very late night so I just quickly made a hotfix.
Posted here in case someone else has this issue. Or someone is more familiar with the changes can shed some light on this. I might find some time tomorrow digging deeper into this.
The warnings were:
And the stacktrace for the crashes:
Finally got some time looking a little deeper into this.
The ProGuard warning actually wasn't coming from the usage of kotlin reflect in moshi kotlin, but rather kotlin reflect 1.2. We explicitly added kotlin reflect 1.2 because of the
So maybe a PR to update README on ProGuard configuration with kotlin reflect 1.2?
FWIW - I got a similar trace from running the lint driver in android tools from the CLI. Posted to lint-dev, maybe Tor can shed more light - https://groups.google.com/forum/#!topic/lint-dev/70j4pQ8uMuA
The minimum config is
which will keep only the no-arg constructor of the service defined in
referenced this issue
Aug 29, 2018
I might missed something, but there is no
and still, this results in various errors of missing