Status Update
Comments
vi...@google.com <vi...@google.com>
ga...@google.com <ga...@google.com> #2
I have not seen any information about it so just asking here to avoid opening another issue. It also seems that when generating APK with alpha 8 the dex is no more compressed in the APK and stored as is. Leading to way bigger APKs.
While this is not an issue when distributing via Play Store, this could have impact for all the other distribution channels. Is this a normal wanted change and we'll have to deal with it? Or is there some new parameter to control this?
je...@google.com <je...@google.com>
je...@google.com <je...@google.com> #3
I can reproduce the originally reported issue of missing Baseline Profiles with AGP 8.0.0-alpha08.
To verify, check out the
je...@google.com <je...@google.com> #5
Created
[Deleted User] <[Deleted User]> #6
the location of the baseline profile has changed, it is now in dexopt folder instead of com.android.tools.build.profiles
please file a different bug for other issues so we can assign them correctly for each issue.
le...@gmail.com <le...@gmail.com> #7
There is no dexopt or any baseline profile related file in the generated aab. There is also nothing related to baseline profile in APK generated with AGP 8.0.
Can you please verify, keep the issue opened and provide a solution?
ca...@gmail.com <ca...@gmail.com> #8
As a side note I do use:
android.experimental.enableNewResourceShrinker.preciseShrinking=true
And
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:shrinkMode="strict" />
So maybe depending on when the baseline is packaged it's removed, but in all case it's not working currently so not really WAI.
je...@google.com <je...@google.com> #9
It's not working either for me. And I don't have android.experimental.enableNewResourceShrinker.preciseShrinking=true
and tools:shrinkMode='strict'
nc...@meta.com <nc...@meta.com> #10
Still happening with AGP 8.0.0-alpha09. Release build apk don't include baseline profile in assets/dexopt/
ga...@google.com <ga...@google.com>
xa...@google.com <xa...@google.com> #11
When they quickly close like that without checking on most part of the tracker anything written after is just plain ignored..
Need to reopen an issue, since no access to proper category hope again that triage put it in the proper place then hope that this time it's properly read.
If only all the parts could be like the R8/D8 part of this issue tracker.
ga...@google.com <ga...@google.com> #12
Scott, can you have a look if modifying an app according to
pe...@gmail.com <pe...@gmail.com> #13
I'm not able to reproduce.
Ben, the link to the repro project from
ro...@sentry.io <ro...@sentry.io> #14
Is there any logs I can provide from the build to help figure out?
nc...@meta.com <nc...@meta.com> #15
For the record also tested with A9 and there's the result on Windows.
Image is content of the aab (res and BUNDLE-METADATA)
And the result of a search on all the app folder including all the build dirs after the build
PS D:\_Gradle\Symfonik> Get-Childitem -Include *baseline* -Recurse
Directory: D:\_Gradle\Symfonik\app\src\main
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 29/11/2022 10:58 2114655 baseline-prof.txt
Directory: D:\_Gradle\Symfonik\benchmark\src\main\java\app\symfonik\benchmark
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 29/11/2022 10:48 baselineprofile
Directory: D:\_Gradle\Symfonik\benchmark\src\main\java\app\symfonik\benchmark\baselineprofile
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 29/11/2022 10:48 1231 BaselineProfileGenerator.kt
Reverting to A7 generates an aab that is 15k larger (the size of the baseline)
And the search after the build gives:
PS D:\_Gradle\Symfonik> Get-Childitem -Include *baseline* -Recurse
Directory: D:\_Gradle\Symfonik\app\build\intermediates\binary_art_profile\release
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 02/12/2022 20:17 14796 baseline.prof
Directory: D:\_Gradle\Symfonik\app\build\intermediates\binary_art_profile_metadata\release
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 02/12/2022 20:17 1805 baseline.profm
Directory: D:\_Gradle\Symfonik\app\build\intermediates\merged_art_profile\release
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 02/12/2022 20:12 2303810 baseline-prof.txt
Directory: D:\_Gradle\Symfonik\app\src\main
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 29/11/2022 10:58 2114655 baseline-prof.txt
Directory: D:\_Gradle\Symfonik\benchmark\src\main\java\app\symfonik\benchmark
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 29/11/2022 10:48 baselineprofile
Directory: D:\_Gradle\Symfonik\benchmark\src\main\java\app\symfonik\benchmark\baselineprofile
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 29/11/2022 10:48 1231 BaselineProfileGenerator.kt
So the files are properly generated in binary_art_profile
for A7 and completely missing in A8 / A9. This does not sound like a packaging issue (Same behavior without the options from #8) but more a missing generation step.
This is a full compose app, no jetifier, minsdk 28, no png generation, ultra optimized everywhere I can, so maybe the build step depends on a step that is missing now?
pe...@gmail.com <pe...@gmail.com> #16
Thanks. I'm able to repro now with the correct link
ha...@gmail.com <ha...@gmail.com> #17
It looks like this was caused by Change-Id: I68ab3a6f342327cfb4c5477f85941fa3a6434a81. When I revert that change, the issue goes away. Working on a fix...
nc...@meta.com <nc...@meta.com> #20
This will be fixed in AGP 8.0.0-beta02 (Change-Id: Icb1a29bcd0c60a8ee6228a5ee05e708624c319c0)
je...@google.com <je...@google.com> #21
Thanks a lot, just to be sure this was also tested with both options from #8?
nc...@meta.com <nc...@meta.com> #22
So updated to AGP 8.0 A10 and the profiles are back but still in com.android.tools.build.profiles
this contradicts #6 is this normal/expected will it change in a future 8.0 build?
pe...@gmail.com <pe...@gmail.com> #23
Re #22, please disregard #6... that only applies to APKs, not AABs.
ar...@gmail.com <ar...@gmail.com> #24
Is there an alpha that includes this fix?
je...@google.com <je...@google.com> #25
The fix will be in AGP 8.0.0-beta02 and AGP 8.1.0-alpha01
Description
> Android Public Tracker > App Development > Android Studio > Gradle > Android Gradle Plugin
but I don't have permission to do so.
## Expected Result
AGP Variant API works well between 7.4.0-beta05 and 7.4.0-rc01
## Observed Results
Bumping AGP from 7.4.0-beta05 to 7.4.0-rc01 results in a build failure with the following message:
```
> Task :example:mapDebugSourceSetPaths FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':example:mapDebugSourceSetPaths'.
> Querying the mapped value of map(provider(java.util.Set)) before task ':example:reproducerdebugTask' has completed is not supported
```
It seems like AGP is querying the value of the `@OutputDirectory` of the task I created `example:reproducerdebugTask`.
## Reproducer
You can find a small reproducer here:
Specifically this commit shows a working setup with AGP 7.4 beta5
-
Bumping to RC01 causes the failure:
-
I've also configured the CI so you have a clean environment where you can easily reproduce.
The command to reproduce upon cloning is `./gradlew :example:assembleDebug`.
## Further Context
This issue was noticed upstream on React Native here:
as we're using a similar pattern inside the React Native Gradle Plugin.