Android - Added separation for development/production builds (#43)

## Pull Request Description

Added a development build to so it's easier to develop alongside the
current release (Android only atm)

## Issue Being Fixed

Developing removing the actually installed fladder app

Issue Number: N/A

## Checklist

- [ ] If a new package was added, did you ensure it works for all
supported platforms? Is the package also well maintained?
- [ ] Did you add localization for any text? If yes, did you sort the
.arb file using ```arb_utils sort <INPUT_FILE>```?
- [ ] Check that any changes are related to the issue at hand.

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-10-18 18:33:02 +02:00 committed by GitHub
parent f7f53d1656
commit 758e369839
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
101 changed files with 383 additions and 79 deletions

View file

@ -63,26 +63,25 @@ jobs:
flutter build apk --release \
--build-name=$VERSION_NAME \
--build-number=$GITHUB_RUN_NUMBER \
--dart-define=FLAVOR=release
--flavor production
# Build AAB
flutter build appbundle --release \
--build-name=$VERSION_NAME \
--build-number=$GITHUB_RUN_NUMBER \
--dart-define=FLAVOR=release
--flavor production
- name: Rename APK and AAB
run: |
mv build/app/outputs/flutter-apk/app-release.apk "build/app/outputs/flutter-apk/${{ env.APP_NAME }}-${{ env.VERSION_NAME }}-signed.apk"
mv build/app/outputs/bundle/release/app-release.aab "build/app/outputs/bundle/release/${{ env.APP_NAME }}-${{ env.VERSION_NAME }}-signed.aab"
mkdir -p build/app/outputs/android_artifacts
mv build/app/outputs/flutter-apk/app-production-release.apk "build/app/outputs/android_artifacts/${{ env.APP_NAME }}-Android-${{ env.VERSION_NAME }}.apk"
mv build/app/outputs/bundle/productionRelease/app-production-release.aab "build/app/outputs/android_artifacts/${{ env.APP_NAME }}-Android-${{ env.VERSION_NAME }}.aab"
- name: Archive Android artifacts
uses: actions/upload-artifact@v4.0.0
with:
name: ${{ env.APP_NAME }}-Android-${{ env.VERSION_NAME }}
path: |
build/app/outputs/flutter-apk/${{ env.APP_NAME }}-${{ env.VERSION_NAME }}-signed.apk
build/app/outputs/bundle/release/${{ env.APP_NAME }}-${{ env.VERSION_NAME }}-signed.aab
path: build/app/outputs/android_artifacts/
build-windows:
#Use windows-2019, latest(2022) causes MSVCP140.dll related crashes
@ -282,6 +281,7 @@ jobs:
path: build/web
- name: Deploy to ghcr.io
if: startsWith(github.ref, 'refs/tags/v')
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: fladder
@ -291,9 +291,11 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Github pages web
if: startsWith(github.ref, 'refs/tags/v')
run: flutter build web --base-href /${{ github.event.repository.name }}/ --release --build-number=$GITHUB_RUN_NUMBER
- name: Deploy to GitHub Pages
if: startsWith(github.ref, 'refs/tags/v')
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub Actions

78
.vscode/launch.json vendored
View file

@ -5,51 +5,62 @@
"version": "0.2.0",
"configurations": [
{
"name": "fladder",
"name": "Fladder Development (debug)",
"request": "launch",
"type": "dart",
"args": [
"--web-port",
"8096"
],
"--flavor",
"development"
]
},
{
"name": "fladder (profile mode)",
"name": "Fladder Production (debug)",
"request": "launch",
"type": "dart",
"args": [
"--flavor",
"production"
]
},
{
"name": "Fladder Development (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile",
"args": [
"--web-port",
"9090"
],
"--flavor",
"development"
]
},
{
"name": "fladder (release mode)",
"name": "Fladder Production (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile",
"args": [
"--flavor",
"production"
]
},
{
"name": "Fladder Development (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release",
"args": [
"--web-port",
"9090"
],
"--flavor",
"development"
]
},
{
"name": "Android",
"name": "Fladder Production (release mode)",
"request": "launch",
"type": "dart",
},
{
"name": "iPhone",
"request": "launch",
"type": "dart",
"deviceId": "iphone"
},
{
"name": "Windows",
"request": "launch",
"type": "dart",
"flutterMode": "debug",
"deviceId": "windows"
"flutterMode": "release",
"args": [
"--flavor",
"production"
]
},
{
"name": "Web",
@ -72,20 +83,5 @@
"9090"
],
},
{
"name": "AndroidTV",
"request": "launch",
"program": "lib/android_tv/main.dart",
"type": "dart",
},
],
"compounds": [
{
"name": "All Devices",
"configurations": [
"Windows",
"Android"
],
}
]
}

11
.vscode/tasks.json vendored
View file

@ -75,10 +75,15 @@
"command": "dart",
"args": [
"run",
"icons_launcher:create"
"icons_launcher:create",
"--flavors",
"development,production"
],
"label": "dart: generate launcher icons",
"detail": ""
"label": "dart: generate icons_launcher",
"detail": "",
"options": {
"cwd": "${workspaceFolder}"
}
}
],
}

View file

@ -68,12 +68,24 @@ android {
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
debug{
applicationIdSuffix = ".debug"
}
}
flavorDimensions "default"
productFlavors {
development {
dimension "default"
applicationIdSuffix ".dev"
}
production {
dimension "default"
applicationIdSuffix ""
}
}
}
flutter {

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FF21013A</color>
</resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FF3A2101</color>
</resources>

View file

@ -7,6 +7,10 @@ allprojects {
rootProject.buildDir = '../build'
buildscript {
ext.kotlin_version = '1.8.0'
}
//[Fixes AAPT: error: resource android:attr/lStar not found]
subprojects {
afterEvaluate { project ->

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
icons/fladder_icon.afphoto Normal file

Binary file not shown.

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 228 KiB

After

Width:  |  Height:  |  Size: 228 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 524 KiB

After

Width:  |  Height:  |  Size: 524 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 209 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

View file

@ -0,0 +1,24 @@
icons_launcher:
image_path: "icons/development/fladder_icon.png"
platforms:
android:
adaptive_foreground_image: "icons/development/fladder_icon.png"
adaptive_background_color: "#21013a"
adaptive_monochrome_image: "icons/development/fladder_adaptive_icon.png"
notification_image: icons/fladder_notification_icon.png
enable: true
ios:
image_path: "icons/development/fladder_store_icon.jpg"
enable: true
windows:
image_path: "icons/development/fladder_icon_desktop.png"
enable: true
macos:
image_path: "icons/development/fladder_macos_icon.png"
enable: true
linux:
image_path: "icons/development/fladder_icon_desktop.png"
enable: true
web:
favicon_path: "icons/development/fladder_icon_desktop.png"
enable: true

View file

@ -0,0 +1,24 @@
icons_launcher:
image_path: "icons/production/fladder_icon.png"
platforms:
android:
adaptive_foreground_image: "icons/production/fladder_icon.png"
adaptive_background_color: "#3a2101"
adaptive_monochrome_image: "icons/production/fladder_adaptive_icon.png"
notification_image: icons/fladder_notification_icon.png
enable: true
ios:
image_path: "icons/production/fladder_store_icon.jpg"
enable: true
windows:
image_path: "icons/production/fladder_icon_desktop.png"
enable: true
macos:
image_path: "icons/production/fladder_macos_icon.png"
enable: true
linux:
image_path: "icons/production/fladder_icon_desktop.png"
enable: true
web:
favicon_path: "icons/production/fladder_icon_desktop.png"
enable: true

View file

@ -1,24 +0,0 @@
icons_launcher:
image_path: "icons/fladder_icon.png"
platforms:
android:
adaptive_foreground_image: "icons/fladder_icon.png"
adaptive_background_color: "#3a2101"
adaptive_monochrome_image: "icons/fladder_adaptive_icon.png"
notification_image: icons/fladder_notification_icon.png
enable: true
ios:
image_path: "icons/fladder_store_icon.jpg"
enable: true
windows:
image_path: "icons/fladder_icon_desktop.png"
enable: true
macos:
image_path: "icons/fladder_macos_icon.png"
enable: true
linux:
image_path: "icons/fladder_icon_desktop.png"
enable: true
web:
favicon_path: "icons/fladder_icon_desktop.png"
enable: true

View file

@ -0,0 +1,120 @@
{
"images": [
{
"filename": "Icon-App-20x20@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "20x20",
"platform": "ios"
},
{
"filename": "Icon-App-20x20@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "20x20",
"platform": "ios"
},
{
"filename": "Icon-App-29x29@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "29x29",
"platform": "ios"
},
{
"filename": "Icon-App-29x29@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "29x29",
"platform": "ios"
},
{
"filename": "Icon-App-38x38@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "38x38",
"platform": "ios"
},
{
"filename": "Icon-App-38x38@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "38x38",
"platform": "ios"
},
{
"filename": "Icon-App-40x40@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "40x40",
"platform": "ios"
},
{
"filename": "Icon-App-40x40@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "40x40",
"platform": "ios"
},
{
"filename": "Icon-App-60x60@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "60x60",
"platform": "ios"
},
{
"filename": "Icon-App-60x60@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "60x60",
"platform": "ios"
},
{
"filename": "Icon-App-64x64@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "64x64",
"platform": "ios"
},
{
"filename": "Icon-App-64x64@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "64x64",
"platform": "ios"
},
{
"filename": "Icon-App-68x68@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "68x68",
"platform": "ios"
},
{
"filename": "Icon-App-76x76@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "76x76",
"platform": "ios"
},
{
"filename": "Icon-App-83.5x83.5@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "83.5x83.5",
"platform": "ios"
},
{
"filename": "Icon-App-1024x1024@1x.png",
"idiom": "universal",
"scale": "1x",
"size": "1024x1024",
"platform": "ios"
}
],
"info": {
"author": "icons_launcher",
"version": 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -0,0 +1,120 @@
{
"images": [
{
"filename": "Icon-App-20x20@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "20x20",
"platform": "ios"
},
{
"filename": "Icon-App-20x20@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "20x20",
"platform": "ios"
},
{
"filename": "Icon-App-29x29@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "29x29",
"platform": "ios"
},
{
"filename": "Icon-App-29x29@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "29x29",
"platform": "ios"
},
{
"filename": "Icon-App-38x38@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "38x38",
"platform": "ios"
},
{
"filename": "Icon-App-38x38@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "38x38",
"platform": "ios"
},
{
"filename": "Icon-App-40x40@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "40x40",
"platform": "ios"
},
{
"filename": "Icon-App-40x40@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "40x40",
"platform": "ios"
},
{
"filename": "Icon-App-60x60@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "60x60",
"platform": "ios"
},
{
"filename": "Icon-App-60x60@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "60x60",
"platform": "ios"
},
{
"filename": "Icon-App-64x64@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "64x64",
"platform": "ios"
},
{
"filename": "Icon-App-64x64@3x.png",
"idiom": "universal",
"scale": "3x",
"size": "64x64",
"platform": "ios"
},
{
"filename": "Icon-App-68x68@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "68x68",
"platform": "ios"
},
{
"filename": "Icon-App-76x76@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "76x76",
"platform": "ios"
},
{
"filename": "Icon-App-83.5x83.5@2x.png",
"idiom": "universal",
"scale": "2x",
"size": "83.5x83.5",
"platform": "ios"
},
{
"filename": "Icon-App-1024x1024@1x.png",
"idiom": "universal",
"scale": "1x",
"size": "1024x1024",
"platform": "ios"
}
],
"info": {
"author": "icons_launcher",
"version": 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Some files were not shown because too many files have changed in this diff Show more