@@ -33,6 +33,8 @@ android {
3333 applicationId = " com.android.developers.androidify"
3434 versionCode = libs.versions.appVersionCode.get().toInt()
3535 versionName = libs.versions.appVersionName.get()
36+
37+ testInstrumentationRunnerArguments[" androidx.benchmark.suppressErrors" ] = " EMULATOR"
3638 }
3739
3840 buildTypes {
@@ -45,29 +47,17 @@ android {
4547 isDebuggable = false
4648 }
4749 release {
48- isShrinkResources = true
4950 isMinifyEnabled = true
50- proguardFiles(
51- getDefaultProguardFile(" proguard-android-optimize.txt" ),
52- " proguard-rules.pro" ,
53- )
51+ isShrinkResources = true
52+ proguardFiles(getDefaultProguardFile(" proguard-android-optimize.txt" ), " proguard-rules.pro" )
5453 configure<CrashlyticsExtension > {
5554 mappingFileUploadEnabled = true
5655 }
56+ signingConfig = signingConfigs.getByName(" debug" )
57+
5758 // Conditionally apply signingConfig for release builds
5859 // If the 'CI_BUILD' project property is set to 'true', do not assign a signingConfig.
5960 // Otherwise, (e.g., for local Android Studio builds), sign with the debug key.
60- if (project.findProperty(" CI_BUILD" )?.toString()?.toBoolean() == true ) {
61- // For CI builds, we want an unsigned artifact.
62- // No signingConfig is assigned here.
63- // The bundleRelease task will produce an unsigned AAB.
64- println (" CI_BUILD property detected. Release build will be unsigned by Gradle." )
65- } else {
66- // For local builds (not CI), sign with the debug key to allow easy deployment.
67- // This ensures you can select the "release" variant in Android Studio and run it.
68- println (" Not a CI_BUILD or CI_BUILD property not set. Signing release build with debug key." )
69- signingConfig = signingConfigs.getByName(" debug" )
70- }
7161 }
7262 }
7363 testOptions {
@@ -83,8 +73,9 @@ android {
8373 }
8474}
8575
86- baselineProfile() {
76+ baselineProfile {
8777 dexLayoutOptimization = true
78+ automaticGenerationDuringBuild = true
8879}
8980
9081spdxSbom {
0 commit comments