Status Update
Comments
cc...@google.com <cc...@google.com> #2
The workaround I found so far is to use project.afterEvaluate {} to access the build types, as they are created only after Baseline Profile Gradle Plugin creates them:
Kotlin
android {
buildTypes {
release { ... }
project.afterEvaluate {
getByName("benchmarkRelease") { }
getByName("nonMinifiedRelease") { }
}
}
}
Groovy
android {
buildTypes {
release { ... }
project.afterEvaluate {
benchmarkRelease { }
nonMinifiedRelease { }
}
}
}
This way there are no redundant build variants created.
cc...@google.com <cc...@google.com> #3
Attaching a sample project for convenience.
cc...@google.com <cc...@google.com>
cc...@google.com <cc...@google.com> #5
I would say AS isn't the problem. Even without the AS in the project that I attached the simple commands:
./gradlew assembleBenchmarkBenchmarkRelease
./gradlew assembleNonMinifiedNonMinifiedRelease
./gradlew assembleNonMinifiedBenchmarkRelease
are executed successfully and produce some apks.
pr...@google.com <pr...@google.com> #6
This is how the baseline profile works - it creates specific build types to correctly generate baseline profiles and benchmarks.
You can still disable the variants if you're not interested in one of them. But AS should not be showing them (by default, configurable through a flag).
na...@google.com <na...@google.com> #7
Yes, the Baseline Profile Gradle Plugin creates the appropriate build types or updates them if they already exist (or supposed to, according to the source code).
What I'm refereing to exactly is those result build variants, that don't make sence: benchmarkBenchmarkRelease
, nonMinifiedNonMinifiedRelease
and nonMinifiedBenchmarkRelease
.
AS displays whatever build variants were created by the gradle plugins and fixing this issue either on AS side or disabling all these weird build variants manually in build script seem more like treating a symptom, rather than the root cause.
Description
We are adding the ability to capture new kinds of data with the benchmarking library, currently allocated memory.
This suggests a change to the name of the method runWithTimingDisabled. That method will be replaced with an equivalent method with a new name, and deprecated (but not removed yet).
There may be some similar API changes.