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
dc99d61e
Commit
dc99d61e
authored
Jan 02, 2020
by
Jenn Magder
Committed by
Flutter GitHub Bot
Jan 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove simulator arch in Profile and Release, App.xcframework (#48002)
parent
a6c3ffe1
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
293 additions
and
124 deletions
+293
-124
build_ios_framework_module_test.dart
dev/devicelab/bin/tasks/build_ios_framework_module_test.dart
+101
-43
build_ios_framework.dart
...s/flutter_tools/lib/src/commands/build_ios_framework.dart
+192
-81
No files found.
dev/devicelab/bin/tasks/build_ios_framework_module_test.dart
View file @
dc99d61e
...
...
@@ -80,61 +80,51 @@ Future<void> main() async {
'App'
,
));
final
String
a
ppFrameworkPath
=
path
.
join
(
final
String
debugA
ppFrameworkPath
=
path
.
join
(
outputPath
,
'Debug'
,
'App.framework'
,
'App'
,
);
final
String
aotSymbols
=
await
dylibSymbols
(
a
ppFrameworkPath
);
final
String
aotSymbols
=
await
dylibSymbols
(
debugA
ppFrameworkPath
);
if
(
aotSymbols
.
contains
(
'architecture'
)
||
aotSymbols
.
contains
(
'_kDartVmSnapshot'
))
{
throw
TaskResult
.
failure
(
'Debug App.framework contains AOT'
);
}
await
_checkFrameworkArchs
(
debugAppFrameworkPath
,
'Debug'
);
final
String
debugAppArchs
=
await
fileType
(
appFrameworkPath
);
if
(!
debugAppArchs
.
contains
(
'armv7'
))
{
throw
TaskResult
.
failure
(
'Debug App.framework armv7 architecture missing'
);
}
if
(!
debugAppArchs
.
contains
(
'arm64'
))
{
throw
TaskResult
.
failure
(
'Debug App.framework arm64 architecture missing'
);
}
checkFileExists
(
path
.
join
(
outputPath
,
'Debug'
,
'App.xcframework'
,
'ios-armv7_arm64'
,
'App.framework'
,
'App'
,
));
if
(!
debugAppArchs
.
contains
(
'x86_64'
))
{
throw
TaskResult
.
failure
(
'Debug App.framework x86_64 architecture missing'
);
}
checkFileExists
(
path
.
join
(
outputPath
,
'Debug'
,
'App.xcframework'
,
'ios-x86_64-simulator'
,
'App.framework'
,
'App'
,
));
section
(
'Check profile, release builds has Dart AOT dylib'
);
for
(
String
mode
in
<
String
>[
'Profile'
,
'Release'
])
{
checkFileExists
(
path
.
join
(
outputPath
,
mode
,
'App.framework'
,
'App'
,
));
final
String
aotSymbols
=
await
dylibSymbols
(
path
.
join
(
final
String
appFrameworkPath
=
path
.
join
(
outputPath
,
mode
,
'App.framework'
,
'App'
,
)
)
;
);
if
(!
aotSymbols
.
contains
(
'armv7'
))
{
throw
TaskResult
.
failure
(
'
$mode
App.framework armv7 architecture missing'
);
}
await
_checkFrameworkArchs
(
appFrameworkPath
,
mode
);
if
(!
aotSymbols
.
contains
(
'arm64'
))
{
throw
TaskResult
.
failure
(
'
$mode
App.framework arm64 architecture missing'
);
}
if
(
aotSymbols
.
contains
(
'x86_64'
))
{
throw
TaskResult
.
failure
(
'
$mode
App.framework contains x86_64 architecture'
);
}
final
String
aotSymbols
=
await
dylibSymbols
(
appFrameworkPath
);
if
(!
aotSymbols
.
contains
(
'_kDartVmSnapshot'
))
{
throw
TaskResult
.
failure
(
'
$mode
App.framework missing Dart AOT'
);
...
...
@@ -147,17 +137,38 @@ Future<void> main() async {
'flutter_assets'
,
'vm_snapshot_data'
,
));
checkFileExists
(
path
.
join
(
outputPath
,
mode
,
'App.xcframework'
,
'ios-armv7_arm64'
,
'App.framework'
,
'App'
,
));
checkFileNotExists
(
path
.
join
(
outputPath
,
mode
,
'App.xcframework'
,
'ios-x86_64-simulator'
,
'App.framework'
,
'App'
,
));
}
section
(
"Check all modes' engine dylib"
);
for
(
String
mode
in
<
String
>[
'Debug'
,
'Profile'
,
'Release'
])
{
checkFileExists
(
path
.
join
(
final
String
engineFrameworkPath
=
path
.
join
(
outputPath
,
mode
,
'Flutter.framework'
,
'Flutter'
,
));
);
await
_checkFrameworkArchs
(
engineFrameworkPath
,
mode
);
checkFileExists
(
path
.
join
(
outputPath
,
mode
,
...
...
@@ -166,14 +177,19 @@ Future<void> main() async {
'Flutter.framework'
,
'Flutter'
,
));
checkFileExists
(
path
.
join
(
final
String
simulatorFrameworkPath
=
path
.
join
(
outputPath
,
mode
,
'Flutter.xcframework'
,
'ios-x86_64-simulator'
,
'Flutter.framework'
,
'Flutter'
,
));
);
if
(
mode
==
'Debug'
)
{
checkFileExists
(
simulatorFrameworkPath
);
}
else
{
checkFileNotExists
(
simulatorFrameworkPath
);
}
}
section
(
"Check all modes' engine header"
);
...
...
@@ -188,12 +204,14 @@ Future<void> main() async {
section
(
"Check all modes' have plugin dylib"
);
for
(
String
mode
in
<
String
>[
'Debug'
,
'Profile'
,
'Release'
])
{
checkFileExists
(
path
.
join
(
final
String
pluginFrameworkPath
=
path
.
join
(
outputPath
,
mode
,
'device_info.framework'
,
'device_info'
,
));
);
await
_checkFrameworkArchs
(
pluginFrameworkPath
,
mode
);
checkFileExists
(
path
.
join
(
outputPath
,
mode
,
...
...
@@ -202,19 +220,33 @@ Future<void> main() async {
'device_info.framework'
,
'device_info'
,
));
checkFileExists
(
path
.
join
(
final
String
simulatorFrameworkPath
=
path
.
join
(
outputPath
,
mode
,
'device_info.xcframework'
,
'ios-x86_64-simulator'
,
'device_info.framework'
,
'device_info'
,
));
);
if
(
mode
==
'Debug'
)
{
checkFileExists
(
simulatorFrameworkPath
);
}
else
{
checkFileNotExists
(
simulatorFrameworkPath
);
}
}
section
(
"Check all modes' have generated plugin registrant"
);
for
(
String
mode
in
<
String
>[
'Debug'
,
'Profile'
,
'Release'
])
{
final
String
registrantFrameworkPath
=
path
.
join
(
outputPath
,
mode
,
'FlutterPluginRegistrant.framework'
,
'FlutterPluginRegistrant'
);
await
_checkFrameworkArchs
(
registrantFrameworkPath
,
mode
);
checkFileExists
(
path
.
join
(
outputPath
,
mode
,
...
...
@@ -231,7 +263,7 @@ Future<void> main() async {
'Headers'
,
'GeneratedPluginRegistrant.h'
,
));
checkFileExists
(
path
.
join
(
final
String
simulatorHeaderPath
=
path
.
join
(
outputPath
,
mode
,
'FlutterPluginRegistrant.xcframework'
,
...
...
@@ -239,7 +271,12 @@ Future<void> main() async {
'FlutterPluginRegistrant.framework'
,
'Headers'
,
'GeneratedPluginRegistrant.h'
,
));
);
if
(
mode
==
'Debug'
)
{
checkFileExists
(
simulatorHeaderPath
);
}
else
{
checkFileNotExists
(
simulatorHeaderPath
);
}
}
return
TaskResult
.
success
(
null
);
...
...
@@ -252,3 +289,24 @@ Future<void> main() async {
}
});
}
Future
<
void
>
_checkFrameworkArchs
(
String
frameworkPath
,
String
mode
)
async
{
checkFileExists
(
frameworkPath
);
final
String
archs
=
await
fileType
(
frameworkPath
);
if
(!
archs
.
contains
(
'armv7'
))
{
throw
TaskResult
.
failure
(
'
$mode
$frameworkPath
armv7 architecture missing'
);
}
if
(!
archs
.
contains
(
'arm64'
))
{
throw
TaskResult
.
failure
(
'
$mode
$frameworkPath
arm64 architecture missing'
);
}
final
bool
containsSimulator
=
archs
.
contains
(
'x86_64'
);
final
bool
isDebug
=
mode
==
'Debug'
;
// Debug should contain the simulator archs.
// Release and Profile should not.
if
(
containsSimulator
!=
isDebug
)
{
throw
TaskResult
.
failure
(
'
$mode
$frameworkPath
x86_64 architecture
${isDebug ? 'missing' : 'present'}
'
);
}
}
packages/flutter_tools/lib/src/commands/build_ios_framework.dart
View file @
dc99d61e
This diff is collapsed.
Click to expand it.
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