Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
bffa11e2
Unverified
Commit
bffa11e2
authored
Aug 06, 2021
by
嘟囔
Committed by
GitHub
Aug 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix BuildableMacOSApp pass no projectBundleId to super error (#87264)
parent
bd04a22b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
application_package.dart
...ages/flutter_tools/lib/src/macos/application_package.dart
+3
-2
application_package_test.dart
...ls/test/general.shard/macos/application_package_test.dart
+10
-0
No files found.
packages/flutter_tools/lib/src/macos/application_package.dart
View file @
bffa11e2
...
...
@@ -24,7 +24,8 @@ abstract class MacOSApp extends ApplicationPackage {
/// Creates a new [MacOSApp] from a macOS project directory.
factory
MacOSApp
.
fromMacOSProject
(
MacOSProject
project
)
{
return
BuildableMacOSApp
(
project
);
// projectBundleId is unused for macOS apps. Use a placeholder bundle ID.
return
BuildableMacOSApp
(
project
,
'com.example.placeholder'
);
}
/// Creates a new [MacOSApp] from an existing app bundle.
...
...
@@ -139,7 +140,7 @@ class PrebuiltMacOSApp extends MacOSApp {
}
class
BuildableMacOSApp
extends
MacOSApp
{
BuildableMacOSApp
(
this
.
project
);
BuildableMacOSApp
(
this
.
project
,
String
projectBundleId
):
super
(
projectBundleId:
projectBundleId
);
final
MacOSProject
project
;
...
...
packages/flutter_tools/test/general.shard/macos/application_package_test.dart
View file @
bffa11e2
...
...
@@ -12,8 +12,10 @@ import 'package:flutter_tools/src/base/file_system.dart';
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/os.dart'
;
import
'package:flutter_tools/src/base/utils.dart'
;
import
'package:flutter_tools/src/globals_null_migrated.dart'
as
globals
;
import
'package:flutter_tools/src/ios/plist_parser.dart'
;
import
'package:flutter_tools/src/macos/application_package.dart'
;
import
'package:flutter_tools/src/project.dart'
;
import
'package:test/fake.dart'
;
import
'../../src/common.dart'
;
...
...
@@ -154,6 +156,14 @@ group('PrebuiltMacOSApp', () {
expect
(
macosApp
.
id
,
'fooBundleId'
);
expect
(
macosApp
.
bundleName
,
endsWith
(
'bundle.app'
));
},
overrides:
overrides
);
testUsingContext
(
'Success with project'
,
()
{
final
MacOSApp
macosApp
=
MacOSApp
.
fromMacOSProject
(
FlutterProject
.
fromDirectory
(
globals
.
fs
.
currentDirectory
).
macos
);
expect
(
logger
.
errorText
,
isEmpty
);
expect
(
macosApp
.
id
,
'com.example.placeholder'
);
expect
(
macosApp
.
name
,
'macOS'
);
},
overrides:
overrides
);
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment