forked from firka/flutter
Rename --prefer-shared-library to --build-shared library consistently (#18164)
The change in 8b8d368d2 has only renamed the flag in a subset of the
places.
This commit is contained in:
committed by
GitHub
parent
f833c43e6e
commit
ec6c4aba89
@@ -340,8 +340,8 @@ Future<Null> _buildGradleProjectV2(String gradle, BuildInfo buildInfo, String ta
|
||||
} else {
|
||||
command.add('-Ppreview-dart-2=false');
|
||||
}
|
||||
if (buildInfo.preferSharedLibrary && androidSdk.ndk != null) {
|
||||
command.add('-Pprefer-shared-library=true');
|
||||
if (buildInfo.buildSharedLibrary && androidSdk.ndk != null) {
|
||||
command.add('-Pbuild-shared-library=true');
|
||||
}
|
||||
if (buildInfo.targetPlatform == TargetPlatform.android_arm64)
|
||||
command.add('-Ptarget-platform=android-arm64');
|
||||
|
||||
@@ -15,7 +15,7 @@ class BuildInfo {
|
||||
this.trackWidgetCreation: false,
|
||||
this.extraFrontEndOptions,
|
||||
this.extraGenSnapshotOptions,
|
||||
this.preferSharedLibrary,
|
||||
this.buildSharedLibrary,
|
||||
this.targetPlatform,
|
||||
this.fileSystemRoots,
|
||||
this.fileSystemScheme,
|
||||
@@ -49,7 +49,7 @@ class BuildInfo {
|
||||
final String extraGenSnapshotOptions;
|
||||
|
||||
/// Whether to prefer AOT compiling to a *so file.
|
||||
final bool preferSharedLibrary;
|
||||
final bool buildSharedLibrary;
|
||||
|
||||
/// Target platform for the build (e.g. android_arm versus android_arm64).
|
||||
final TargetPlatform targetPlatform;
|
||||
@@ -97,7 +97,7 @@ class BuildInfo {
|
||||
trackWidgetCreation: trackWidgetCreation,
|
||||
extraFrontEndOptions: extraFrontEndOptions,
|
||||
extraGenSnapshotOptions: extraGenSnapshotOptions,
|
||||
preferSharedLibrary: preferSharedLibrary,
|
||||
buildSharedLibrary: buildSharedLibrary,
|
||||
targetPlatform: targetPlatform);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class BuildApkCommand extends BuildSubCommand {
|
||||
help: 'Preview Dart 2.0 functionality.',
|
||||
)
|
||||
..addFlag('track-widget-creation', negatable: false, hide: !verboseHelp)
|
||||
..addFlag('prefer-shared-library',
|
||||
..addFlag('build-shared-library',
|
||||
negatable: false,
|
||||
help: 'Whether to prefer compiling to a *.so file (android only).',
|
||||
)
|
||||
|
||||
@@ -366,7 +366,7 @@ class IOSSimulator extends Device {
|
||||
trackWidgetCreation: buildInfo.trackWidgetCreation,
|
||||
extraFrontEndOptions: buildInfo.extraFrontEndOptions,
|
||||
extraGenSnapshotOptions: buildInfo.extraGenSnapshotOptions,
|
||||
preferSharedLibrary: buildInfo.preferSharedLibrary);
|
||||
buildSharedLibrary: buildInfo.buildSharedLibrary);
|
||||
|
||||
final XcodeBuildResult buildResult = await buildXcodeProject(
|
||||
app: app,
|
||||
|
||||
@@ -222,8 +222,8 @@ abstract class FlutterCommand extends Command<Null> {
|
||||
extraGenSnapshotOptions: argParser.options.containsKey(FlutterOptions.kExtraGenSnapshotOptions)
|
||||
? argResults[FlutterOptions.kExtraGenSnapshotOptions]
|
||||
: null,
|
||||
preferSharedLibrary: argParser.options.containsKey('prefer-shared-library')
|
||||
? argResults['prefer-shared-library']
|
||||
buildSharedLibrary: argParser.options.containsKey('build-shared-library')
|
||||
? argResults['build-shared-library']
|
||||
: false,
|
||||
targetPlatform: targetPlatform,
|
||||
fileSystemRoots: argParser.options.containsKey(FlutterOptions.kFileSystemRoot)
|
||||
|
||||
Reference in New Issue
Block a user