Upgrade flutter engine to 3.0

This commit is contained in:
niuhuan 2022-05-18 11:49:21 +08:00
parent b1b020ed83
commit eb7e503b53
7 changed files with 71 additions and 27 deletions

View File

@ -6,7 +6,6 @@ on:
env: env:
go_version: '1.16' go_version: '1.16'
flutter_channel: 'stable' flutter_channel: 'stable'
flutter_version: '2.10.3'
GH_TOKEN: ${{ secrets.GH_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs: jobs:
@ -55,23 +54,40 @@ jobs:
config: config:
- target: linux - target: linux
host: ubuntu-latest host: ubuntu-latest
flutter_version: '3.0.0'
- target: windows - target: windows
host: windows-latest host: windows-latest
flutter_version: '3.0.0'
- target: macos - target: macos
host: macos-latest host: macos-latest
flutter_version: '3.0.0'
- target: ios - target: ios
host: macos-latest host: macos-latest
flutter_version: '3.0.0'
- target: android-arm32 - target: android-arm32
host: ubuntu-latest host: ubuntu-latest
flutter_version: '2.10.3'
- target: android-arm64 - target: android-arm64
host: ubuntu-latest host: ubuntu-latest
flutter_version: '2.10.3'
- target: android-x86_64 - target: android-x86_64
host: ubuntu-latest host: ubuntu-latest
flutter_version: '2.10.3'
- target: android-arm32
host: ubuntu-latest
flutter_version: '3.0.0'
- target: android-arm64
host: ubuntu-latest
flutter_version: '3.0.0'
- target: android-x86_64
host: ubuntu-latest
flutter_version: '3.0.0'
runs-on: ${{ matrix.config.host }} runs-on: ${{ matrix.config.host }}
env: env:
TARGET: ${{ matrix.config.target }} TARGET: ${{ matrix.config.target }}
flutter_version: ${{ matrix.config.flutter_version }}
steps: steps:
- name: Checkout - name: Checkout

View File

@ -35,27 +35,33 @@ func main() {
version.Info = strings.TrimSpace(string(infoFile)) version.Info = strings.TrimSpace(string(infoFile))
// get target // get target
target := os.Getenv("TARGET") target := os.Getenv("TARGET")
if ghToken == "" { if target == "" {
println("Env ${TARGET} is not set") println("Env ${TARGET} is not set")
os.Exit(1) os.Exit(1)
} }
// get target
flutterVersion := os.Getenv("flutter_version")
if target == "" {
println("Env ${flutter_version} is not set")
os.Exit(1)
}
// //
var releaseFileName string var releaseFileName string
switch target { switch target {
case "macos": case "macos":
releaseFileName = fmt.Sprintf("pikapika-%v-macos-intel.dmg", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-macos-intel.dmg", version.Code, flutterVersion)
case "ios": case "ios":
releaseFileName = fmt.Sprintf("pikapika-%v-ios-nosign.ipa", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-ios-nosign.ipa", version.Code, flutterVersion)
case "windows": case "windows":
releaseFileName = fmt.Sprintf("pikapika-%v-windows-x86_64.zip", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-windows-x86_64.zip", version.Code, flutterVersion)
case "linux": case "linux":
releaseFileName = fmt.Sprintf("pikapika-%v-linux-x86_64.AppImage", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-linux-x86_64.AppImage", version.Code, flutterVersion)
case "android-arm32": case "android-arm32":
releaseFileName = fmt.Sprintf("pikapika-%v-android-arm32.apk", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-android-arm32.apk", version.Code, flutterVersion)
case "android-arm64": case "android-arm64":
releaseFileName = fmt.Sprintf("pikapika-%v-android-arm64.apk", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-android-arm64.apk", version.Code, flutterVersion)
case "android-x86_64": case "android-x86_64":
releaseFileName = fmt.Sprintf("pikapika-%v-android-x86_64.apk", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-android-x86_64.apk", version.Code, flutterVersion)
} }
// get version // get version
getReleaseRequest, err := http.NewRequest( getReleaseRequest, err := http.NewRequest(

View File

@ -36,10 +36,16 @@ func main() {
version.Info = strings.TrimSpace(string(infoFile)) version.Info = strings.TrimSpace(string(infoFile))
// get target // get target
target := os.Getenv("TARGET") target := os.Getenv("TARGET")
if ghToken == "" { if target == "" {
println("Env ${TARGET} is not set") println("Env ${TARGET} is not set")
os.Exit(1) os.Exit(1)
} }
// get target
flutterVersion := os.Getenv("flutter_version")
if target == "" {
println("Env ${flutter_version} is not set")
os.Exit(1)
}
// //
var releaseFilePath string var releaseFilePath string
var releaseFileName string var releaseFileName string
@ -48,31 +54,31 @@ func main() {
switch target { switch target {
case "macos": case "macos":
releaseFilePath = "build/build.dmg" releaseFilePath = "build/build.dmg"
releaseFileName = fmt.Sprintf("pikapika-%v-macos-intel.dmg", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-macos-intel.dmg", version.Code, flutterVersion)
contentType = "application/octet-stream" contentType = "application/octet-stream"
case "ios": case "ios":
releaseFilePath = "build/nosign.ipa" releaseFilePath = "build/nosign.ipa"
releaseFileName = fmt.Sprintf("pikapika-%v-ios-nosign.ipa", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-ios-nosign.ipa", version.Code, flutterVersion)
contentType = "application/octet-stream" contentType = "application/octet-stream"
case "windows": case "windows":
releaseFilePath = "build/build.zip" releaseFilePath = "build/build.zip"
releaseFileName = fmt.Sprintf("pikapika-%v-windows-x86_64.zip", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-windows-x86_64.zip", version.Code, flutterVersion)
contentType = "application/octet-stream" contentType = "application/octet-stream"
case "linux": case "linux":
releaseFilePath = "build/build.AppImage" releaseFilePath = "build/build.AppImage"
releaseFileName = fmt.Sprintf("pikapika-%v-linux-x86_64.AppImage", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-linux-x86_64.AppImage", version.Code, flutterVersion)
contentType = "application/octet-stream" contentType = "application/octet-stream"
case "android-arm32": case "android-arm32":
releaseFilePath = "build/app/outputs/flutter-apk/app-release.apk" releaseFilePath = "build/app/outputs/flutter-apk/app-release.apk"
releaseFileName = fmt.Sprintf("pikapika-%v-android-arm32.apk", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-android-arm32.apk", version.Code, flutterVersion)
contentType = "application/octet-stream" contentType = "application/octet-stream"
case "android-arm64": case "android-arm64":
releaseFilePath = "build/app/outputs/flutter-apk/app-release.apk" releaseFilePath = "build/app/outputs/flutter-apk/app-release.apk"
releaseFileName = fmt.Sprintf("pikapika-%v-android-arm64.apk", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-android-arm64.apk", version.Code, flutterVersion)
contentType = "application/octet-stream" contentType = "application/octet-stream"
case "android-x86_64": case "android-x86_64":
releaseFilePath = "build/app/outputs/flutter-apk/app-release.apk" releaseFilePath = "build/app/outputs/flutter-apk/app-release.apk"
releaseFileName = fmt.Sprintf("pikapika-%v-android-x86_64.apk", version.Code) releaseFileName = fmt.Sprintf("pikapika-%v-flutter_%v-android-x86_64.apk", version.Code, flutterVersion)
contentType = "application/octet-stream" contentType = "application/octet-stream"
} }
releaseFilePath = path.Join("..", releaseFilePath) releaseFilePath = path.Join("..", releaseFilePath)

View File

@ -211,7 +211,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
}, },
), ),
], ],
) );
}, },
); );
if (result != null) { if (result != null) {

View File

@ -6,6 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_linux url_launcher_linux
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES) set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST}) foreach(plugin ${FLUTTER_PLUGIN_LIST})
@ -14,3 +17,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin) endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)

View File

@ -63,7 +63,7 @@ packages:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.15.0" version: "1.16.0"
crop_image: crop_image:
dependency: "direct main" dependency: "direct main"
description: description:
@ -105,7 +105,7 @@ packages:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.3.0"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
@ -265,7 +265,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.3" version: "0.6.4"
lints: lints:
dependency: transitive dependency: transitive
description: description:
@ -286,7 +286,7 @@ packages:
name: material_color_utilities name: material_color_utilities
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.3" version: "0.1.4"
meta: meta:
dependency: transitive dependency: transitive
description: description:
@ -314,7 +314,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.0" version: "1.8.1"
path_drawing: path_drawing:
dependency: transitive dependency: transitive
description: description:
@ -389,7 +389,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.8.2"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -424,7 +424,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.8" version: "0.4.9"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -494,7 +494,7 @@ packages:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
win32: win32:
dependency: transitive dependency: transitive
description: description:
@ -510,5 +510,5 @@ packages:
source: hosted source: hosted
version: "5.3.1" version: "5.3.1"
sdks: sdks:
dart: ">=2.15.1 <3.0.0" dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.10.0" flutter: ">=2.10.0"

View File

@ -6,6 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_windows url_launcher_windows
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES) set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST}) foreach(plugin ${FLUTTER_PLUGIN_LIST})
@ -14,3 +17,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin) endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)