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

View File

@ -35,27 +35,33 @@ func main() {
version.Info = strings.TrimSpace(string(infoFile))
// get target
target := os.Getenv("TARGET")
if ghToken == "" {
if target == "" {
println("Env ${TARGET} is not set")
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
switch target {
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":
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":
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":
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":
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":
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":
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
getReleaseRequest, err := http.NewRequest(

View File

@ -36,10 +36,16 @@ func main() {
version.Info = strings.TrimSpace(string(infoFile))
// get target
target := os.Getenv("TARGET")
if ghToken == "" {
if target == "" {
println("Env ${TARGET} is not set")
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 releaseFileName string
@ -48,31 +54,31 @@ func main() {
switch target {
case "macos":
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"
case "ios":
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"
case "windows":
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"
case "linux":
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"
case "android-arm32":
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"
case "android-arm64":
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"
case "android-x86_64":
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"
}
releaseFilePath = path.Join("..", releaseFilePath)

View File

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

View File

@ -6,6 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_linux
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES)
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 ${${plugin}_bundled_libraries})
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
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
version: "1.16.0"
crop_image:
dependency: "direct main"
description:
@ -105,7 +105,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0"
ffi:
dependency: transitive
description:
@ -265,7 +265,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
version: "0.6.4"
lints:
dependency: transitive
description:
@ -286,7 +286,7 @@ packages:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
version: "0.1.4"
meta:
dependency: transitive
description:
@ -314,7 +314,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
path_drawing:
dependency: transitive
description:
@ -389,7 +389,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
@ -424,7 +424,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.8"
version: "0.4.9"
typed_data:
dependency: transitive
description:
@ -494,7 +494,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "2.1.2"
win32:
dependency: transitive
description:
@ -510,5 +510,5 @@ packages:
source: hosted
version: "5.3.1"
sdks:
dart: ">=2.15.1 <3.0.0"
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.10.0"

View File

@ -6,6 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_windows
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES)
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 ${${plugin}_bundled_libraries})
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)