Status Update
Comments
da...@google.com <da...@google.com> #3
(reposting under work account)
We have been hitting this issue constantly. Is it possible to configure those tasks to be non cacheable as a workaround or is that only possible inside of AGP?
sp...@google.com <sp...@google.com> #4
Currently the only way to disable caching for dexing transforms is to patch AGP manually by providing a patched DexTransform.kt
file in buildSrc
. Please see
da...@google.com <da...@google.com> #5
Thanks. Ignoring potential build perf impacts, if we essentially commented out the processIncrementally
block in DexingTransform.kt
and always ran non-incrementally, would that workaround this issue?
sp...@google.com <sp...@google.com> #6
Yes, always run the dex transform non-incrementally is another workaround.
sp...@google.com <sp...@google.com> #7
sp...@google.com <sp...@google.com> #8
I guess so, could you give it a try?
sp...@google.com <sp...@google.com> #9
Anyway, what about issue, I've tried a lot of attempts to fix and helped only turn off jacoco transformation `useJacocoTransformInstrumentation = false`.
What was changed in agp 7.4.x from 7.3.1 that break this?
an...@google.com <an...@google.com> #10
Are you referring to
(Regarding What was changed in agp 7.4.x from 7.3.1 that break this?
: I don't know, my theory is that some of your code has changed too when updating AGP, which exposed the Jacoco bug. Please post your comments in that issue if you'd like to continue discussing this.)
an...@google.com <an...@google.com> #11
Edit: we were actually not applying the patch correctly, so this was user error.
We've been running with a patched version of DexingTransformer.kt for about a week but are still seeing the issue. First I tried commenting out @CacheableTransform
on DexingNoClasspathTransform
, but after devs were still experiencing the error, I tried reverting that change and instead applying what I'd suggested in
Is there any other workaround or additional information I can provide to help debug? At first I thought it's perhaps the patched version of DexingTransformer.kt
wasn't being picked up, but I confirmed that it was by throwing an exception inside of doTransform
.
Description
I want to add a new asset directory to the Android instrumentation tests via the Variant API, but it is not working as the DSL API. I have attached a sample project that reproduces the issue.
In the
build.gradle.kts
I have:but when I run my test that validates that the asset file is present, it fails:
I can also see the APK is missing the files:
if I comment out the Variant APIs lines above and instead use the 'older' DSL:
then things work as expected:
and the APK also contains the expected asset files:
Let me know if you need any more information.