Status Update
Comments
cc...@google.com <cc...@google.com> #2
I'm a little wary of making this the plugin's responsibility long term, since it's invisible, and unclear why the behavior is different for benchmarks (when it feels like it shouldn't be).
du...@google.com <du...@google.com> #3
I filed this in response to your comment here:
Basically setting testBuildType to release (which we do in the plugin) is annoying because it requires you to also set a signingConfig unless you also set signingConfig signingConfig.debug in gradle. testBuildType being set to release is already somewhat invisible, so we should also invisibly fix the issue for users right? Alternatively, we could just remove this from the plugin and have it be part of the template / explicitly require user to define in gradle.
cc...@google.com <cc...@google.com> #4
It would move the signing hurdle for developers from running the release build for the first time to store upload time, but I think that's good anyway. It enables them to run their release app locally for profiling, or R8 validation. At minimum, this makes sense for a library module test APK, since you'll never upload it to the store anyway - there's no reason it can't be signed with debug keys.
du...@google.com <du...@google.com> #5
I think this kind of logic AGP would only want to do for benchmark modules, and it would only be able to know by applied plugin or dependency. It seems like something that would depend on whether benchmark modules are considered a 1st-class citizen in AGP, but otherwise I'm not too sure. Should we also duplicate this change in the studio template if we apply it in the benchmark plugin?
du...@google.com <du...@google.com>
cc...@google.com <cc...@google.com> #6
ap...@google.com <ap...@google.com> #7
Branch: androidx-master-dev
commit 8e4b9c9bbba86dc0d440499d7c433cf47e271ef4
Author: Dustin Lam <dustinlam@google.com>
Date: Mon Apr 27 17:45:57 2020
Set signingConfig for benchmark buildTypes to debug by default
Fixes: 153583269
Test: ./gradlew benchmark:benchmark-gradle-plugin:test
Change-Id: I4b42d5a0a44a2c165ad82998fc1dc7bcbf5b8dc1
M benchmark/gradle-plugin/src/main/kotlin/androidx/benchmark/gradle/BenchmarkPlugin.kt
M benchmark/gradle-plugin/src/test/kotlin/androidx/benchmark/gradle/BenchmarkPluginTest.kt
cc...@google.com <cc...@google.com> #8
Note that AGP landed a change (coming in a 4.1 alpha) to make this the default behavior, so eventually we can remove this behavior on our side:
Description
Reduces a bit of setup friction!