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..."
"$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"
echo "$revision" > "$stamp_path"
@@ -97,5 +97,5 @@ function update_flutter_elinux() {
}
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.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,6 +7,7 @@
import 'package:flutter_tools/src/commands/analyze.dart';
import 'package:flutter_tools/src/globals.dart' as globals;
import 'package:flutter_tools/src/project_validator.dart';
import '../elinux_plugins.dart';
@@ -20,5 +21,8 @@ class ELinuxAnalyzeCommand extends AnalyzeCommand with ELinuxExtension {
logger: globals.logger,
terminal: globals.terminal,
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.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -33,7 +33,6 @@ class BuildPackageCommand extends BuildSubCommand
BuildPackageCommand({bool verboseHelp = false})
: super(verboseHelp: verboseHelp) {
addCommonDesktopBuildOptions(verboseHelp: verboseHelp);
usesBuildNameOption();
argParser.addOption(
'target-arch',
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 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
@@ -8,10 +8,10 @@
import 'dart:io';
import 'package:file/file.dart';
import 'package:flutter_tools/src/base/common.dart';
import 'package:flutter_tools/src/base/file_system.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/commands/create.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.',
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(
organization: '',
projectName: projectName,
flutterRoot: '',
titleCaseProjectName: titleCaseProjectName,
dartSdkVersionBounds: "'>=$dartSdk <3.0.0'",
);
globals.printStatus(
'\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 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
@@ -8,7 +8,6 @@
import 'dart:io';
import 'package:file/file.dart';
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/base/common.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/depfile.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/assets.dart';
import 'package:flutter_tools/src/build_system/targets/common.dart';
@@ -36,7 +34,9 @@ import 'elinux_plugins.dart';
///
/// Source: [AndroidAssetBundle] in `android.dart`
abstract class ELinuxAssetBundle extends Target {
const ELinuxAssetBundle();
const ELinuxAssetBundle(this.buildInfo);
final ELinuxBuildInfo buildInfo;
@override
String get name => 'elinux_asset_bundle';
@@ -87,10 +87,14 @@ abstract class ELinuxAssetBundle extends Target {
.file(isolateSnapshotData)
.copySync(outputDirectory.childFile('isolate_snapshot_data').path);
}
final TargetPlatform tp = buildInfo.targetArch == 'arm64'
? TargetPlatform.linux_arm64
: TargetPlatform.linux_x64;
final Depfile assetDepfile = await copyAssets(
environment,
outputDirectory,
targetPlatform: null, // corresponds to flutter-tester
targetPlatform: tp,
buildMode: buildMode,
);
final DepfileService depfileService = DepfileService(
fileSystem: environment.fileSystem,
@@ -105,9 +109,7 @@ abstract class ELinuxAssetBundle extends Target {
/// Source: [DebugAndroidApplication] in `android.dart`
class DebugELinuxApplication extends ELinuxAssetBundle {
DebugELinuxApplication(this.buildInfo);
final ELinuxBuildInfo buildInfo;
DebugELinuxApplication(ELinuxBuildInfo buildInfo) : super(buildInfo);
@override
String get name => 'debug_elinux_application';
@@ -138,9 +140,7 @@ class DebugELinuxApplication extends ELinuxAssetBundle {
/// See: [ReleaseAndroidApplication] in `android.dart`
class ReleaseELinuxApplication extends ELinuxAssetBundle {
ReleaseELinuxApplication(this.buildInfo);
final ELinuxBuildInfo buildInfo;
ReleaseELinuxApplication(ELinuxBuildInfo buildInfo) : super(buildInfo);
@override
String get name => 'release_elinux_application';
@@ -345,7 +345,8 @@ class NativeBundle {
globals.fs.path.dirname(globals.fs.path.dirname(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);
}
+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 2014 The Flutter Authors. All rights reserved.
// 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/globals.dart' as globals;
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:meta/meta.dart';
import 'package:process/process.dart';
@@ -61,11 +60,6 @@ class ELinuxDeviceManager extends FlutterDeviceManager {
logger: globals.logger,
platform: globals.platform,
),
uwptool: UwpTool(
artifacts: globals.artifacts,
logger: globals.logger,
processManager: globals.processManager,
),
);
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.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,7 +21,7 @@ ELinuxWorkflow get eLinuxWorkflow => context.get<ELinuxWorkflow>();
ELinuxValidator get eLinuxValidator => context.get<ELinuxValidator>();
/// See: [_DefaultDoctorValidatorsProvider] in `doctor.dart`
class ELinuxDoctorValidatorsProvider extends DoctorValidatorsProvider {
class ELinuxDoctorValidatorsProvider implements DoctorValidatorsProvider {
@override
List<DoctorValidator> get 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 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
@@ -678,7 +678,11 @@ void _createPlatformPluginSymlinks(
try {
link.createSync(path);
} 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;
}
}