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
71d52f27
Unverified
Commit
71d52f27
authored
Apr 08, 2022
by
Jenn Magder
Committed by
GitHub
Apr 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test Flutter.xcframework directory ios-arm64_armv7 or ios-arm64 (#101592)
parent
135bb5d4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
10 deletions
+64
-10
build_ios_framework_module_test.dart
dev/devicelab/bin/tasks/build_ios_framework_module_test.dart
+35
-5
podhelper.rb
packages/flutter_tools/bin/podhelper.rb
+1
-1
artifacts.dart
packages/flutter_tools/lib/src/artifacts.dart
+1
-1
artifacts_test.dart
...ages/flutter_tools/test/general.shard/artifacts_test.dart
+27
-3
No files found.
dev/devicelab/bin/tasks/build_ios_framework_module_test.dart
View file @
71d52f27
...
...
@@ -111,14 +111,28 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
final
String
outputPath
=
path
.
join
(
projectDir
.
path
,
outputDirectoryName
);
checkFileExists
(
path
.
join
(
// TODO(jmagman): Remove ios-arm64_armv7 checks when armv7 engine artifacts are removed.
final
String
arm64FlutterFramework
=
path
.
join
(
outputPath
,
'Debug'
,
'Flutter.xcframework'
,
'ios-arm64'
,
'Flutter.framework'
,
);
final
String
armv7FlutterFramework
=
path
.
join
(
outputPath
,
'Debug'
,
'Flutter.xcframework'
,
'ios-arm64_armv7'
,
'Flutter.framework'
,
'Flutter'
,
));
);
final
bool
arm64FlutterBinaryExists
=
exists
(
File
(
path
.
join
(
arm64FlutterFramework
,
'Flutter'
)));
final
bool
armv7FlutterBinaryExists
=
exists
(
File
(
path
.
join
(
armv7FlutterFramework
,
'Flutter'
)));
if
(!
arm64FlutterBinaryExists
&&
!
armv7FlutterBinaryExists
)
{
throw
TaskResult
.
failure
(
'Expected debug Flutter engine artifact binary to exist'
);
}
final
String
debugAppFrameworkPath
=
path
.
join
(
outputPath
,
...
...
@@ -226,7 +240,17 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
section
(
"Check all modes' engine dylib"
);
for
(
final
String
mode
in
<
String
>[
'Debug'
,
'Profile'
,
'Release'
])
{
final
String
engineFrameworkPath
=
path
.
join
(
// TODO(jmagman): Remove ios-arm64_armv7 checks when armv7 engine artifacts are removed.
final
String
arm64EngineBinary
=
path
.
join
(
outputPath
,
mode
,
'Flutter.xcframework'
,
'ios-arm64'
,
'Flutter.framework'
,
'Flutter'
,
);
final
String
arm64Armv7EngineBinary
=
path
.
join
(
outputPath
,
mode
,
'Flutter.xcframework'
,
...
...
@@ -235,7 +259,13 @@ Future<void> _testBuildIosFramework(Directory projectDir, { bool isModule = fals
'Flutter'
,
);
await
_checkBitcode
(
engineFrameworkPath
,
mode
);
if
(
exists
(
File
(
arm64EngineBinary
)))
{
await
_checkBitcode
(
arm64EngineBinary
,
mode
);
}
else
if
(
exists
(
File
(
arm64Armv7EngineBinary
)))
{
await
_checkBitcode
(
arm64Armv7EngineBinary
,
mode
);
}
else
{
throw
TaskResult
.
failure
(
'Expected Flutter
$mode
engine artifact binary to exist'
);
}
checkFileExists
(
path
.
join
(
outputPath
,
...
...
packages/flutter_tools/bin/podhelper.rb
View file @
71d52f27
...
...
@@ -63,7 +63,7 @@ def flutter_additional_ios_build_settings(target)
continue
if
xcframework_file
.
start_with?
(
"."
)
# Hidden file, possibly on external disk.
if
xcframework_file
.
end_with?
(
"-simulator"
)
# ios-arm64_x86_64-simulator
build_configuration
.
build_settings
[
'FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]'
]
=
"
\"
#{
configuration_engine_dir
}
/
#{
xcframework_file
}
\"
$(inherited)"
elsif
xcframework_file
.
start_with?
(
"ios-"
)
# ios-arm
v7_arm
64
elsif
xcframework_file
.
start_with?
(
"ios-"
)
# ios-arm64
build_configuration
.
build_settings
[
'FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]'
]
=
"
\"
#{
configuration_engine_dir
}
/
#{
xcframework_file
}
\"
$(inherited)"
else
# Info.plist or another platform.
...
...
packages/flutter_tools/lib/src/artifacts.dart
View file @
71d52f27
...
...
@@ -727,7 +727,7 @@ String _getIosEngineArtifactPath(String engineDirectory,
if
(!
platformDirectory
.
basename
.
startsWith
(
'ios-'
))
{
continue
;
}
// ios-x86_64-simulator, ios-arm64_x86_64-simulator,
ios-armv7_arm64 (Xcode 11), or ios-arm64_armv7 (Xcode 12)
.
// ios-x86_64-simulator, ios-arm64_x86_64-simulator,
or ios-arm64
.
final
bool
simulatorDirectory
=
platformDirectory
.
basename
.
endsWith
(
'-simulator'
);
if
((
environmentType
==
EnvironmentType
.
simulator
&&
simulatorDirectory
)
||
(
environmentType
==
EnvironmentType
.
physical
&&
!
simulatorDirectory
))
{
...
...
packages/flutter_tools/test/general.shard/artifacts_test.dart
View file @
71d52f27
...
...
@@ -87,6 +87,13 @@ void main() {
.
childDirectory
(
'ios-arm64_x86_64-simulator'
)
.
childDirectory
(
'Flutter.framework'
)
.
createSync
(
recursive:
true
);
fileSystem
.
directory
(
xcframeworkPath
)
.
childDirectory
(
'ios-arm64'
)
.
childDirectory
(
'Flutter.framework'
)
.
createSync
(
recursive:
true
);
// TODO(jmagman): Remove ios-arm64_armv7 checks when armv7 engine artifacts are removed.
fileSystem
.
directory
(
xcframeworkPath
)
.
childDirectory
(
'ios-arm64_armv7'
)
...
...
@@ -100,10 +107,27 @@ void main() {
fileSystem
.
path
.
join
(
xcframeworkPath
,
'ios-arm64_x86_64-simulator'
,
'Flutter.framework'
),
);
final
String
actualReleaseFrameworkArtifact
=
artifacts
.
getArtifactPath
(
Artifact
.
flutterFramework
,
platform:
TargetPlatform
.
ios
,
mode:
BuildMode
.
release
,
environmentType:
EnvironmentType
.
physical
,
);
final
String
expectedArm64ReleaseFrameworkArtifact
=
fileSystem
.
path
.
join
(
xcframeworkPath
,
'ios-arm64'
,
'Flutter.framework'
,
);
final
String
expectedArmv7ReleaseFrameworkArtifact
=
fileSystem
.
path
.
join
(
xcframeworkPath
,
'ios-arm64_armv7'
,
'Flutter.framework'
,
);
// TODO(jmagman): Replace with expect(actualReleaseFrameworkArtifact, expectedArm64ReleaseFrameworkArtifact) when armv7 engine artifacts are removed.
expect
(
artifacts
.
getArtifactPath
(
Artifact
.
flutterFramework
,
platform:
TargetPlatform
.
ios
,
mode:
BuildMode
.
release
,
environmentType:
EnvironmentType
.
physical
),
fileSystem
.
path
.
join
(
xcframeworkPath
,
'ios-arm64_armv7'
,
'Flutter.framework'
),
actualReleaseFrameworkArtifact
,
anyOf
(
expectedArm64ReleaseFrameworkArtifact
,
expectedArmv7ReleaseFrameworkArtifact
),
);
expect
(
artifacts
.
getArtifactPath
(
Artifact
.
flutterXcframework
,
platform:
TargetPlatform
.
ios
,
mode:
BuildMode
.
release
),
...
...
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