Status Update
Comments
ga...@google.com <ga...@google.com> #2
Using the attached project and running ./gradlew bundleLibRuntimeToDirRelease -s
fails with
Caused by: java.nio.file.DirectoryNotEmptyException: /home/gavra/AndroidStudioProjects/MyApplication75/mylibrary/build/intermediates/runtime_library_classes_dir/release/META-INF/proguard
at com.android.utils.FileUtils.copyFile(FileUtils.java:151)
at com.android.utils.FileUtils.copyFile(FileUtils.java:133)
at com.android.utils.FileUtils.copyFile(FileUtils.java:116)
at com.android.build.gradle.internal.tasks.BundleLibraryClassesWorkAction.copyFilesNonIncrementally(BundleLibraryClasses.kt:377)
This is caused by
libraryVariants.all {
it.registerPreJavacGeneratedBytecode(project.files("input1"))
it.registerPreJavacGeneratedBytecode(project.files("input2"))
}
where these dirs contain input1/META-INF/proguard/1.txt
and input2/META-INF/proguard/2.txt
.
ga...@google.com <ga...@google.com> #3
This will be fixed in the next versions of AGP 7.1 and 7.2.
Change: I848cd0ef3623dd3a55d53e9c7ac4e316ee276a6d
zs...@salesforce.com <zs...@salesforce.com> #4
If there's a 7.0.3, could it be CP'd into that?
ga...@google.com <ga...@google.com> #5
The fix will also be released with AGP 7.0.3, thanks for the report!
zs...@salesforce.com <zs...@salesforce.com> #6
sa...@google.com <sa...@google.com> #7
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 Bumblebee Canary 13 (2021.1.1.13)
- Android Gradle Plugin 7.1.0-alpha13
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!
ch...@gmail.com <ch...@gmail.com> #8
ga...@google.com <ga...@google.com> #9
The fix will also land in 7.0.3 which should be released soon. The update in #7 is just about the already released versions.
Description
DESCRIBE THE ISSUE IN DETAIL: Having multiple tasks/dirs contributing
META-INF/proguard
directories appears to breakBundleLibraryClassesInputs
STEPS TO REPRODUCE:
@JsonClass(generateAdapter = true)
for use withbundleLibRuntimeToDirRelease
task and observe this failureIn some testing with Ivan to print the
classes
property in adoFirst
blockthe
build/intermediates/runtime_library_classes_dir/release/META-INF/proguard
dir it's complaining about not being empty only contains the kapt-generated proguard files though, interestingly. This is also the case without KSP too (not empty)