Status Update
Comments
l3...@gmail.com <l3...@gmail.com> #2 Restricted+
aa...@google.com <aa...@google.com>
je...@google.com <je...@google.com>
sp...@google.com <sp...@google.com>
sp...@google.com <sp...@google.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
sp...@google.com <sp...@google.com> #4
ws...@gmail.com <ws...@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;
}
}
sp...@google.com <sp...@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
wa...@gmail.com <wa...@gmail.com> #8
Project: r8
Branch: main
Author: Christoffer Adamsen <
Link:
Extend ArrayConstructionSimplifier dominance checks
Expand for full commit details
Extend ArrayConstructionSimplifier dominance checks
Fixes: b/391417819
Change-Id: Id31f2463d9255415d33ce43bcafd9e794c550a49
Files:
- M
src/main/java/com/android/tools/r8/ir/conversion/passes/ArrayConstructionSimplifier.java
- M
src/test/java/com/android/tools/r8/B391417819Repro.java
Hash: 99e24d1d45d9812d3b4d005690afdcedab1a15bd
Date: Wed Jan 22 13:06:35 2025
sp...@google.com <sp...@google.com> #9
Project: r8
Branch: 8.7
Author: Christoffer Adamsen <
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: 3353b45090549cf6d57d6cf0a65b8b5959a705b1
Date: Thu Jan 23 08:33:20 2025
Description
DESCRIBE THE ISSUE IN DETAIL:
We are trying to write a gradle plugin that supports Android. We'd like to create one gradle dependency configuration per sourceset, and then have a resolvable configuration (and gradle tasks) per variant. To do this, we need to know which android sourceSets are used by each variant.
In the old AGP APIs, we could use
variant.sourceSets
, and then use the sourceSet names to find the corresponding dependency configurations.In the new AGP APIs, the source set names are not exposed from variants, so it's hard to determine which configurations should used by each variant. We have to hardcode some naming convention and determine the 'hierarchy' of configurations ourselves.
For example, our gradle plugin might define dependency configurations like
pluginDeps
(the 'main' sourceset),debugPluginDeps
,androidTestPluginDeps
,androidTestDebugPluginDeps
, ... for our users. Then, we would define tasks per variant / testVariant, so fordebug
we might have:myDebugTask
which uses dependencies frompluginDeps
anddebugPluginDeps
(of course, not directly but through a resolvable configuration)myAndroidTestDebugTask
which uses all ofpluginDeps
,debugPluginDeps
,androidTestPluginDeps
,androidTestDebugPluginDeps
, etc.We'd rather be able to use the existing logic in AGP, than have to hardcode all those rules of how configurations are named and used by variants.