mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

1. Remove vm service registration 2. combine print<variant>ApplicationId and print<variant>AppLinkDomain into one task dump<variant>AppLinkSettings, which dump all the data in a json file The deeplink validation tool will be a static app in devtool instead of regular app. A Static app doesn't require a running app; therefore, we can't call these API through vmservices. I decided to convert these API into flutter analyzer command, which will be done in a separate PR https://github.com/flutter/flutter/pull/131009. The reason these print tasks are converted into file dumps is to reduce the amount of data encoding and decoding. Instead of passing data through stdout, the devtool can read the files generated by gradle tasks instead.
68 lines
2.0 KiB
Dart
68 lines
2.0 KiB
Dart
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'package:flutter_tools/src/android/android_builder.dart';
|
|
import 'package:flutter_tools/src/base/file_system.dart';
|
|
import 'package:flutter_tools/src/build_info.dart';
|
|
import 'package:flutter_tools/src/globals.dart' as globals;
|
|
import 'package:flutter_tools/src/project.dart';
|
|
|
|
/// A fake implementation of [AndroidBuilder].
|
|
class FakeAndroidBuilder implements AndroidBuilder {
|
|
@override
|
|
Future<void> buildAar({
|
|
required FlutterProject project,
|
|
required Set<AndroidBuildInfo> androidBuildInfo,
|
|
required String target,
|
|
String? outputDirectoryPath,
|
|
required String buildNumber,
|
|
}) async {}
|
|
|
|
@override
|
|
Future<void> buildApk({
|
|
required FlutterProject project,
|
|
required AndroidBuildInfo androidBuildInfo,
|
|
required String target,
|
|
bool configOnly = false,
|
|
}) async {}
|
|
|
|
@override
|
|
Future<void> buildAab({
|
|
required FlutterProject project,
|
|
required AndroidBuildInfo androidBuildInfo,
|
|
required String target,
|
|
bool validateDeferredComponents = true,
|
|
bool deferredComponentsEnabled = false,
|
|
bool configOnly = false,
|
|
}) async {}
|
|
|
|
@override
|
|
Future<List<String>> getBuildVariants({required FlutterProject project}) async => const <String>[];
|
|
|
|
@override
|
|
Future<void> outputsAppLinkSettings(
|
|
String buildVariant, {
|
|
required FlutterProject project,
|
|
}) async {}
|
|
|
|
}
|
|
|
|
/// Creates a [FlutterProject] in a directory named [flutter_project]
|
|
/// within [directoryOverride].
|
|
class FakeFlutterProjectFactory extends FlutterProjectFactory {
|
|
FakeFlutterProjectFactory(this.directoryOverride) :
|
|
super(
|
|
fileSystem: globals.fs,
|
|
logger: globals.logger,
|
|
);
|
|
|
|
final Directory directoryOverride;
|
|
|
|
@override
|
|
FlutterProject fromDirectory(Directory _) {
|
|
projects.clear();
|
|
return super.fromDirectory(directoryOverride.childDirectory('flutter_project'));
|
|
}
|
|
}
|