Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,20 @@ android {
configure<CrashlyticsExtension> {
mappingFileUploadEnabled = true
}
// To publish on the Play store a private signing key is required, but to allow anyone
// who clones the code to sign and run the release variant, use the debug signing key.
signingConfig = signingConfigs.named("debug").get()
// Conditionally apply signingConfig for release builds
// If the 'CI_BUILD' project property is set to 'true', do not assign a signingConfig.
// Otherwise, (e.g., for local Android Studio builds), sign with the debug key.
if (project.findProperty("CI_BUILD")?.toString()?.toBoolean() == true) {
// For CI builds, we want an unsigned artifact.
// No signingConfig is assigned here.
// The bundleRelease task will produce an unsigned AAB.
println("CI_BUILD property detected. Release build will be unsigned by Gradle.")
} else {
// For local builds (not CI), sign with the debug key to allow easy deployment.
// This ensures you can select the "release" variant in Android Studio and run it.
println("Not a CI_BUILD or CI_BUILD property not set. Signing release build with debug key.")
signingConfig = signingConfigs.getByName("debug")
}
}
}
compileOptions {
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ echo "INFO: Cleaning the project..."

# Build the production release bundle without generating a baseline profile.
echo "INFO: Building the production release bundle..."
./gradlew app:bundleRelease -x test -Pandroid.sdk.path=$ANDROID_HOME
./gradlew app:bundleRelease -x test -Pandroid.sdk.path=$ANDROID_HOME -PCI_BUILD=true

# --- Artifact Collection ---
echo "INFO: Preparing artifacts for Kokoro..."
Expand Down
2 changes: 1 addition & 1 deletion build_presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ echo "INFO: Cleaning the project..."

# Build the production release bundle without generating a baseline profile.
echo "INFO: Building the production release bundle..."
./gradlew app:bundleRelease -x test -x uploadCrashlyticsMappingFileRelease -Pandroid.sdk.path=$ANDROID_HOME
./gradlew app:bundleRelease -x test -x uploadCrashlyticsMappingFileRelease -Pandroid.sdk.path=$ANDROID_HOME -PCI_BUILD=true

# --- Artifact Collection ---
echo "INFO: Preparing artifacts for Kokoro..."
Expand Down