Status Update
Comments
xi...@google.com <xi...@google.com>
ss...@gmail.com <ss...@gmail.com> #2
Thank you for the report and the code causing the issue. I have landed a reproduction which shows that the code thrown an ArrayIndexOutOfBoundsException
from the last bitSet.toByteArray()[0]
when not processed by R8.
ss...@gmail.com <ss...@gmail.com> #3
Project: r8
Branch: main
Author: Søren Gjesse <
Link:
Add reproduction of
Expand for full commit details
Add reproduction of issue 391417819
Bug: b/391417819
Change-Id: I37eb909c100104fadeb895bf5d930f4f54e94ba0
Files:
- A
src/test/java/com/android/tools/r8/B391417819Repro.java
Hash: bf9b1962052bf91689120a09deded518e37862a2
Date: Wed Jan 22 09:41:15 2025
ss...@gmail.com <ss...@gmail.com> #4
ss...@gmail.com <ss...@gmail.com> #5
I'm really sorry, please use the source code below:
public class R8Test {
public byte[] toBytes(boolean on) {
byte[] bytes = new byte[3];
bytes[0] = 1;
BitSet bits = new BitSet(8);
byte[] byteArray = bits.toByteArray();
if (byteArray != null && byteArray.length >= 1) {
bytes[1] = bits.toByteArray()[0];
}
BitSet bitSet = new BitSet(8);
byte[] byteArray2 = bits.toByteArray();
if (byteArray2 != null && byteArray2.length >= 1) {
bytes[2] = bitSet.toByteArray()[0];
}
return bytes;
}
}
je...@google.com <je...@google.com>
mi...@google.com <mi...@google.com> #6
Thank you for the update. Most likely the initial source code will still be sufficient to fix the issue.
an...@google.com <an...@google.com> #7
Project: r8
Branch: main
Author: Christoffer Adamsen <
Link:
Minimize reproduction for
Expand for full commit details
Minimize reproduction for b/391417819
Bug: b/391417819
Change-Id: I65a9c2427b41f2075305c1383f9dd44c0f580433
Files:
- M
src/test/java/com/android/tools/r8/B391417819Repro.java
Hash: 8f4ead7ecfe729c0811264de5545f9f104705d0d
Date: Wed Jan 22 12:39:38 2025
Description
We are building a App Bundle and want
lintVitalRelease
to be executed during the build process. The task runs during APK builds with theassembleRelease
task, but it doesn’t run during app bundle builds.For me,
assembleRelease
and bundleRelease are essentially about the same thing – building a complete product ready for publishing in Google Play. Therefore, we’d like the lint to run during bundle builds just as it does during APK builds.STEPS TO REPRODUCE:
./gradlew :app:bundleProdRelease
inVersion of Gradle Plugin: 8.7.1 Version of Gradle: 8.10.2