Project Setup:
Dagger: 2.13 (no change)
Kotlin: 1.6.10 → 1.9.23
AGP (Android Gradle Plugin): 7.0.4 → 8.2.2
Kotlin DSL: 2.3.3 → 4.3.0
compileSDK: 33 → 34
Gradle: 7.0.2 → 8.2
Issue:
After updating my project to the versions listed above, I’m encountering the following error during the build process:
A failure occurred while executing com.android.build.gradle.tasks.TransformClassesWithAsmTask$TransformClassesFullAction /Users/abc/AndroidStudioProjects/FApp/app/build/intermediates/incremental/transformProductionReleaseClassesWithAsm/com.def.android.frapp.ui.abcd_efgh.platform.DaggerComponent$XyzComponentImpl$AbcComponentImpl$DefComponentImpl$GhiComponentImpl$JklComponentImpl$MnoComponentImpl.json (File name too long)
Context:
I referred to this thread, which mentions that a similar issue was fixed in Dagger 2.11. However, I am still facing this problem.
Please note that updating to the latest versions of Dagger and other libraries is not an immediate option for me, as it will break existing changes. I plan to address that separately.
What I’ve Tried: I’ve added the following configurations to my gradle.properties, but the issue persists:
org.gradle.parallel=true org.gradle.jvmargs=-Xmx8192M -XX:MaxMetaspaceSize=4096m org.gradle.daemon=true org.gradle.caching=true #org.gradle.configuration-cache=true android.useAndroidX=true android.enableJetifier=true #android.useFullClasspathForDexingTransform=false android.jetifier.ignorelist=cucumber-java-7.15.0.jar android.enableR8.fullMode=false android.nonFinalResIds=false android.useRelativePathsInTestFixtures=true android.useShortestPathForClassFile=true
Expected Behavior: I was expecting the build to complete successfully without the “File name too long” error.
**Question:**Is there a way to fix this issue while keeping my current Dagger version (2.13) and avoiding breaking changes? Any insights or workarounds would be greatly appreciated.