<NME> build.gradle
<BEF> /*
 * Copyright 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdk rootProject.compileSdkVersion
    namespace 'com.example.macrobenchmark.target'

    defaultConfig {
        applicationId "com.example.macrobenchmark.target"
        minSdk rootProject.minSdkVersion
        targetSdk rootProject.targetSdkVersion
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildFeatures {

    // [START macrobenchmark_setup_app_build_type]
    buildTypes {
        benchmark {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
            signingConfig signingConfigs.debug
        }
    }
            signingConfig signingConfigs.debug
            // [START_EXCLUDE silent]
            // Selects release buildType if the benchmark buildType not available in other modules.
            matchingFallbacks = ['release']
            // [START_EXCLUDE silent]
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'benchmark-rules.pro'
        }
    }
    // [END macrobenchmark_setup_app_build_type]

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_11
        targetCompatibility JavaVersion.VERSION_11
    }
    kotlinOptions {
        jvmTarget = '11'
    }
    composeOptions {
        kotlinCompilerExtensionVersion = composeCompilerVersion
    }
}

dependencies {
    implementation project(':shared')

    implementation "androidx.activity:activity-compose:$activityVersion"
    implementation "androidx.activity:activity-ktx:$activityVersion"
    implementation "androidx.appcompat:appcompat:$appcompatVersion"
    implementation "androidx.compose.material:material:$composeUiVersion"
    implementation "androidx.compose.ui:ui-tooling:$composeUiVersion"
    implementation "androidx.compose.ui:ui:$composeUiVersion"
    implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
    implementation "androidx.core:core-ktx:$coreVersion"
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
    implementation "androidx.profileinstaller:profileinstaller:$profileInstallerVersion"
    implementation "androidx.tracing:tracing-ktx:$tracingVersion"
    implementation "com.google.android.material:material:$materialVersion"
    implementation "com.squareup.curtains:curtains:$curtainsVersion"
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"

    testImplementation "junit:junit:$jUnitVersion"
    androidTestImplementation "androidx.test.ext:junit:$testExtVersion"
    androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCoreVersion"
}

<MSG> chore: benchmark initWith release

<DFF> @@ -36,10 +36,14 @@ android {
 
     // [START macrobenchmark_setup_app_build_type]
     buildTypes {
-        benchmark {
+        release {
             minifyEnabled true
             shrinkResources true
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
+        }
+
+        benchmark {
+            initWith buildTypes.release
             signingConfig signingConfigs.debug
         }
     }

{'commit': "diff --git a/MacrobenchmarkSample/app/build.gradle b/MacrobenchmarkSample/app/build.gradle\nindex 4ad7add..feee077 100644\n--- a/MacrobenchmarkSample/app/build.gradle\n+++ b/MacrobenchmarkSample/app/build.gradle\n@@ -36,10 +36,14 @@ android {\n \n     // [START macrobenchmark_setup_app_build_type]\n     buildTypes {\n-        benchmark {\n+        release {\n             minifyEnabled true\n             shrinkResources true\n             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')\n+        }\n+\n+        benchmark {\n+            initWith buildTypes.release\n             signingConfig signingConfigs.debug\n         }\n     }\n", 'commit_subject': 'chore: benchmark initWith release', 'repo_name': 'android/performance-samples', 'committer': {'name': 'Tomáš Mlynarič', 'email': 'bf0461e0733a279e43823cac922cf0d001d7a081@google.com', 'time_sec': '1641977158', 'tz_offset': '60', 'date': {'seconds': '1641977158'}}, 'commit_tree': '2d22cedd193a5591dbb839178203e109291cf8c6', 'commit_message': 'chore: benchmark initWith release\n', 'language_name': 'TypeScript', 'license': 'apache-2.0', 'hunks': "@@ -36,10 +36,14 @@ android {\n \n     // [START macrobenchmark_setup_app_build_type]\n     buildTypes {\n-        benchmark {\n+        release {\n             minifyEnabled true\n             shrinkResources true\n             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')\n+        }\n+\n+        benchmark {\n+            initWith buildTypes.release\n             signingConfig signingConfigs.debug\n         }\n     }\n", 'addition_count': 5, 'deletion_count': 1, 'src_file': 'a/MacrobenchmarkSample/app/build.gradle', 'tgt_file': 'b/MacrobenchmarkSample/app/build.gradle', 'file_extension': '.gradle', 'before_file': '/*\n * Copyright 2021 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nplugins {\n    id \'com.android.application\'\n    id \'kotlin-android\'\n}\n\nandroid {\n    compileSdk rootProject.compileSdkVersion\n    namespace \'com.example.macrobenchmark.target\'\n\n    defaultConfig {\n        applicationId "com.example.macrobenchmark.target"\n        minSdk rootProject.minSdkVersion\n        targetSdk rootProject.targetSdkVersion\n        versionCode 1\n        versionName "1.0"\n        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"\n    }\n\n    buildFeatures {\n\n    // [START macrobenchmark_setup_app_build_type]\n    buildTypes {\n        benchmark {\n            minifyEnabled true\n            shrinkResources true\n            proguardFiles getDefaultProguardFile(\'proguard-android-optimize.txt\')\n            signingConfig signingConfigs.debug\n        }\n    }\n            signingConfig signingConfigs.debug\n            // [START_EXCLUDE silent]\n            // Selects release buildType if the benchmark buildType not available in other modules.\n            matchingFallbacks = [\'release\']\n            // [START_EXCLUDE silent]\n            proguardFiles getDefaultProguardFile(\'proguard-android-optimize.txt\'), \'benchmark-rules.pro\'\n        }\n    }\n    // [END macrobenchmark_setup_app_build_type]\n\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_11\n        targetCompatibility JavaVersion.VERSION_11\n    }\n    kotlinOptions {\n        jvmTarget = \'11\'\n    }\n    composeOptions {\n        kotlinCompilerExtensionVersion = composeCompilerVersion\n    }\n}\n\ndependencies {\n    implementation project(\':shared\')\n\n    implementation "androidx.activity:activity-compose:$activityVersion"\n    implementation "androidx.activity:activity-ktx:$activityVersion"\n    implementation "androidx.appcompat:appcompat:$appcompatVersion"\n    implementation "androidx.compose.material:material:$composeUiVersion"\n    implementation "androidx.compose.ui:ui-tooling:$composeUiVersion"\n    implementation "androidx.compose.ui:ui:$composeUiVersion"\n    implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"\n    implementation "androidx.core:core-ktx:$coreVersion"\n    implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"\n    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"\n    implementation "androidx.profileinstaller:profileinstaller:$profileInstallerVersion"\n    implementation "androidx.tracing:tracing-ktx:$tracingVersion"\n    implementation "com.google.android.material:material:$materialVersion"\n    implementation "com.squareup.curtains:curtains:$curtainsVersion"\n    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"\n    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"\n\n    testImplementation "junit:junit:$jUnitVersion"\n    androidTestImplementation "androidx.test.ext:junit:$testExtVersion"\n    androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCoreVersion"\n}\n', 'message': 'chore: benchmark initWith release\n', 'author_name': 'Tomáš Mlynarič', 'lang': 'gradle'}