Status Update
Comments
rk...@google.com <rk...@google.com>
je...@google.com <je...@google.com> #2
Alex, can you have a look, that's an interesting one.
obviously, in theory, it would be the responsibility of the transform implementation to merge or discard unwanted duplicates but I am not sure we can merge all the duplicates successfully nor can the application code can be functional if we discard duplicates (like removing module-info.class for instance).
je...@google.com <je...@google.com> #3
Alex, can you have a look ?
al...@google.com <al...@google.com>
al...@google.com <al...@google.com> #4
Recipe shows how to send all classes to one task to transform it somehow. Internally it's just search for one sample class to do some code manipulation and copy rest to single output jar to same folders/packages. In case you adjusted recipe to have many jar files, it means you have a lot of jar files with manifests in them. Copying them to single output jar causing problem. We deliberately support input of many jars/classes and task's logic should have some merge mechanism (not toTransform). To make it clear, I will add warning to toTransform javadoc and some merging logic to the recipe to handle this situation
al...@google.com <al...@google.com>
an...@google.com <an...@google.com> #5
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Iguana | 2023.2.1 Canary 15
- Android Gradle Plugin 8.3.0-alpha15
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
I am preparing to transform class by using new AGP api.
use Artifacts.forScope and toTransform Api.
error:
STEPS TO REPRODUCE:
clone the project:https://github.com/android/gradle-recipes/tree/agp-7.4/Kotlin/modifyProjectClasses
modify build.gradle.kts file from Scope.PROJECT to ALL:
Studio Build: Build #AI-221.6008.13.2211.9237616, built on November 1, 2022
Version of Gradle Plugin: 7.4.0-beta5
Version of Gradle: gradle-7.5.1
Version of Java: 11.0.15+0-b2043.56-8887301 aarch64
OS: macOS 12.3.1 (21E258)