Fixed
Status Update
Comments
ap...@google.com <ap...@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.
ap...@google.com <ap...@google.com> #3
Attaching a sample project for convenience.
ap...@google.com <ap...@google.com> #4
This should be a bug on the AS side.
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.
cc...@google.com <cc...@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).
Description
"timeNs": {
"minimum": 10,
"maximum": 28,
"median": 10,
"runs": [
28,
11,
10,
10,
10,
10,
10,
...
"name": "nothing",
"timeNs": {
"minimum": 9,
"maximum": 25,
"median": 9,
"runs": [
25,
9,
9,
9,
9,
9,
9,
...