Okio 2.1.0 / Proguard issue
See original GitHub issueTook me a while to figure out what was the cause as the issue does not occurs on my CI but updating Okio from 2.0.0 to 2.1.0 cause proguard 6.0.3 on my windows dev machine to goes nuts.
I fear you won’t have any idea and I have no idea how to debug that but with Okio 2.1.0 + Moshi 1.7 (And 1.6) + Okhttp 3.11 + some basic okio code in kotlin in my code like
response.body()?.use { body ->
return ByteArrayOutputStream().run {
this.sink().buffer().use { it.writeAll(body.source()) }
toByteArray()?.also { close() }
}
}
Cause proguard to be stuck for infinite time at Optimizing (pass 1/5)… step. Gradle debug mode does not show any issue during that time, just the usual memory checks without any memory issues.
Reverting to 2.0.0 fix the issue.
R8 from AGP 3.2 have an issue I reported that was unfortunately not fixed in time, and R8 from 3.3a12 does compile but Moshi is no more working (was previously when I helped the Google team fixing the R8 issue) and I have not yet found (searched) the cause but maybe it’s tied. (Moshi generates {} instead of correct objects).
Edit: Tested 2.0.0 with R8 AGP 3.3a12 and same json issue so proguard issue not related to R8 issue that I’ll investigate later.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:33 (4 by maintainers)
For future readers: the issue was that we have a
buildSrc/build.gradle
file. I had to setimplementation "net.sf.proguard:proguard-base:6.1.0beta1"
inside of that file.For the others, confirmed as working with proguard 6.1 B1.
To test add in your buildscript