This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[macos] add flavor options to commands in the
flutter_tool
(#118421)
* Add new macos target configured for flavors * Rename Free App copy-Info.plist to Free App Info.plist * Remove bogus entitlements * Remove Generated.xcconfig * Audit project.pbxproj * Remove unused configs * share one info.plist * Modify scheme so that paid app works * Codesign automatic * Pipe flavor as scheme into xcodebuild * Ignore incoming flavor string * pipe flavor for flutter run to work * Add devicelab tests * Error if host and target device are same for flutter install desktop * Avoid bang (!) by promoting a local. Co-authored-by: Jenn Magder <magder@google.com> * Add supportsInstall property * Override in test classes * Add install test on macOS * Refactor application_package and add tests for package directory Co-authored-by: a-wallen <stephenwallen@google.com> Co-authored-by: Jenn Magder <magder@google.com>
- Loading branch information
1 parent
09bd0f6
commit 73096fd
Showing
21 changed files
with
173 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// 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_devicelab/framework/devices.dart'; | ||
import 'package:flutter_devicelab/framework/framework.dart'; | ||
import 'package:flutter_devicelab/framework/task_result.dart'; | ||
import 'package:flutter_devicelab/framework/utils.dart'; | ||
import 'package:flutter_devicelab/tasks/integration_tests.dart'; | ||
|
||
Future<void> main() async { | ||
deviceOperatingSystem = DeviceOperatingSystem.macos; | ||
await task(() async { | ||
await createFlavorsTest().call(); | ||
await createIntegrationTestFlavorsTest().call(); | ||
|
||
await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async { | ||
final StringBuffer stderr = StringBuffer(); | ||
|
||
await evalFlutter( | ||
'install', | ||
canFail: true, | ||
stderr: stderr, | ||
options: <String>[ | ||
'--d', 'macos', | ||
'--flavor', 'free' | ||
], | ||
); | ||
|
||
final String stderrString = stderr.toString(); | ||
if (!stderrString.contains('Host and target are the same. Nothing to install.')) { | ||
print(stderrString); | ||
return TaskResult.failure('Installing a macOS app on macOS should no-op'); | ||
} | ||
}); | ||
|
||
return TaskResult.success(null); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.