diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ef91dd5..549c7559 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -147,9 +147,13 @@ jobs: IPTPROXY_SOURCE: ${{ runner.temp }}/IPtProxy run: melos run build-go-runtime --no-select - - name: Build APK (Alpha) + - name: Build APK (Alpha, Impeller) if: steps.build-type.outputs.is_prerelease == 'true' - run: melos run build-browser-alpha --no-select + run: melos run build-browser-alpha-impeller --no-select + + - name: Build APK (Alpha, Legacy renderer) + if: steps.build-type.outputs.is_prerelease == 'true' + run: melos run build-browser-alpha-legacy --no-select - name: Build APK (Stable) if: steps.build-type.outputs.is_prerelease == 'false' @@ -164,7 +168,7 @@ jobs: if: steps.build-type.outputs.is_prerelease == 'true' uses: ncipollo/release-action@v1.17.0 with: - artifacts: "apps/weblibre/build/app/outputs/apk/alpha/release/*.apk" + artifacts: "apps/weblibre/build/app/outputs/apk/alphaImpeller/release/*.apk,apps/weblibre/build/app/outputs/apk/alphaLegacy/release/*.apk" prerelease: true - name: Create github artifact release (Full) diff --git a/apps/weblibre/android/app/build.gradle b/apps/weblibre/android/app/build.gradle index a98bdeaa..2c2463ab 100644 --- a/apps/weblibre/android/app/build.gradle +++ b/apps/weblibre/android/app/build.gradle @@ -43,6 +43,10 @@ android { targetSdk = 37 versionCode = flutterVersionCode.toInteger() versionName = flutterVersionName + // Whether the Flutter engine renders via Impeller or the legacy Skia + // backend. Read by io.flutter.embedding.android.EnableImpeller in + // AndroidManifest.xml. Overridden per-flavor below. + manifestPlaceholders = [enableImpeller: "true"] } flavorDimensions "track" @@ -51,11 +55,32 @@ android { dimension "track" manifestPlaceholders = [appName: "WebLibre"] } - alpha { + // Same alpha release slot (applicationId/versionName suffix), split into + // two variants so Impeller and the legacy Skia renderer can be compared + // side by side. The renderer is chosen at Flutter engine startup via a + // manifest meta-data flag and cannot be switched at runtime, hence two + // separate builds rather than a single toggle. + alphaImpeller { dimension "track" applicationIdSuffix ".alpha" versionNameSuffix "-alpha" - manifestPlaceholders = [appName: "WebLibre Alpha"] + manifestPlaceholders = [appName: "WebLibre Alpha", enableImpeller: "true"] + } + alphaLegacy { + dimension "track" + applicationIdSuffix ".alpha" + versionNameSuffix "-alpha" + manifestPlaceholders = [appName: "WebLibre Alpha (Legacy)", enableImpeller: "false"] + } + } + + sourceSets { + // Both alpha variants share the existing alpha launcher icon/branding. + alphaImpeller { + res.srcDirs += 'src/alpha/res' + } + alphaLegacy { + res.srcDirs += 'src/alpha/res' } } diff --git a/apps/weblibre/android/app/src/main/AndroidManifest.xml b/apps/weblibre/android/app/src/main/AndroidManifest.xml index bbf44ffb..fe525953 100644 --- a/apps/weblibre/android/app/src/main/AndroidManifest.xml +++ b/apps/weblibre/android/app/src/main/AndroidManifest.xml @@ -271,7 +271,7 @@ + android:value="${enableImpeller}" />