diff --git a/README.md b/README.md index 3ac60cb6d..6e879b08a 100644 --- a/README.md +++ b/README.md @@ -123,28 +123,11 @@ If you want to run **performance tests/benchmarks** in automation or locally: For additional context on these recommendations, see [the perf build variant analysis](https://docs.google.com/document/d/1aW-m0HYncTDDiRz_2x6EjcYkjBpL9SHhhYix13Vil30/edit#). -You will **need to sign `forPerformanceTest` variants.** For local development, our recommendation is to add the following configuration to `app/build.gradle`: - -```groovy -android { // this line already exists - // ... - - buildTypes { // this line already exists - // ... - - forPerformanceTest releaseTemplate >> { // this line already exists. - // ... - - signingConfig signingConfigs.debug - } - } -} +Before you can install any release variants including `forPerformanceTest`, **you will need to sign them.** To do this automatically in local development, you can add the following to `/local.properties`: +```sh +autosignReleaseWithDebugKey ``` -This recommendation will let you use AS just like you do with debug builds but **please do not check in these changes.** - -See [perf-frontend-issues#44](https://github.com/mozilla-mobile/perf-frontend-issues/issues/44) for efforts to make performance signing easier. - ## Pre-push hooks To reduce review turn-around time, we'd like all pushes to run tests locally. We'd recommend you use our provided pre-push hook in `config/pre-push-recommended.sh`. diff --git a/app/build.gradle b/app/build.gradle index 4d96ac73b..409c84b97 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,6 +46,10 @@ android { minifyEnabled true proguardFiles 'proguard-android-optimize-3.5.0-modified.txt', 'proguard-rules.pro' matchingFallbacks = ['release'] // Use on the "release" build type in dependencies (AARs) + + if (gradle.hasProperty("localProperties.autosignReleaseWithDebugKey")) { + signingConfig signingConfigs.debug + } } buildTypes {