Update for flutter 3.3.0 (#130)

Signed-off-by: Hidenori Matsubayashi <[email protected]>
This commit is contained in:
Hidenori Matsubayashi
2022-09-02 20:35:29 +09:00
committed by GitHub
parent 7a050f90a7
commit 392c64b34a
10 changed files with 42 additions and 32 deletions
+1 -1
View File
@@ -1 +1 @@
e85ea0e79c6d894c120cda4ee8ee10fe6745e187 5e9e0e0aa8be4ff69facadd706b713f0bb54d5b3
+1 -1
View File
@@ -1 +1 @@
f1875d570e39de09040c8f79aa13cc56baab8db1 ffccd96b62ee8cec7740dab303538c5fc26ac543
+2 -2
View File
@@ -89,7 +89,7 @@ function update_flutter_elinux() {
echo "Compiling flutter-elinux..." echo "Compiling flutter-elinux..."
"$DART_EXE" --disable-dart-dev --no-enable-mirrors \ "$DART_EXE" --disable-dart-dev --no-enable-mirrors \
--snapshot="$SNAPSHOT_PATH" --packages="$ROOT_DIR/.packages" \ --snapshot="$SNAPSHOT_PATH" --packages="$ROOT_DIR/.dart_tool/package_config.json" \
"$ROOT_DIR/bin/flutter_elinux.dart" "$ROOT_DIR/bin/flutter_elinux.dart"
echo "$revision" > "$stamp_path" echo "$revision" > "$stamp_path"
@@ -97,5 +97,5 @@ function update_flutter_elinux() {
} }
function exec_snapshot() { function exec_snapshot() {
"$DART_EXE" --disable-dart-dev --packages="$ROOT_DIR/.packages" "$SNAPSHOT_PATH" "$@" "$DART_EXE" --disable-dart-dev --packages="$ROOT_DIR/.dart_tool/package_config.json" "$SNAPSHOT_PATH" "$@"
} }
+5 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2021 Sony Group Corporation. All rights reserved. // Copyright 2022 Sony Group Corporation. All rights reserved.
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved. // Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
@@ -7,6 +7,7 @@
import 'package:flutter_tools/src/commands/analyze.dart'; import 'package:flutter_tools/src/commands/analyze.dart';
import 'package:flutter_tools/src/globals.dart' as globals; import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/project_validator.dart';
import '../elinux_plugins.dart'; import '../elinux_plugins.dart';
@@ -20,5 +21,8 @@ class ELinuxAnalyzeCommand extends AnalyzeCommand with ELinuxExtension {
logger: globals.logger, logger: globals.logger,
terminal: globals.terminal, terminal: globals.terminal,
artifacts: globals.artifacts, artifacts: globals.artifacts,
allProjectValidators: <ProjectValidator>[
GeneralInfoProjectValidator()
],
); );
} }
+1 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2021 Sony Group Corporation. All rights reserved. // Copyright 2022 Sony Group Corporation. All rights reserved.
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved. // Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
@@ -33,7 +33,6 @@ class BuildPackageCommand extends BuildSubCommand
BuildPackageCommand({bool verboseHelp = false}) BuildPackageCommand({bool verboseHelp = false})
: super(verboseHelp: verboseHelp) { : super(verboseHelp: verboseHelp) {
addCommonDesktopBuildOptions(verboseHelp: verboseHelp); addCommonDesktopBuildOptions(verboseHelp: verboseHelp);
usesBuildNameOption();
argParser.addOption( argParser.addOption(
'target-arch', 'target-arch',
defaultsTo: _getCurrentHostPlatformArchName(), defaultsTo: _getCurrentHostPlatformArchName(),
+10 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2021 Sony Group Corporation. All rights reserved. // Copyright 2022 Sony Group Corporation. All rights reserved.
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved. // Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
// Copyright 2014 The Flutter Authors. All rights reserved. // Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
@@ -8,10 +8,10 @@
import 'dart:io'; import 'dart:io';
import 'package:file/file.dart';
import 'package:flutter_tools/src/base/common.dart'; import 'package:flutter_tools/src/base/common.dart';
import 'package:flutter_tools/src/base/file_system.dart'; import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/terminal.dart'; import 'package:flutter_tools/src/base/terminal.dart';
import 'package:flutter_tools/src/base/utils.dart';
import 'package:flutter_tools/src/cache.dart'; import 'package:flutter_tools/src/cache.dart';
import 'package:flutter_tools/src/commands/create.dart'; import 'package:flutter_tools/src/commands/create.dart';
import 'package:flutter_tools/src/flutter_project_metadata.dart'; import 'package:flutter_tools/src/flutter_project_metadata.dart';
@@ -108,10 +108,18 @@ class ELinuxCreateCommand extends CreateCommand {
'Make sure your $relativePluginPath/pubspec.yaml contains the following lines.', 'Make sure your $relativePluginPath/pubspec.yaml contains the following lines.',
color: TerminalColor.yellow, color: TerminalColor.yellow,
); );
final String dartSdk = globals.cache.dartSdkBuild;
// The dart project_name is in snake_case, this variable is the Title Case of the Project Name.
final String titleCaseProjectName = snakeCaseToTitleCase(projectName);
final Map<String, Object> templateContext = createTemplateContext( final Map<String, Object> templateContext = createTemplateContext(
organization: '', organization: '',
projectName: projectName, projectName: projectName,
flutterRoot: '', flutterRoot: '',
titleCaseProjectName: titleCaseProjectName,
dartSdkVersionBounds: "'>=$dartSdk <3.0.0'",
); );
globals.printStatus( globals.printStatus(
'\nflutter:\n' '\nflutter:\n'
+13 -12
View File
@@ -1,4 +1,4 @@
// Copyright 2021 Sony Group Corporation. All rights reserved. // Copyright 2022 Sony Group Corporation. All rights reserved.
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved. // Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
// Copyright 2014 The Flutter Authors. All rights reserved. // Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
@@ -8,7 +8,6 @@
import 'dart:io'; import 'dart:io';
import 'package:file/file.dart';
import 'package:flutter_tools/src/artifacts.dart'; import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/common.dart'; import 'package:flutter_tools/src/base/common.dart';
import 'package:flutter_tools/src/base/file_system.dart'; import 'package:flutter_tools/src/base/file_system.dart';
@@ -18,7 +17,6 @@ import 'package:flutter_tools/src/build_info.dart';
import 'package:flutter_tools/src/build_system/build_system.dart'; import 'package:flutter_tools/src/build_system/build_system.dart';
import 'package:flutter_tools/src/build_system/depfile.dart'; import 'package:flutter_tools/src/build_system/depfile.dart';
import 'package:flutter_tools/src/build_system/exceptions.dart'; import 'package:flutter_tools/src/build_system/exceptions.dart';
import 'package:flutter_tools/src/build_system/source.dart';
import 'package:flutter_tools/src/build_system/targets/android.dart'; import 'package:flutter_tools/src/build_system/targets/android.dart';
import 'package:flutter_tools/src/build_system/targets/assets.dart'; import 'package:flutter_tools/src/build_system/targets/assets.dart';
import 'package:flutter_tools/src/build_system/targets/common.dart'; import 'package:flutter_tools/src/build_system/targets/common.dart';
@@ -36,7 +34,9 @@ import 'elinux_plugins.dart';
/// ///
/// Source: [AndroidAssetBundle] in `android.dart` /// Source: [AndroidAssetBundle] in `android.dart`
abstract class ELinuxAssetBundle extends Target { abstract class ELinuxAssetBundle extends Target {
const ELinuxAssetBundle(); const ELinuxAssetBundle(this.buildInfo);
final ELinuxBuildInfo buildInfo;
@override @override
String get name => 'elinux_asset_bundle'; String get name => 'elinux_asset_bundle';
@@ -87,10 +87,14 @@ abstract class ELinuxAssetBundle extends Target {
.file(isolateSnapshotData) .file(isolateSnapshotData)
.copySync(outputDirectory.childFile('isolate_snapshot_data').path); .copySync(outputDirectory.childFile('isolate_snapshot_data').path);
} }
final TargetPlatform tp = buildInfo.targetArch == 'arm64'
? TargetPlatform.linux_arm64
: TargetPlatform.linux_x64;
final Depfile assetDepfile = await copyAssets( final Depfile assetDepfile = await copyAssets(
environment, environment,
outputDirectory, outputDirectory,
targetPlatform: null, // corresponds to flutter-tester targetPlatform: tp,
buildMode: buildMode,
); );
final DepfileService depfileService = DepfileService( final DepfileService depfileService = DepfileService(
fileSystem: environment.fileSystem, fileSystem: environment.fileSystem,
@@ -105,9 +109,7 @@ abstract class ELinuxAssetBundle extends Target {
/// Source: [DebugAndroidApplication] in `android.dart` /// Source: [DebugAndroidApplication] in `android.dart`
class DebugELinuxApplication extends ELinuxAssetBundle { class DebugELinuxApplication extends ELinuxAssetBundle {
DebugELinuxApplication(this.buildInfo); DebugELinuxApplication(ELinuxBuildInfo buildInfo) : super(buildInfo);
final ELinuxBuildInfo buildInfo;
@override @override
String get name => 'debug_elinux_application'; String get name => 'debug_elinux_application';
@@ -138,9 +140,7 @@ class DebugELinuxApplication extends ELinuxAssetBundle {
/// See: [ReleaseAndroidApplication] in `android.dart` /// See: [ReleaseAndroidApplication] in `android.dart`
class ReleaseELinuxApplication extends ELinuxAssetBundle { class ReleaseELinuxApplication extends ELinuxAssetBundle {
ReleaseELinuxApplication(this.buildInfo); ReleaseELinuxApplication(ELinuxBuildInfo buildInfo) : super(buildInfo);
final ELinuxBuildInfo buildInfo;
@override @override
String get name => 'release_elinux_application'; String get name => 'release_elinux_application';
@@ -345,7 +345,8 @@ class NativeBundle {
globals.fs.path.dirname(globals.fs.path.dirname(engineOutPath)); globals.fs.path.dirname(globals.fs.path.dirname(engineOutPath));
environment['LOCAL_ENGINE'] = globals.fs.path.basename(engineOutPath); environment['LOCAL_ENGINE'] = globals.fs.path.basename(engineOutPath);
} }
writeGeneratedCmakeConfig(Cache.flutterRoot, eLinuxProject, environment); writeGeneratedCmakeConfig(
Cache.flutterRoot, eLinuxProject, buildInfo.buildInfo, environment);
await refreshELinuxPluginsList(eLinuxProject.parent); await refreshELinuxPluginsList(eLinuxProject.parent);
} }
+1 -7
View File
@@ -1,4 +1,4 @@
// Copyright 2021 Sony Group Corporation. All rights reserved. // Copyright 2022 Sony Group Corporation. All rights reserved.
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved. // Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
// Copyright 2014 The Flutter Authors. All rights reserved. // Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
@@ -22,7 +22,6 @@ import 'package:flutter_tools/src/flutter_device_manager.dart';
import 'package:flutter_tools/src/fuchsia/fuchsia_workflow.dart'; import 'package:flutter_tools/src/fuchsia/fuchsia_workflow.dart';
import 'package:flutter_tools/src/globals.dart' as globals; import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/macos/macos_workflow.dart'; import 'package:flutter_tools/src/macos/macos_workflow.dart';
import 'package:flutter_tools/src/windows/uwptool.dart';
import 'package:flutter_tools/src/windows/windows_workflow.dart'; import 'package:flutter_tools/src/windows/windows_workflow.dart';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:process/process.dart'; import 'package:process/process.dart';
@@ -61,11 +60,6 @@ class ELinuxDeviceManager extends FlutterDeviceManager {
logger: globals.logger, logger: globals.logger,
platform: globals.platform, platform: globals.platform,
), ),
uwptool: UwpTool(
artifacts: globals.artifacts,
logger: globals.logger,
processManager: globals.processManager,
),
); );
final ELinuxDeviceDiscovery _eLinuxDeviceDiscovery = ELinuxDeviceDiscovery( final ELinuxDeviceDiscovery _eLinuxDeviceDiscovery = ELinuxDeviceDiscovery(
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2021 Sony Group Corporation. All rights reserved. // Copyright 2022 Sony Group Corporation. All rights reserved.
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved. // Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
@@ -21,7 +21,7 @@ ELinuxWorkflow get eLinuxWorkflow => context.get<ELinuxWorkflow>();
ELinuxValidator get eLinuxValidator => context.get<ELinuxValidator>(); ELinuxValidator get eLinuxValidator => context.get<ELinuxValidator>();
/// See: [_DefaultDoctorValidatorsProvider] in `doctor.dart` /// See: [_DefaultDoctorValidatorsProvider] in `doctor.dart`
class ELinuxDoctorValidatorsProvider extends DoctorValidatorsProvider { class ELinuxDoctorValidatorsProvider implements DoctorValidatorsProvider {
@override @override
List<DoctorValidator> get validators { List<DoctorValidator> get validators {
final List<DoctorValidator> validators = final List<DoctorValidator> validators =
+6 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2021 Sony Group Corporation. All rights reserved. // Copyright 2022 Sony Group Corporation. All rights reserved.
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved. // Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
// Copyright 2014 The Flutter Authors. All rights reserved. // Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
@@ -678,7 +678,11 @@ void _createPlatformPluginSymlinks(
try { try {
link.createSync(path); link.createSync(path);
} on FileSystemException catch (e) { } on FileSystemException catch (e) {
handleSymlinkException(e, platform: globals.platform, os: globals.os); handleSymlinkException(e,
platform: globals.platform,
os: globals.os,
destination: 'dest',
source: 'source');
rethrow; rethrow;
} }
} }