mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-12-08 16:27:31 +00:00
feat(android): add flavor support
This commit is contained in:
parent
ffe8d9ca6d
commit
5e12bbd72f
10
.github/workflows/spotube-release-binary.yml
vendored
10
.github/workflows/spotube-release-binary.yml
vendored
@ -235,10 +235,8 @@ jobs:
|
||||
|
||||
- name: Build Apk
|
||||
run: |
|
||||
flutter build apk
|
||||
flutter build appbundle
|
||||
mv build/app/outputs/apk/release/app-release.apk build/Spotube-android-all-arch.apk
|
||||
mv build/app/outputs/bundle/release/app-release.aab build/Spotube-playstore-all-arch.aab
|
||||
flutter build apk --flavor ${{ inputs.channel }}
|
||||
mv build/app/outputs/apk/release/app-${{ inputs.channel }}-release.apk build/Spotube-android-all-arch.apk
|
||||
|
||||
- name: Build Playstore AppBundle
|
||||
run: |
|
||||
@ -247,8 +245,8 @@ jobs:
|
||||
export MANIFEST=android/app/src/main/AndroidManifest.xml
|
||||
xmlstarlet ed -d '//meta-data[@android:name="com.google.android.gms.car.application"]' $MANIFEST > $MANIFEST.tmp
|
||||
mv $MANIFEST.tmp $MANIFEST
|
||||
flutter build appbundle
|
||||
mv build/app/outputs/bundle/release/app-release.aab build/Spotube-playstore-all-arch.aab
|
||||
flutter build appbundle --flavor ${{ inputs.channel }}
|
||||
mv build/app/outputs/bundle/release/app-${{ inputs.channel }}-release.aab build/Spotube-playstore-all-arch.aab
|
||||
|
||||
- name: Debug With SSH When fails
|
||||
if: ${{ failure() && inputs.debug && inputs.channel == 'nightly' }}
|
||||
|
||||
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
@ -5,7 +5,11 @@
|
||||
"name": "spotube",
|
||||
"type": "dart",
|
||||
"request": "launch",
|
||||
"program": "lib/main.dart"
|
||||
"program": "lib/main.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"nightly"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spotube (profile)",
|
||||
|
||||
@ -72,6 +72,22 @@ android {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "default"
|
||||
|
||||
productFlavors {
|
||||
nightly {
|
||||
dimension "default"
|
||||
resValue "string", "app_name", "Spotube Nightly"
|
||||
applicationIdSuffix ".nightly"
|
||||
versionNameSuffix "-nightly"
|
||||
}
|
||||
stable {
|
||||
dimension "default"
|
||||
resValue "string", "app_name", "Spotube"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
flutter {
|
||||
@ -92,4 +108,4 @@ dependencies {
|
||||
|
||||
// other deps so just ignore
|
||||
implementation 'com.android.support:multidex:2.0.1'
|
||||
}
|
||||
}
|
||||
@ -18,7 +18,7 @@
|
||||
<application
|
||||
android:allowBackup="false"
|
||||
android:fullBackupContent="false"
|
||||
android:label="Spotube"
|
||||
android:label="@string/app_name"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:usesCleartextTraffic="true"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user