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
d81691d0
Unverified
Commit
d81691d0
authored
Oct 20, 2020
by
Jenn Magder
Committed by
GitHub
Oct 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Build iOS apps using Swift Packages (#68361)" (#68546)
This reverts commit
dd9323bd
.
parent
938fae9c
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
61 additions
and
179 deletions
+61
-179
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...enchmarks/ios/Runner.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+4
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+4
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+0
-2
ios_migrator.dart
...es/flutter_tools/lib/src/ios/migrations/ios_migrator.dart
+1
-15
project_build_location_migration.dart
.../src/ios/migrations/project_build_location_migration.dart
+0
-49
project.dart
packages/flutter_tools/lib/src/project.dart
+0
-5
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+1
-1
contents.xcworkspacedata
...odeproj.tmpl/project.xcworkspace/contents.xcworkspacedata
+1
-1
ios_project_migration_test.dart
...ls/test/general.shard/ios/ios_project_migration_test.dart
+30
-84
No files found.
dev/benchmarks/macrobenchmarks/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/benchmarks/microbenchmarks/ios/Runner.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/benchmarks/test_apps/stocks/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/channels/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/external_ui/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/flavors/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/flutter_driver_screenshot_test/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/flutter_gallery/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/ios_app_with_extensions/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/ios_platform_view_tests/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/non_nullable/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/platform_interaction/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/release_smoke_test/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
dev/integration_tests/ui/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,9 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"self:"
>
location =
"group:Runner.xcodeproj"
>
</FileRef>
<FileRef
location =
"group:Pods/Pods.xcodeproj"
>
</FileRef>
</Workspace>
dev/manual_tests/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
examples/flutter_view/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,9 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"self:"
>
location =
"group:Runner.xcodeproj"
>
</FileRef>
<FileRef
location =
"group:Pods/Pods.xcodeproj"
>
</FileRef>
</Workspace>
examples/hello_world/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
examples/image_list/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
examples/layers/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
examples/platform_channel/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
examples/platform_channel_swift/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
examples/platform_view/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
packages/flutter_tools/lib/src/ios/mac.dart
View file @
d81691d0
...
...
@@ -25,7 +25,6 @@ import 'code_signing.dart';
import
'devices.dart'
;
import
'migrations/ios_migrator.dart'
;
import
'migrations/project_base_configuration_migration.dart'
;
import
'migrations/project_build_location_migration.dart'
;
import
'migrations/remove_framework_link_and_embedding_migration.dart'
;
import
'migrations/xcode_build_system_migration.dart'
;
import
'xcodeproj.dart'
;
...
...
@@ -107,7 +106,6 @@ Future<XcodeBuildResult> buildXcodeProject({
RemoveFrameworkLinkAndEmbeddingMigration
(
app
.
project
,
globals
.
logger
,
globals
.
xcode
,
globals
.
flutterUsage
),
XcodeBuildSystemMigration
(
app
.
project
,
globals
.
logger
),
ProjectBaseConfigurationMigration
(
app
.
project
,
globals
.
logger
),
ProjectBuildLocationMigration
(
app
.
project
,
globals
.
logger
),
];
final
IOSMigration
migration
=
IOSMigration
(
migrators
);
...
...
packages/flutter_tools/lib/src/ios/migrations/ios_migrator.dart
View file @
d81691d0
...
...
@@ -26,13 +26,6 @@ abstract class IOSMigrator {
}
@protected
String
migrateFileContents
(
String
fileContents
)
{
return
fileContents
;
}
@protected
/// Calls [migrateLine] per line, then [migrateFileContents]
/// including the line migrations.
void
processFileLines
(
File
file
)
{
final
List
<
String
>
lines
=
file
.
readAsLinesSync
();
...
...
@@ -58,16 +51,9 @@ abstract class IOSMigrator {
newProjectContents
.
writeln
(
newProjectLine
);
}
final
String
projectContentsWithMigratedLines
=
newProjectContents
.
toString
();
final
String
projectContentsWithMigratedContents
=
migrateFileContents
(
projectContentsWithMigratedLines
);
if
(
projectContentsWithMigratedLines
!=
projectContentsWithMigratedContents
)
{
logger
.
printTrace
(
'Migrating
$basename
contents'
);
migrationRequired
=
true
;
}
if
(
migrationRequired
)
{
logger
.
printStatus
(
'Upgrading
$basename
'
);
file
.
writeAsStringSync
(
projectContentsWithMigratedContents
);
file
.
writeAsStringSync
(
newProjectContents
.
toString
()
);
}
}
}
...
...
packages/flutter_tools/lib/src/ios/migrations/project_build_location_migration.dart
deleted
100644 → 0
View file @
938fae9c
// 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
'../../base/file_system.dart'
;
import
'../../base/logger.dart'
;
import
'../../project.dart'
;
import
'ios_migrator.dart'
;
// Update the xcodeproj build location. Legacy build location does not work with Swift Packages.
class
ProjectBuildLocationMigration
extends
IOSMigrator
{
ProjectBuildLocationMigration
(
IosProject
project
,
Logger
logger
,
)
:
_xcodeProjectWorkspaceData
=
project
.
xcodeProjectWorkspaceData
,
super
(
logger
);
final
File
_xcodeProjectWorkspaceData
;
@override
bool
migrate
()
{
if
(!
_xcodeProjectWorkspaceData
.
existsSync
())
{
logger
.
printTrace
(
'Xcode project workspace data not found, skipping build location migration.'
);
return
true
;
}
processFileLines
(
_xcodeProjectWorkspaceData
);
return
true
;
}
@override
String
migrateLine
(
String
line
)
{
const
String
legacyBuildLocation
=
'location = "group:Runner.xcodeproj"'
;
const
String
defaultBuildLocation
=
'location = "self:"'
;
return
line
.
replaceAll
(
legacyBuildLocation
,
defaultBuildLocation
);
}
@override
String
migrateFileContents
(
String
fileContents
)
{
const
String
podLocation
=
'''
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
'''
;
return
fileContents
.
replaceAll
(
podLocation
,
''
);
}
}
packages/flutter_tools/lib/src/project.dart
View file @
d81691d0
...
...
@@ -444,11 +444,6 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
@override
File get xcodeProjectInfoFile => xcodeProject.childFile('
project
.
pbxproj
');
File get xcodeProjectWorkspaceData =>
xcodeProject
.childDirectory('
project
.
xcworkspace
')
.childFile('
contents
.
xcworkspacedata
');
@override
Directory get xcodeWorkspace => hostAppRoot.childDirectory('
$_hostAppProjectName
.
xcworkspace
');
...
...
packages/flutter_tools/templates/app/ios.tmpl/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
packages/flutter_tools/templates/module/ios/host_app_ephemeral/Runner.xcodeproj.tmpl/project.xcworkspace/contents.xcworkspacedata
View file @
d81691d0
...
...
@@ -2,6 +2,6 @@
<Workspace
version =
"1.0"
>
<FileRef
location =
"
self:
"
>
location =
"
group:Runner.xcodeproj
"
>
</FileRef>
</Workspace>
packages/flutter_tools/test/general.shard/ios/ios_project_migration_test.dart
View file @
d81691d0
...
...
@@ -5,9 +5,10 @@
import
'package:file/file.dart'
;
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/base/terminal.dart'
;
import
'package:flutter_tools/src/ios/migrations/ios_migrator.dart'
;
import
'package:flutter_tools/src/ios/migrations/project_base_configuration_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/project_build_location_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/remove_framework_link_and_embedding_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/xcode_build_system_migration.dart'
;
import
'package:flutter_tools/src/macos/xcode.dart'
;
...
...
@@ -48,7 +49,15 @@ void main () {
memoryFileSystem
=
MemoryFileSystem
.
test
();
mockXcode
=
MockXcode
();
xcodeProjectInfoFile
=
memoryFileSystem
.
file
(
'project.pbxproj'
);
testLogger
=
BufferLogger
.
test
();
testLogger
=
BufferLogger
(
terminal:
AnsiTerminal
(
stdio:
null
,
platform:
const
LocalPlatform
(),
),
outputPreferences:
OutputPreferences
.
test
(),
);
mockIosProject
=
MockIosProject
();
when
(
mockIosProject
.
xcodeProjectInfoFile
).
thenReturn
(
xcodeProjectInfoFile
);
});
...
...
@@ -258,7 +267,15 @@ keep this 2
setUp
(()
{
memoryFileSystem
=
MemoryFileSystem
.
test
();
xcodeWorkspaceSharedSettings
=
memoryFileSystem
.
file
(
'WorkspaceSettings.xcsettings'
);
testLogger
=
BufferLogger
.
test
();
testLogger
=
BufferLogger
(
terminal:
AnsiTerminal
(
stdio:
null
,
platform:
const
LocalPlatform
(),
),
outputPreferences:
OutputPreferences
.
test
(),
);
mockIosProject
=
MockIosProject
();
when
(
mockIosProject
.
xcodeWorkspaceSharedSettings
).
thenReturn
(
xcodeWorkspaceSharedSettings
);
});
...
...
@@ -321,85 +338,6 @@ keep this 2
});
});
group
(
'Xcode default build location'
,
()
{
MemoryFileSystem
memoryFileSystem
;
BufferLogger
testLogger
;
MockIosProject
mockIosProject
;
File
xcodeProjectWorkspaceData
;
setUp
(()
{
memoryFileSystem
=
MemoryFileSystem
();
xcodeProjectWorkspaceData
=
memoryFileSystem
.
file
(
'contents.xcworkspacedata'
);
testLogger
=
BufferLogger
.
test
();
mockIosProject
=
MockIosProject
();
when
(
mockIosProject
.
xcodeProjectWorkspaceData
).
thenReturn
(
xcodeProjectWorkspaceData
);
});
testWithoutContext
(
'skipped if files are missing'
,
()
{
final
ProjectBuildLocationMigration
iosProjectMigration
=
ProjectBuildLocationMigration
(
mockIosProject
,
testLogger
,
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
expect
(
xcodeProjectWorkspaceData
.
existsSync
(),
isFalse
);
expect
(
testLogger
.
traceText
,
contains
(
'Xcode project workspace data not found, skipping build location migration.'
));
expect
(
testLogger
.
statusText
,
isEmpty
);
});
testWithoutContext
(
'skipped if nothing to upgrade'
,
()
{
const
String
contents
=
'''
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>'''
;
xcodeProjectWorkspaceData
.
writeAsStringSync
(
contents
);
final
ProjectBuildLocationMigration
iosProjectMigration
=
ProjectBuildLocationMigration
(
mockIosProject
,
testLogger
,
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
expect
(
xcodeProjectWorkspaceData
.
existsSync
(),
isTrue
);
expect
(
testLogger
.
statusText
,
isEmpty
);
});
testWithoutContext
(
'Xcode project is migrated'
,
()
{
const
String
contents
=
'''
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
'''
;
xcodeProjectWorkspaceData
.
writeAsStringSync
(
contents
);
final
ProjectBuildLocationMigration
iosProjectMigration
=
ProjectBuildLocationMigration
(
mockIosProject
,
testLogger
,
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
expect
(
xcodeProjectWorkspaceData
.
readAsStringSync
(),
'''
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
'''
);
expect
(
testLogger
.
statusText
,
contains
(
'Upgrading contents.xcworkspacedata'
));
});
});
group
(
'remove Runner project base configuration'
,
()
{
MemoryFileSystem
memoryFileSystem
;
BufferLogger
testLogger
;
...
...
@@ -407,9 +345,17 @@ keep this 2
File
xcodeProjectInfoFile
;
setUp
(()
{
memoryFileSystem
=
MemoryFileSystem
();
memoryFileSystem
=
MemoryFileSystem
.
test
();
xcodeProjectInfoFile
=
memoryFileSystem
.
file
(
'project.pbxproj'
);
testLogger
=
BufferLogger
.
test
();
testLogger
=
BufferLogger
(
terminal:
AnsiTerminal
(
stdio:
null
,
platform:
const
LocalPlatform
(),
),
outputPreferences:
OutputPreferences
.
test
(),
);
mockIosProject
=
MockIosProject
();
when
(
mockIosProject
.
xcodeProjectInfoFile
).
thenReturn
(
xcodeProjectInfoFile
);
});
...
...
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