Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-03-05 15:22:31 +08:00
parent 9b145b525a
commit 0bcc1a7f12
10 changed files with 92 additions and 93 deletions

View File

@@ -78,31 +78,9 @@ jobs:
flutter-version-file: pubspec.yaml flutter-version-file: pubspec.yaml
cache: true cache: true
- name: revert new overscrollindicator - name: Apply Patch
working-directory: ${{ env.FLUTTER_ROOT }} shell: pwsh
# https://github.com/flutter/flutter/issues/182281 run: lib/scripts/patch.ps1 android
run: |
git config --global user.name "ci"
git config --global user.email "example@example.com"
git stash || true
git revert 362b1de29974ffc1ed6faa826e1df870d7bec75f --no-edit
git reset --soft HEAD~1
git stash pop || true
continue-on-error: true
- name: apply bottom sheet patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/bottom_sheet_patch.diff || true
continue-on-error: true
- name: apply modal barrier patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
continue-on-error: true
- name: apply mouse cursor patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
continue-on-error: true continue-on-error: true
- name: Write key - name: Write key
@@ -120,10 +98,10 @@ jobs:
shell: pwsh shell: pwsh
run: lib/scripts/build.ps1 android run: lib/scripts/build.ps1 android
- name: flutter build apk - name: Flutter Build Apk
run: flutter build apk --release --split-per-abi --dart-define-from-file=pili_release.json --pub run: flutter build apk --release --split-per-abi --dart-define-from-file=pili_release.json --pub
- name: rename - name: Rename
run: | run: |
for file in build/app/outputs/flutter-apk/app-*-release.apk; do for file in build/app/outputs/flutter-apk/app-*-release.apk; do
abi=$(echo "$file" | sed -E 's|.*app-(.*)-release\.apk|\1|') abi=$(echo "$file" | sed -E 's|.*app-(.*)-release\.apk|\1|')

View File

@@ -30,14 +30,9 @@ jobs:
shell: pwsh shell: pwsh
run: lib/scripts/build.ps1 run: lib/scripts/build.ps1
- name: apply modal barrier patch - name: Apply Patch
working-directory: ${{ env.FLUTTER_ROOT }} shell: pwsh
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true run: lib/scripts/patch.ps1 iOS
continue-on-error: true
- name: apply mouse cursor patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
continue-on-error: true continue-on-error: true
- name: Build iOS - name: Build iOS

View File

@@ -51,25 +51,9 @@ jobs:
shell: pwsh shell: pwsh
run: lib/scripts/build.ps1 run: lib/scripts/build.ps1
- name: pick tooltip fix - name: Apply Patch
working-directory: ${{ env.FLUTTER_ROOT }} shell: pwsh
run: | run: lib/scripts/patch.ps1 Linux
git config --global user.name "ci"
git config --global user.email "example@example.com"
git stash || true
git cherry-pick 56956c33ef102ac0b5fc46b62bd2dd9f50a86616 --no-edit
git reset --soft HEAD~1
git stash pop || true
continue-on-error: true
- name: apply modal barrier patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
continue-on-error: true
- name: apply mouse cursor patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
continue-on-error: true continue-on-error: true
#TODO: deb and rpm packages need to be build #TODO: deb and rpm packages need to be build

View File

@@ -30,25 +30,9 @@ jobs:
shell: pwsh shell: pwsh
run: lib/scripts/build.ps1 run: lib/scripts/build.ps1
- name: pick tooltip fix - name: Apply Patch
working-directory: ${{ env.FLUTTER_ROOT }} shell: pwsh
run: | run: lib/scripts/patch.ps1 macOS
git config --global user.name "ci"
git config --global user.email "example@example.com"
git stash || true
git cherry-pick 56956c33ef102ac0b5fc46b62bd2dd9f50a86616 --no-edit
git reset --soft HEAD~1
git stash pop || true
continue-on-error: true
- name: apply modal barrier patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
continue-on-error: true
- name: apply mouse cursor patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
continue-on-error: true continue-on-error: true
- name: Build Mac - name: Build Mac

View File

@@ -26,27 +26,9 @@ jobs:
channel: stable channel: stable
flutter-version-file: pubspec.yaml flutter-version-file: pubspec.yaml
- name: pick tooltip fix - name: Apply Patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: |
git config --global user.name "ci"
git config --global user.email "example@example.com"
git stash || true
git cherry-pick 56956c33ef102ac0b5fc46b62bd2dd9f50a86616 --no-edit
git reset --soft HEAD~1
git stash pop || true
continue-on-error: true
- name: apply modal barrier patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $env:GITHUB_WORKSPACE\lib\scripts\modal_barrier_patch.diff || true
shell: pwsh
continue-on-error: true
- name: apply mouse cursor patch
working-directory: ${{ env.FLUTTER_ROOT }}
run: git apply $env:GITHUB_WORKSPACE\lib\scripts\mouse_cursor_patch.diff || true
shell: pwsh shell: pwsh
run: lib/scripts/patch.ps1 windows
continue-on-error: true continue-on-error: true
- name: Add fastforge and Inno Setup - name: Add fastforge and Inno Setup

View File

@@ -95,6 +95,9 @@ class RenderLoadingIndicator extends RenderBox {
final radius = size.width / 2 - strokeWidth; final radius = size.width / 2 - strokeWidth;
final center = size.center(.zero); final center = size.center(.zero);
// TODO: remove
// https://github.com/flutter/flutter/issues/182708
// https://github.com/flutter/flutter/issues/183083
if (Platform.isIOS) { if (Platform.isIOS) {
context.canvas context.canvas
..drawCircle( ..drawCircle(

73
lib/scripts/patch.ps1 Normal file
View File

@@ -0,0 +1,73 @@
param(
[string]$platform = ""
)
# TODO: remove
# https://github.com/flutter/flutter/issues/182468
$ToolTipFix = "56956c33ef102ac0b5fc46b62bd2dd9f50a86616";
# TODO: remove
# https://github.com/flutter/flutter/issues/182281
$NewOverScrollIndicator = "362b1de29974ffc1ed6faa826e1df870d7bec75f";
$BottomSheetPatch = "lib/scripts/bottom_sheet.patch"
# TODO: remove
# https://github.com/flutter/flutter/issues/90223
$ModalBarrierPatch = "lib/scripts/modal_barrier.patch"
# TODO: remove
# https://github.com/flutter/flutter/issues/182466
$MouseCursorPatch = "lib/scripts/mouse_cursor.patch"
Set-Location $env:FLUTTER_ROOT
$picks = @()
$reverts = @()
$patches = @($ModalBarrierPatch, $MouseCursorPatch)
switch ($platform.ToLower()) {
"android" {
$reverts += $NewOverScrollIndicator
$patches += $BottomSheetPatch
}
"ios" {}
"linux" {
$picks += $ToolTipFix
}
"macos" {
$picks += $ToolTipFix
}
"windows" {
$picks += $ToolTipFix
}
default {}
}
git config --global user.name "ci"
git config --global user.email "example@example.com"
foreach ($pick in $picks) {
git stash
git cherry-pick $pick --no-edit
if ($LASTEXITCODE -eq 0) {
git reset --soft HEAD~1
Write-Host "$pick picked"
}
git stash pop
}
foreach ($revert in $reverts) {
git stash
git revert $revert --no-edit
if ($LASTEXITCODE -eq 0) {
git reset --soft HEAD~1
Write-Host "$revert reverted"
}
git stash pop
}
foreach ($patch in $patches) {
git apply "$env:GITHUB_WORKSPACE/$patch"
if ($LASTEXITCODE -eq 0) {
Write-Host "$patch applied"
}
}