Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
ma...@google.com <ma...@google.com> #2
There's probably some ordering going on when registering/triggering androidComponents.beforeVariants callbacks?
That's correct. Callbacks are queued and executed when the lifecycle event occurs.
It's fairly small change, I can try to add it for 1.3.
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit d2b508b5de860e2bb4c400701fefad7a4c351112
Author: Marcello Albano <maralb@google.com>
Date: Fri May 31 10:31:42 2024
Consider variant enable state when deciding whether variant should be enabled
Test: current
Bug: 343249144
Change-Id: I5d19e3040d28243857fab9b9a679057d6ad46c1b
M benchmark/baseline-profile-gradle-plugin/src/main/kotlin/androidx/baselineprofile/gradle/producer/BaselineProfileProducerPlugin.kt
https://android-review.googlesource.com/3108434
Branch: androidx-main
commit d2b508b5de860e2bb4c400701fefad7a4c351112
Author: Marcello Albano <maralb@google.com>
Date: Fri May 31 10:31:42 2024
Consider variant enable state when deciding whether variant should be enabled
Test: current
Bug: 343249144
Change-Id: I5d19e3040d28243857fab9b9a679057d6ad46c1b
M benchmark/baseline-profile-gradle-plugin/src/main/kotlin/androidx/baselineprofile/gradle/producer/BaselineProfileProducerPlugin.kt
ma...@google.com <ma...@google.com>
pr...@google.com <pr...@google.com> #4
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.3.0-beta01
Description
Component used: Baseline profiles plugin
Version used: 1.3.0-alpha05
Devices/Android versions reproduced on: N/A
We were trying to configure a variant filter using a convention plugin. For test modules (with plugin
com.android.test
), if baseline profiles plugin is applied after our convention plugin, it'll end up reenabling variants we just disabled before.There's probably some ordering going on when registering/triggering
androidComponents.beforeVariants
callbacks?I've narrowed it down to this line:https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:benchmark/baseline-profile-gradle-plugin/src/main/kotlin/androidx/baselineprofile/gradle/producer/BaselineProfileProducerPlugin.kt;l=231;drc=cebe814cae93028747ec8594b6edebb3ceee0daf
Is it possible for the plugin to consider the current
enable
state?Thanks!