introduce build flavours to separate stable and alpha

This commit is contained in:
Fabian Freund
2026-04-19 18:34:13 +02:00
parent f980a94682
commit 0916954754
25 changed files with 121 additions and 40 deletions
+11 -6
View File
@@ -85,33 +85,38 @@ jobs:
- name: Build components
run: melos run build-components --no-select
- name: Build APK
- name: Build APK (Alpha)
if: steps.build-type.outputs.is_prerelease == 'true'
run: melos run build-browser-alpha --no-select
- name: Build APK (Stable)
if: steps.build-type.outputs.is_prerelease == 'false'
run: melos run build-browser --no-select
- name: Build App Bundle
if: steps.build-type.outputs.is_prerelease == 'false'
working-directory: apps/weblibre
run: flutter build appbundle --target-platform android-arm,android-arm64 --no-tree-shake-icons
run: flutter build appbundle --flavor stable --target-platform android-arm,android-arm64 --no-tree-shake-icons
- name: Create github artifact release (Prerelease)
if: steps.build-type.outputs.is_prerelease == 'true'
uses: ncipollo/release-action@v1.17.0
with:
artifacts: "apps/weblibre/build/app/outputs/apk/release/*.apk"
artifacts: "apps/weblibre/build/app/outputs/apk/alpha/release/*.apk"
prerelease: true
- name: Create github artifact release (Full)
if: steps.build-type.outputs.is_prerelease == 'false'
uses: ncipollo/release-action@v1.17.0
with:
artifacts: "apps/weblibre/build/app/outputs/apk/release/*.apk,apps/weblibre/build/app/outputs/bundle/release/app-release.aab"
artifacts: "apps/weblibre/build/app/outputs/apk/stable/release/*.apk,apps/weblibre/build/app/outputs/bundle/stableRelease/app-stable-release.aab"
- name: Upload app bundle artifact
if: steps.build-type.outputs.is_prerelease == 'false'
uses: actions/upload-artifact@v4
with:
name: appbundle
path: apps/weblibre/build/app/outputs/bundle/release/app-release.aab
path: apps/weblibre/build/app/outputs/bundle/stableRelease/app-stable-release.aab
- name: Release to Google Play (internal)
if: steps.build-type.outputs.is_prerelease == 'false'
@@ -121,7 +126,7 @@ jobs:
SUPPLY_JSON_KEY_DATA: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
run: |
bundle exec fastlane supply \
--aab build/app/outputs/bundle/release/app-release.aab \
--aab build/app/outputs/bundle/stableRelease/app-stable-release.aab \
--track internal
- name: Cleanup
+15 -29
View File
@@ -5,55 +5,41 @@
"version": "0.2.0",
"configurations": [
{
"name": "app",
"cwd": "app",
"name": "WebLibre",
"cwd": "apps/weblibre",
"request": "launch",
"type": "dart",
"args": [
"--device-user",
"0"
"0",
"--flavor",
"alpha"
]
},
{
"name": "app (profile mode)",
"cwd": "app",
"name": "WebLibre (profile mode)",
"cwd": "apps/weblibre",
"request": "launch",
"type": "dart",
"flutterMode": "profile",
"args": [
"--device-user",
"0"
"0",
"--flavor",
"alpha"
]
},
{
"name": "app (release mode)",
"cwd": "app",
"name": "WebLibre (release mode)",
"cwd": "apps/weblibre",
"request": "launch",
"type": "dart",
"flutterMode": "release",
"args": [
"--device-user",
"0"
]
},
{
"name": "flutter_mozilla_components",
"cwd": "packages/flutter_mozilla_components/example",
"request": "launch",
"type": "dart",
"args": [
"--device-user",
"0"
]
},
{
"name": "simple_intent_receiver",
"cwd": "packages/simple_intent_receiver/example",
"request": "launch",
"type": "dart",
"args": [
"--device-user",
"0"
"0",
"--flavor",
"alpha"
]
},
]
+14
View File
@@ -48,6 +48,20 @@ android {
versionName = flutterVersionName
}
flavorDimensions "track"
productFlavors {
stable {
dimension "track"
manifestPlaceholders = [appName: "WebLibre"]
}
alpha {
dimension "track"
applicationIdSuffix ".alpha"
versionNameSuffix "-alpha"
manifestPlaceholders = [appName: "WebLibre Alpha"]
}
}
dependencies {
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.glance:glance-appwidget:1.1.1'
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@@ -0,0 +1,14 @@
<?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>
<inset
android:drawable="@drawable/ic_launcher_foreground"
android:inset="25%" />
</foreground>
<monochrome>
<inset
android:drawable="@drawable/ic_launcher_monochrome"
android:inset="25%" />
</monochrome>
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FF000000</color>
</resources>
@@ -48,7 +48,7 @@
<application
android:label="WebLibre"
android:label="${appName}"
android:name=".MyApplication"
android:icon="@mipmap/launcher_icon"
android:usesCleartextTraffic="true"
@@ -78,10 +78,10 @@
<activity
android:name=".MainActivity"
android:label="WebLibre"
android:label="${appName}"
android:exported="true"
android:launchMode="singleTask"
android:taskAffinity="eu.weblibre.gecko.task"
android:taskAffinity="${applicationId}.task"
android:theme="@style/LaunchTheme"
android:supportsPictureInPicture="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

+45
View File
@@ -0,0 +1,45 @@
<svg width="147" height="147" viewBox="0 -20.5 147 147" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- 1. Blueprint Background (full-bleed square, matches icon.png canvas) -->
<rect x="0" y="-20.5" width="147" height="147" fill="#0A1128"/>
<!-- 2. Schematic Grid -->
<defs>
<pattern id="blueprintGrid" width="12" height="12" patternUnits="userSpaceOnUse">
<path d="M 12 0 L 0 0 0 12" fill="none" stroke="#162545" stroke-width="1"/>
</pattern>
</defs>
<rect x="0" y="-20.5" width="147" height="147" fill="url(#blueprintGrid)"/>
<!-- 3. Right Pillar (Grey - Back) -->
<path d="M146.187 4.16996C146.608 2.00885 144.953 0 142.751 0H116.196C114.521 0 113.081 1.18632 112.761 2.83005L93.5631 101.268C93.1417 103.429 94.7966 105.438 96.9984 105.438H123.554C125.229 105.438 126.669 104.251 126.989 102.608L146.187 4.16996Z"
fill="#A7A7A7" fill-opacity="0.1" stroke="#A7A7A7" stroke-width="1.5"/>
<circle cx="142.75" cy="0" r="1.5" fill="#0A1128" stroke="#A7A7A7" stroke-width="1"/>
<circle cx="116.19" cy="0" r="1.5" fill="#0A1128" stroke="#A7A7A7" stroke-width="1"/>
<circle cx="93.56" cy="101.26" r="1.5" fill="#0A1128" stroke="#A7A7A7" stroke-width="1"/>
<circle cx="123.55" cy="105.43" r="1.5" fill="#0A1128" stroke="#A7A7A7" stroke-width="1"/>
<!-- 4. Left Pillar (Purple - Back) -->
<path d="M0.813229 4.16996C0.391767 2.00885 2.04669 0 4.24852 0H30.8042C32.4789 0 33.9189 1.18632 34.2395 2.83005L53.4369 101.268C53.8583 103.429 52.2034 105.438 50.0016 105.438H23.4459C21.7712 105.438 20.3312 104.251 20.0106 102.608L0.813229 4.16996Z"
fill="#9C83F8" fill-opacity="0.1" stroke="#9C83F8" stroke-width="1.5"/>
<circle cx="4.24" cy="0" r="1.5" fill="#0A1128" stroke="#9C83F8" stroke-width="1"/>
<circle cx="30.80" cy="0" r="1.5" fill="#0A1128" stroke="#9C83F8" stroke-width="1"/>
<circle cx="53.43" cy="101.26" r="1.5" fill="#0A1128" stroke="#9C83F8" stroke-width="1"/>
<circle cx="23.44" cy="105.43" r="1.5" fill="#0A1128" stroke="#9C83F8" stroke-width="1"/>
<!-- 5. Center Arch (Yellow - Front) -->
<!-- Faint volume -->
<path d="M106.53 105.441C106.53 71.9717 98.6042 38.5029 74.1832 38.5029C49.7622 38.5029 41.124 71.3155 41.124 105.441"
stroke="#FBDC6B" stroke-opacity="0.15" stroke-width="33.6875" stroke-linecap="butt"/>
<!-- Dashed structural wireframe line -->
<path d="M106.53 105.441C106.53 71.9717 98.6042 38.5029 74.1832 38.5029C49.7622 38.5029 41.124 71.3155 41.124 105.441"
stroke="#FBDC6B" stroke-width="1.5" stroke-dasharray="4 4" fill="none"/>
<circle cx="106.53" cy="105.441" r="2" fill="#0A1128" stroke="#FBDC6B" stroke-width="1.5"/>
<circle cx="74.18" cy="38.5" r="2" fill="#0A1128" stroke="#FBDC6B" stroke-width="1.5"/>
<circle cx="41.12" cy="105.441" r="2" fill="#0A1128" stroke="#FBDC6B" stroke-width="1.5"/>
<!-- 6. Alpha Terminal Tag (Topmost Layer) -->
<g transform="translate(46, 82)">
<rect width="55" height="16" rx="4" fill="#0A1128" stroke="#FF6B00" stroke-width="1.5"/>
<text x="27.5" y="11.5" font-family="monospace, sans-serif" font-weight="bold" font-size="9" fill="#FF6B00" text-anchor="middle" letter-spacing="1">ALPHA</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

@@ -0,0 +1,7 @@
flutter_launcher_icons:
android: "launcher_icon"
image_path: "assets/icon/icon_alpha.png"
adaptive_icon_foreground: "assets/icon/icon_alpha.png"
adaptive_icon_monochrome: "assets/icon/icon_alpha.png"
adaptive_icon_foreground_inset: 25
adaptive_icon_background: "#FF000000"
+8 -2
View File
@@ -78,8 +78,14 @@ melos:
sh scripts/build-readability.sh
python3 scripts/build_quotes_db.py
build-browser:
description: Build release APK split per ABI
description: Build stable release APK split per ABI
run: |
set -e
cd apps/weblibre
flutter build apk --release --target-platform android-arm,android-arm64 --split-per-abi --no-tree-shake-icons
flutter build apk --release --flavor stable --target-platform android-arm,android-arm64 --split-per-abi --no-tree-shake-icons
build-browser-alpha:
description: Build alpha release APK split per ABI (side-by-side installable with stable)
run: |
set -e
cd apps/weblibre
flutter build apk --release --flavor alpha --target-platform android-arm,android-arm64 --split-per-abi --no-tree-shake-icons