Fix Android release builds using Test ConfigCat SDK key instead of Production#105
Fix Android release builds using Test ConfigCat SDK key instead of Production#105Copilot wants to merge 3 commits intorelease/1.2.0from
Conversation
…ase builds Co-authored-by: ricky9667 <55730003+ricky9667@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot What if i use "Generate Signed App Bundle or APK" menu option from Android Studio menu bar? How can i configure this option in my IDE? |
Co-authored-by: ricky9667 <55730003+ricky9667@users.noreply.github.com>
I've added comprehensive Android Studio IDE configuration instructions to the documentation (commit e4245fe). 5 options to configure Android Studio: Option 1 (Recommended): Add Option 2: Add to project's Option 3: Build Variants panel - Note: Android Studio's "Generate Signed Bundle" dialog doesn't support passing Gradle properties directly. Option 4 (Best for recurring use): Create a custom Gradle run configuration:
Option 5 (Most reliable): Use the built-in Terminal in Android Studio and run: ./gradlew :composeApp:bundleRelease -Pbuildkonfig.flavor=releaseMy recommendation: Use Option 4 (custom run configuration) or Option 5 (terminal) for the most explicit control. Options 1-2 modify gradle.properties which affects all builds globally. See the complete guide in |
|
Fixed directly in the #102 branch. |
Summary
Briefly explain the problem and what this PR changes.
:composeApp:bundleRelease) were usingCONFIGCAT_KEY_TESTinstead ofCONFIGCAT_KEY_PRODbecause BuildKonfig's flavor-based configuration wasn't being activated.-Pbuildkonfig.flavor=releaseflag; added comprehensive testing and IDE configuration documentation.Context / Links
Implementation details
BuildKonfig doesn't auto-detect Android build types (debug/release). The
defaultConfigs("release")block defines a flavor, not a build variant. Without the flavor flag, all builds use the default config.Updated configuration comments:
Correct release build command:
Android Studio IDE Configuration:
Added 5 options for configuring Android Studio's "Generate Signed Bundle / APK" menu:
buildkonfig.flavor=releaseto~/.gradle/gradle.properties-Pbuildkonfig.flavor=releaseargumentRecommended approach: Use custom run configuration or terminal for explicit control.
Screenshots / API changes (if applicable)
N/A - Build configuration change only
Testing
Describe how this was tested and what scenarios were covered.
Steps / commands:
Created
docs/BUILDKONFIG_SETUP.mdwith comprehensive documentation including:4 verification methods:
./gradlew :composeApp:generateBuildKonfig -Pbuildkonfig.flavor=release→ verifyBuildKonfig.ktcontains prod keyprintln(BuildKonfig.CONFIGCAT_SDK_KEY)to DI setup → confirm key in logcatBuildKonfig.classconstantPlatform coverage:
-Pbuildkonfig.flavor=release)-Pmode=release)-Pmode=release)IDE integration:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.