Status Update
Comments
jg...@google.com <jg...@google.com>
je...@google.com <je...@google.com> #2
Amr, can this be safely cp in 7.1.x ?
am...@google.com <am...@google.com> #3
Yes it should be safe, I'll create the cherry-pick.
For the dynamic asm version, we try to enforce an ASM version for the transform API based on the dependency that we have on ASM, which is based on the language level we support. If there is a usecase to change the asm version to a value higher than what we support, we might include an override value that in the DSL. Let me know if there is a need for it beyond just working around the multi-release jars issue.
ro...@sentry.io <ro...@sentry.io> #4
I think it would be good to have this option, even just for the sake of multi-release jars. If there's new java and ASM versions in the future, due to release cadence of AGP this issue will pop up again, if there's a MR-JAR with an unsupported java version.
am...@google.com <am...@google.com> #5
This has been fixed in 7.1 branch now and is expected to land in AGP 7.1.1.
The multi-release jar issue has been fixed as starting 7.2, AGP will not offer the classes in META-INF
directories to the asm transform visitors. So there will be no need to handle processing them in the first place.
Description
I'm using the new ASM transform API and trying to work-around 206655905 , by forcing ASM version in the classpath to 8 or above, but it turns to be useless, because here it's always set to ASM7. I believe this should use the latest available version in the classpath, or, at least the same version that is set in the ComponentImpl . (ideally, the ComponentImpl should also resolve the ASM version dynamically based on the dependency in classpath).
P.S. I know the bug was fixed in AGP 7.2.0-alpha06, but is there a chance the fix can be backported to earlier versions, or is there another workaround? Otherwise, this makes the new ASM transform api practically unusable with the prior AGP versions, if there happen to be the Moshi dependency on the users' site.
Studio Build: N/A Version of Gradle Plugin: 7.0.4 Version of Gradle: N/A Version of Java: N/A OS: N/A