Status Update
Comments
yc...@gmail.com <yc...@gmail.com> #2
ze...@google.com <ze...@google.com>
ra...@google.com <ra...@google.com>
ma...@google.com <ma...@google.com> #3
yc...@gmail.com <yc...@gmail.com> #4
Branch: androidx-master-dev
commit 3ed3fb003fa6c1244f923202859a616225b5b2fa
Author: Ian Lake <ilake@google.com>
Date: Fri Feb 14 11:17:46 2020
Create an interface for layouts that can be opened
Create a common interface that represents layouts
that have two states: open and closed. This allows
higher level libraries to rely on the interface,
rather than concrete implementations such as
DrawerLayout, making them more resilient to
changes in the current recommended implementation.
Fixes: 129979320
Test: ./gradlew checkApi
Change-Id: I0f2a1414977825aa053c6555261f2b7d4417bd19
M customview/customview/api/1.1.0-alpha02.txt
M customview/customview/api/current.txt
M customview/customview/api/public_plus_experimental_1.1.0-alpha02.txt
M customview/customview/api/public_plus_experimental_current.txt
M customview/customview/api/restricted_1.1.0-alpha02.txt
M customview/customview/api/restricted_current.txt
A customview/customview/src/main/java/androidx/customview/widget/Openable.java
M drawerlayout/drawerlayout/api/1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/current.txt
M drawerlayout/drawerlayout/api/public_plus_experimental_1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/public_plus_experimental_current.txt
M drawerlayout/drawerlayout/api/restricted_1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/restricted_current.txt
M drawerlayout/drawerlayout/build.gradle
M drawerlayout/drawerlayout/src/main/java/androidx/drawerlayout/widget/DrawerLayout.java
M jetifier/jetifier/migration.config
M slidingpanelayout/slidingpanelayout/api/1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/current.txt
M slidingpanelayout/slidingpanelayout/api/public_plus_experimental_1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/public_plus_experimental_current.txt
M slidingpanelayout/slidingpanelayout/api/restricted_1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/restricted_current.txt
M slidingpanelayout/slidingpanelayout/src/main/java/androidx/slidingpanelayout/widget/SlidingPaneLayout.java
yc...@gmail.com <yc...@gmail.com> #5
Sorry I think I made a mistake in step 4 and 7 (was confusing with
The original <flavor>Release
build (assembleProdRelease
) does pickup both profiles if they're placed under src/<variant>/generated/baselineProfiles
.
The <flavor>BenchmarkRelease
task generated by the baseline profile plugin however can't seem to be able to pickup files in src/<variant>/generated/baselineProfiles
, but src/<variant>/baselineProfiles
works.
So to reproduce it you can run ./gradlew assembleDevBenchmarkRelease
with the profiles in src/<variant>/generated/baselineProfiles
VS src/<variant>/baselineProfiles
, and compare app/build/intermediates
folder:
intermediates/merged_startup_profile/
is produced if the startup profile lives insrc/<variant>/baselineProfiles
- no
merged_startup_profile
folder is produced if the startup profile lives insrc/<variant>/generated/baselineProfiles
What this effectively means is without changing baselineProfileOutputDir
to point to src/<variant>/baselineProfiles
, the app being benchmarked won't include the profiles provided by the app which is how I found this issue (see
ma...@google.com <ma...@google.com> #6
Thank you for spending the time to reexplain this.
I went through it and found the bug.
I'm going to create a patch for the plugin.
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit 72443347a8fa1ad4c1a54af7d1a93e5296418ab8
Author: Marcello Albano <maralb@google.com>
Date: Wed Apr 10 14:54:23 2024
Add baseline profile srcset to benchmark variants
Due to a bug the baseline profile srcset for a release variant is not
being added to the ones for a benchmark variant. This PR fixes that.
Test: ./gradlew :benchmark:benchmark-baseline-profile-gradle-plugin:test
Bug: 333024280
Relnote: "Fix to ensure benchmarks use generated baseline profiles when
`automaticGenerationDuringBuild` is off"
Change-Id: Ic144f394c09ec666d4892a4168a2197dc5031039
M benchmark/baseline-profile-gradle-plugin/src/main/kotlin/androidx/baselineprofile/gradle/consumer/BaselineProfileConsumerPlugin.kt
M benchmark/baseline-profile-gradle-plugin/src/test/kotlin/androidx/baselineprofile/gradle/consumer/BaselineProfileConsumerPluginTest.kt
M benchmark/baseline-profile-gradle-plugin/src/test/kotlin/androidx/baselineprofile/gradle/utils/Constants.kt
ma...@google.com <ma...@google.com> #8
The patch should be in baseline profile gradle plugin 1.2.4 and 1.3.0-alpha03
na...@google.com <na...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-baseline-profile-gradle-plugin:1.2.4
androidx.benchmark:benchmark-baseline-profile-gradle-plugin:1.3.0-alpha03
yc...@gmail.com <yc...@gmail.com> #10
I can still reproduce this in 1.3.0-alpha03. I've pushed a
- run
./gradlew assembleDevBenchmarkRelease
- the
android/app/build/intermediates/merged_startup_profile/devBenchmarkRelease/mergeDevBenchmarkReleaseStartupProfile/
folder is still empty - the
android/app/build/intermediates/merged_art_profile/devBenchmarkRelease/mergeDevBenchmarkReleaseArtProfile/baseline-prof.txt
only has profiles from libraries - the build completes even when the
baseline-prof.txt
andstartup-prof.txt
insrc/main/generated/baselineProfiles
have unparsable contentfoo
andbar
.
ma...@google.com <ma...@google.com> #11
Was looking at the project and I think the issue is here:
beforeVariants {
it.enable = it.name in listOf(
"devDebug",
"demoDebug",
"mockDebug",
"prodRelease",
"devNonMinifiedRelease",
"devBenchmarkRelease",
"prodBenchmarkRelease",
)
}
In this beforeVariants
block, the variant devRelease
is disabled, so the onVariants
callback for that variant won't run. The set up work for devBenchmarkRelease
is done in that callback.
Unfortunately this code is a bit tricky because it's not possible to access a variant from another variant, using the variant api. So the baseline profile plugin processes the base variant and then schedules some work for when the benchmark variant is processed, in order to add the baseline profile src sets.
The (non-optimal) "fix" here would be to re-enable devRelease
.
yc...@gmail.com <yc...@gmail.com> #12
Thanks, enabling devRelease
does work. For now I've worked around this by enabling benchmark related variants only when running benchmarks by checking gradle.startParameter
.
Description
Using the baseline profile gradle plugin, the
startup-prof.txt
is copied intosrc/sourceSet/generated/baselineProfiles
by default.The file is not being picked up by AGP when compiling the release build
STEPS TO REPRODUCE:
android/app/src/main/generated/baselineProfiles/startup-prof.txt
foo
./gradlew assembleProdRelease
startup-prof.txt
toandroid/app/src/main/baselineProfiles
./gradlew assembleProdRelease
ERROR: /path/android/app/build/intermediates/merged_startup_profile/prodRelease/mergeProdReleaseStartupProfile/startup-prof.txt: R8: Unable to parse rule at line 1 from ART profile: foo
Studio Build: Android Studio Koala 2024.1.1 Canary 3
Version of Gradle Plugin: 8.5.0-alpha03
Version of Gradle: 8.7
Version of androidx.baselineprofile: 1.3.0-alpha02
Version of Java: 21
OS: macOS