mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-14 09:30:21 +08:00
Add a 'dev' and 'prod' build flavour
Now whenever we run 'flutter run' or 'flutter build' we need to pass the flavour flag. It seems there is no way to set a default flavour. This is required as I want to be able to not have to reconfigure my local GitJournal app (which I use for note-taking) vs the one I'm developing where I might change many different settings for the basis of testing. Specially since I don't use Github/GitLab to store my notes, so the setup process is a bit more involved.
This commit is contained in:
@ -27,10 +27,10 @@ jobs:
|
||||
name: Build
|
||||
command: ./scripts/build.sh
|
||||
- store_artifacts:
|
||||
path: build/app/outputs/bundle/release/app.aab
|
||||
path: build/app/outputs/bundle/prodRelease/app.aab
|
||||
destination: gitjournal.aab
|
||||
- store_artifacts:
|
||||
path: build/app/outputs/apk/release/app-release.apk
|
||||
path: build/app/outputs/apk/prod/release/app-prod-release.apk
|
||||
destination: gitjournal.apk
|
||||
- run:
|
||||
name: Upload Crashlytics Symbols
|
||||
|
@ -58,6 +58,18 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "app"
|
||||
productFlavors {
|
||||
prod {
|
||||
dimension "app"
|
||||
}
|
||||
dev {
|
||||
dimension "app"
|
||||
applicationIdSuffix ".dev"
|
||||
versionNameSuffix "-dev"
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
@ -114,4 +126,4 @@ crashlytics {
|
||||
enableNdk true
|
||||
androidNdkOut "../../debugSymbols"
|
||||
androidNdkLibsOut "../../build/app/intermediates/transforms/stripDebugSymbol/release/0/lib"
|
||||
}
|
||||
}
|
||||
|
42
android/app/src/dev/google-services.json
Normal file
42
android/app/src/dev/google-services.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "18856682550",
|
||||
"firebase_url": "https://gitjournal-io.firebaseio.com",
|
||||
"project_id": "gitjournal-io",
|
||||
"storage_bucket": "gitjournal-io.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:18856682550:android:fb0ceb03dbf2e58f",
|
||||
"android_client_info": {
|
||||
"package_name": "io.gitjournal.gitjournal.dev"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "18856682550-k5e281uclj5ov7mdmprqoiphhe3g42s2.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAlkNb53du5Q9WqaAAZScm7X1CzACArcw8"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 1
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 1,
|
||||
"other_platform_oauth_client": []
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
4
android/app/src/dev/res/values/strings.xml
Normal file
4
android/app/src/dev/res/values/strings.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">[dev] GitJournal</string>
|
||||
</resources>
|
@ -14,7 +14,7 @@
|
||||
FlutterApplication and put your custom class here. -->
|
||||
<application
|
||||
android:name="io.flutter.app.FlutterApplication"
|
||||
android:label="GitJournal"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/launcher_icon">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
4
android/app/src/main/res/values/strings.xml
Normal file
4
android/app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">GitJournal</string>
|
||||
</resources>
|
@ -12,7 +12,7 @@ platform :android do
|
||||
# end
|
||||
|
||||
upload_to_play_store(track: "alpha",
|
||||
aab: "../build/app/outputs/bundle/release/app.aab",
|
||||
aab: "../build/app/outputs/bundle/prodRelease/app.aab",
|
||||
skip_upload_metadata: true,
|
||||
skip_upload_images: true,
|
||||
skip_upload_screenshots: true,
|
||||
|
@ -5,5 +5,5 @@ set -eu
|
||||
BUILD_NUM=`git rev-list --count HEAD`
|
||||
echo "Build Number: $BUILD_NUM"
|
||||
|
||||
flutter build appbundle --build-number=$BUILD_NUM --verbose
|
||||
flutter build apk --build-number=$BUILD_NUM --verbose
|
||||
flutter build appbundle --flavor prod --build-number=$BUILD_NUM --verbose
|
||||
flutter build apk --flavor prod --build-number=$BUILD_NUM --verbose
|
||||
|
Reference in New Issue
Block a user