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
aff69e43
Unverified
Commit
aff69e43
authored
Oct 27, 2021
by
Jenn Magder
Committed by
GitHub
Oct 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add integration_test to flavor test project (#92520)
parent
b78505d9
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
304 additions
and
10 deletions
+304
-10
project-app.lockfile
dev/integration_tests/flavors/android/project-app.lockfile
+21
-8
project-integration_test.lockfile
...n_tests/flavors/android/project-integration_test.lockfile
+111
-0
Debug.xcconfig
dev/integration_tests/flavors/ios/Flutter/Debug.xcconfig
+3
-0
Release.xcconfig
dev/integration_tests/flavors/ios/Flutter/Release.xcconfig
+3
-0
Podfile
dev/integration_tests/flavors/ios/Podfile
+43
-0
project.pbxproj
...ration_tests/flavors/ios/Runner.xcodeproj/project.pbxproj
+87
-1
contents.xcworkspacedata
...s/flavors/ios/Runner.xcworkspace/contents.xcworkspacedata
+3
-0
pubspec.yaml
dev/integration_tests/flavors/pubspec.yaml
+6
-0
cocoapods.dart
packages/flutter_tools/lib/src/macos/cocoapods.dart
+1
-1
cocoapods_test.dart
...lutter_tools/test/general.shard/macos/cocoapods_test.dart
+26
-0
No files found.
dev/integration_tests/flavors/android/project-app.lockfile
View file @
aff69e43
This diff is collapsed.
Click to expand it.
dev/integration_tests/flavors/android/project-integration_test.lockfile
0 → 100644
View file @
aff69e43
This diff is collapsed.
Click to expand it.
dev/integration_tests/flavors/ios/Flutter/Debug.xcconfig
View file @
aff69e43
// This xcconfig used for both the paid and free flavor, but the plugins are not different between
// them. Pick one.
#include? "Pods/Target Support Files/Pods-Free App/Pods-Free App.debug free.xcconfig"
#include "Generated.xcconfig"
dev/integration_tests/flavors/ios/Flutter/Release.xcconfig
View file @
aff69e43
// This xcconfig used for both the paid and free flavor, but the plugins are not different between
// them. Pick one.
#include? "Pods/Target Support Files/Pods-Free App/Pods-Free App.release free.xcconfig"
#include "Generated.xcconfig"
dev/integration_tests/flavors/ios/Podfile
0 → 100644
View file @
aff69e43
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV
[
'COCOAPODS_DISABLE_STATS'
]
=
'true'
project
'Runner'
,
{
'Debug Free'
=>
:debug
,
'Debug Paid'
=>
:release
,
'Release Free'
=>
:release
,
'Release Paid'
=>
:release
,
}
def
flutter_root
generated_xcode_build_settings_path
=
File
.
expand_path
(
File
.
join
(
'..'
,
'Flutter'
,
'Generated.xcconfig'
),
__FILE__
)
unless
File
.
exist?
(
generated_xcode_build_settings_path
)
raise
"
#{
generated_xcode_build_settings_path
}
must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File
.
foreach
(
generated_xcode_build_settings_path
)
do
|
line
|
matches
=
line
.
match
(
/FLUTTER_ROOT\=(.*)/
)
return
matches
[
1
].
strip
if
matches
end
raise
"FLUTTER_ROOT not found in
#{
generated_xcode_build_settings_path
}
. Try deleting Generated.xcconfig, then run flutter pub get"
end
require
File
.
expand_path
(
File
.
join
(
'packages'
,
'flutter_tools'
,
'bin'
,
'podhelper'
),
flutter_root
)
flutter_ios_podfile_setup
target
'Free App'
do
flutter_install_all_ios_pods
File
.
dirname
(
File
.
realpath
(
__FILE__
))
end
target
'Paid App'
do
flutter_install_all_ios_pods
File
.
dirname
(
File
.
realpath
(
__FILE__
))
end
post_install
do
|
installer
|
installer
.
pods_project
.
targets
.
each
do
|
target
|
flutter_additional_ios_build_settings
(
target
)
end
end
dev/integration_tests/flavors/ios/Runner.xcodeproj/project.pbxproj
View file @
aff69e43
This diff is collapsed.
Click to expand it.
dev/integration_tests/flavors/ios/Runner.xcworkspace/contents.xcworkspacedata
View file @
aff69e43
...
...
@@ -4,4 +4,7 @@
<FileRef
location =
"group:Runner.xcodeproj"
>
</FileRef>
<FileRef
location =
"group:Pods/Pods.xcodeproj"
>
</FileRef>
</Workspace>
dev/integration_tests/flavors/pubspec.yaml
View file @
aff69e43
...
...
@@ -9,6 +9,8 @@ dependencies:
sdk
:
flutter
flutter_driver
:
sdk
:
flutter
integration_test
:
sdk
:
flutter
test
:
1.17.12
_fe_analyzer_shared
:
29.0.0
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...
...
@@ -64,6 +66,10 @@ dependencies:
webkit_inspection_protocol
:
1.0.0
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml
:
3.1.0
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies
:
flutter_test
:
sdk
:
flutter
flutter
:
uses-material-design
:
true
...
...
packages/flutter_tools/lib/src/macos/cocoapods.dart
View file @
aff69e43
...
...
@@ -275,7 +275,7 @@ class CocoaPods {
final
String
includeFile
=
'Pods/Target Support Files/Pods-Runner/Pods-Runner.
${mode
.toLowerCase()}
.xcconfig'
;
final
String
include
=
'#include? "
$includeFile
"'
;
if
(!
content
.
contains
(
includeFile
))
{
if
(!
content
.
contains
(
'Pods/Target Support Files/Pods-'
))
{
file
.
writeAsStringSync
(
'
$include
\n
$content
'
,
flush:
true
);
}
}
...
...
packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart
View file @
aff69e43
...
...
@@ -287,6 +287,32 @@ void main() {
expect
(
releaseContents
,
isNot
(
contains
(
'#include?'
)));
expect
(
releaseContents
,
equals
(
legacyReleaseInclude
));
});
testUsingContext
(
'does not include Pod config in xcconfig files, if flavor include present'
,
()
async
{
final
FlutterProject
projectUnderTest
=
setupProjectUnderTest
();
projectUnderTest
.
ios
.
podfile
..
createSync
()..
writeAsStringSync
(
'Existing Podfile'
);
const
String
flavorDebugInclude
=
'#include? "Pods/Target Support Files/Pods-Free App/Pods-Free App.debug free.xcconfig"'
;
projectUnderTest
.
ios
.
xcodeConfigFor
(
'Debug'
)
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
flavorDebugInclude
);
const
String
flavorReleaseInclude
=
'#include? "Pods/Target Support Files/Pods-Free App/Pods-Free App.release free.xcconfig"'
;
projectUnderTest
.
ios
.
xcodeConfigFor
(
'Release'
)
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
flavorReleaseInclude
);
final
FlutterProject
project
=
FlutterProject
.
fromDirectoryTest
(
fileSystem
.
directory
(
'project'
));
await
cocoaPodsUnderTest
.
setupPodfile
(
project
.
ios
);
final
String
debugContents
=
projectUnderTest
.
ios
.
xcodeConfigFor
(
'Debug'
).
readAsStringSync
();
// Redundant contains check, but this documents what we're testing--that the optional
// #include? doesn't get written in addition to the previous style #include.
expect
(
debugContents
,
isNot
(
contains
(
'Pods-Runner/Pods-Runner.debug'
)));
expect
(
debugContents
,
equals
(
flavorDebugInclude
));
final
String
releaseContents
=
projectUnderTest
.
ios
.
xcodeConfigFor
(
'Release'
).
readAsStringSync
();
expect
(
releaseContents
,
isNot
(
contains
(
'Pods-Runner/Pods-Runner.release'
)));
expect
(
releaseContents
,
equals
(
flavorReleaseInclude
));
});
});
group
(
'Update xcconfig'
,
()
{
...
...
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