rook
08/19/2019, 2:57 PMisMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android.txt"),
"<http://proguard-rules.pro|proguard-rules.pro>")
signingConfig = signingConfigs.getByName(buildRelease)
on kotlin version 1.3.40+, the following line crashes:
onMapAcquired(Uri.parse(response.body()?.data?.url ?: ""))
with stacktrace:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: ~, PID: 28866
java.lang.NullPointerException: throw with null exception
at ~.data.network.responses.LastTripMapResponse$LastTripMapObject.getUrl(Unknown Source:3)
at ~.main.home.map.MapPresenter$retrieveMostRecentTripMap$1.accept(SourceFile:311)
at ~.main.home.map.MapPresenter$retrieveMostRecentTripMap$1.accept(SourceFile:45)
at io.reactivex.internal.observers.ConsumerSingleObserver.onSuccess(SourceFile:62)
at io.reactivex.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SourceFile:81)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(SourceFile:124)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
however, on kotlin 1.3.31, that line behaves as expected. I’m curious if there are changes to kotlin that require new proguard rules or a weird interaction with R8, or something like that, because this issue only exists when I have minify enabled. My debug build rules are basically identical sans proguarding.