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
d099ae60
Unverified
Commit
d099ae60
authored
Feb 26, 2021
by
Jenn Magder
Committed by
GitHub
Feb 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ephemeral iOS directory to put future generated files (#76830)
parent
f5903a91
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
27 additions
and
11 deletions
+27
-11
.gitignore
.gitignore
+1
-0
.gitignore
dev/benchmarks/complex_layout/ios/.gitignore
+1
-0
.gitignore
dev/integration_tests/ios_app_with_extensions/ios/.gitignore
+1
-0
.gitignore
dev/integration_tests/non_nullable/ios/.gitignore
+1
-0
.gitignore
dev/integration_tests/release_smoke_test/.gitignore
+1
-0
ios.dart
packages/flutter_tools/lib/src/build_system/targets/ios.dart
+1
-1
clean.dart
packages/flutter_tools/lib/src/commands/clean.dart
+1
-0
project.dart
packages/flutter_tools/lib/src/project.dart
+13
-10
.gitignore
packages/flutter_tools/templates/app/ios.tmpl/.gitignore
+1
-0
.gitignore.tmpl
packages/flutter_tools/templates/package/.gitignore.tmpl
+1
-0
.gitignore
packages/flutter_tools/templates/plugin/ios.tmpl/.gitignore
+1
-0
clean_test.dart
...lutter_tools/test/commands.shard/hermetic/clean_test.dart
+2
-0
.gitignore
packages/integration_test/example/ios/.gitignore
+1
-0
.gitignore
packages/integration_test/ios/.gitignore
+1
-0
No files found.
.gitignore
View file @
d099ae60
...
...
@@ -92,6 +92,7 @@ unlinked_spec.ds
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/ephemeral
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
...
...
dev/benchmarks/complex_layout/ios/.gitignore
View file @
d099ae60
...
...
@@ -18,6 +18,7 @@ Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
...
...
dev/integration_tests/ios_app_with_extensions/ios/.gitignore
View file @
d099ae60
...
...
@@ -18,6 +18,7 @@ Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
...
...
dev/integration_tests/non_nullable/ios/.gitignore
View file @
d099ae60
...
...
@@ -18,6 +18,7 @@ Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
...
...
dev/integration_tests/release_smoke_test/.gitignore
View file @
d099ae60
...
...
@@ -60,6 +60,7 @@
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/ephemeral
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
...
...
packages/flutter_tools/lib/src/build_system/targets/ios.dart
View file @
d099ae60
...
...
@@ -421,7 +421,7 @@ abstract class IosAssetBundle extends Target {
// TODO(jonahwilliams): add plist to inputs
final
FlutterProject
flutterProject
=
FlutterProject
.
fromDirectory
(
environment
.
projectDir
);
final
Directory
plistRoot
=
flutterProject
.
isModule
?
flutterProject
.
ios
.
ephemeralDirectory
?
flutterProject
.
ios
.
ephemeral
Module
Directory
:
environment
.
projectDir
.
childDirectory
(
'ios'
);
plistRoot
.
childDirectory
(
'Flutter'
)
...
...
packages/flutter_tools/lib/src/commands/clean.dart
View file @
d099ae60
...
...
@@ -51,6 +51,7 @@ class CleanCommand extends FlutterCommand {
deleteFile
(
flutterProject
.
android
.
ephemeralDirectory
);
deleteFile
(
flutterProject
.
ios
.
ephemeralDirectory
);
deleteFile
(
flutterProject
.
ios
.
ephemeralModuleDirectory
);
deleteFile
(
flutterProject
.
ios
.
generatedXcodePropertiesFile
);
deleteFile
(
flutterProject
.
ios
.
generatedEnvironmentVariableExportScript
);
deleteFile
(
flutterProject
.
ios
.
deprecatedCompiledDartFramework
);
...
...
packages/flutter_tools/lib/src/project.dart
View file @
d099ae60
...
...
@@ -428,7 +428,7 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
static const String _productBundleIdVariable = r'
$
(
PRODUCT_BUNDLE_IDENTIFIER
)
';
static const String _hostAppProjectName = '
Runner
';
Directory get ephemeralDirectory => parent.directory.childDirectory('
.
ios
');
Directory get ephemeral
Module
Directory => parent.directory.childDirectory('
.
ios
');
Directory get _editableDirectory => parent.directory.childDirectory('
ios
');
/// This parent folder of `Runner.xcodeproj`.
...
...
@@ -436,7 +436,7 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
if (!isModule || _editableDirectory.existsSync()) {
return _editableDirectory;
}
return ephemeralDirectory;
return ephemeral
Module
Directory;
}
/// The root directory of the iOS wrapping of Flutter and plugins. This is the
...
...
@@ -445,7 +445,7 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
///
/// This is the same as [hostAppRoot] except when the project is
/// a Flutter module with an editable host app.
Directory get _flutterLibRoot => isModule ? ephemeralDirectory : _editableDirectory;
Directory get _flutterLibRoot => isModule ? ephemeral
Module
Directory : _editableDirectory;
/// True, if the parent Flutter project is a module project.
bool get isModule => parent.isModule;
...
...
@@ -453,6 +453,9 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
/// Whether the flutter application has an iOS project.
bool get exists => hostAppRoot.existsSync();
/// Put generated files here.
Directory get ephemeralDirectory => _flutterLibRoot.childDirectory('
Flutter
').childDirectory('
ephemeral
');
@override
File xcodeConfigFor(String mode) => _flutterLibRoot.childDirectory('
Flutter
').childFile('
$mode
.
xcconfig
');
...
...
@@ -664,29 +667,29 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
return
;
}
final
bool
pubspecChanged
=
globals
.
fsUtils
.
isOlderThanReference
(
entity:
ephemeralDirectory
,
entity:
ephemeral
Module
Directory
,
referenceFile:
parent
.
pubspecFile
,
);
final
bool
toolingChanged
=
globals
.
cache
.
isOlderThanToolsStamp
(
ephemeralDirectory
);
final
bool
toolingChanged
=
globals
.
cache
.
isOlderThanToolsStamp
(
ephemeral
Module
Directory
);
if
(!
pubspecChanged
&&
!
toolingChanged
)
{
return
;
}
_deleteIfExistsSync
(
ephemeralDirectory
);
_deleteIfExistsSync
(
ephemeral
Module
Directory
);
await
_overwriteFromTemplate
(
globals
.
fs
.
path
.
join
(
'module'
,
'ios'
,
'library'
),
ephemeralDirectory
,
ephemeral
Module
Directory
,
);
// Add ephemeral host app, if a editable host app does not already exist.
if
(!
_editableDirectory
.
existsSync
())
{
await
_overwriteFromTemplate
(
globals
.
fs
.
path
.
join
(
'module'
,
'ios'
,
'host_app_ephemeral'
),
ephemeralDirectory
,
ephemeral
Module
Directory
,
);
if
(
hasPlugins
(
parent
))
{
await
_overwriteFromTemplate
(
globals
.
fs
.
path
.
join
(
'module'
,
'ios'
,
'host_app_ephemeral_cocoapods'
),
ephemeralDirectory
,
ephemeral
Module
Directory
,
);
}
// Use release mode so host project can link on bitcode variant.
...
...
@@ -759,7 +762,7 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
Directory
get
engineCopyDirectory
{
return
isModule
?
ephemeralDirectory
.
childDirectory
(
'Flutter'
).
childDirectory
(
'engine'
)
?
ephemeral
Module
Directory
.
childDirectory
(
'Flutter'
).
childDirectory
(
'engine'
)
:
hostAppRoot
.
childDirectory
(
'Flutter'
);
}
...
...
packages/flutter_tools/templates/app/ios.tmpl/.gitignore
View file @
d099ae60
...
...
@@ -18,6 +18,7 @@ Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
...
...
packages/flutter_tools/templates/package/.gitignore.tmpl
View file @
d099ae60
...
...
@@ -60,6 +60,7 @@ build/
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/ephemeral
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
...
...
packages/flutter_tools/templates/plugin/ios.tmpl/.gitignore
View file @
d099ae60
...
...
@@ -34,4 +34,5 @@ Icon?
.tags*
/Flutter/Generated.xcconfig
/Flutter/ephemeral/
/Flutter/flutter_export_environment.sh
\ No newline at end of file
packages/flutter_tools/test/commands.shard/hermetic/clean_test.dart
View file @
d099ae60
...
...
@@ -53,6 +53,7 @@ void main() {
projectUnderTest
.
android
.
ephemeralDirectory
.
createSync
(
recursive:
true
);
projectUnderTest
.
ios
.
ephemeralDirectory
.
createSync
(
recursive:
true
);
projectUnderTest
.
ios
.
ephemeralModuleDirectory
.
createSync
(
recursive:
true
);
projectUnderTest
.
ios
.
generatedXcodePropertiesFile
.
createSync
(
recursive:
true
);
projectUnderTest
.
ios
.
generatedEnvironmentVariableExportScript
.
createSync
(
recursive:
true
);
projectUnderTest
.
ios
.
deprecatedCompiledDartFramework
.
createSync
(
recursive:
true
);
...
...
@@ -77,6 +78,7 @@ void main() {
expect
(
projectUnderTest
.
android
.
ephemeralDirectory
.
existsSync
(),
isFalse
);
expect
(
projectUnderTest
.
ios
.
ephemeralDirectory
.
existsSync
(),
isFalse
);
expect
(
projectUnderTest
.
ios
.
ephemeralModuleDirectory
.
existsSync
(),
isFalse
);
expect
(
projectUnderTest
.
ios
.
generatedXcodePropertiesFile
.
existsSync
(),
isFalse
);
expect
(
projectUnderTest
.
ios
.
generatedEnvironmentVariableExportScript
.
existsSync
(),
isFalse
);
expect
(
projectUnderTest
.
ios
.
deprecatedCompiledDartFramework
.
existsSync
(),
isFalse
);
...
...
packages/integration_test/example/ios/.gitignore
View file @
d099ae60
...
...
@@ -18,6 +18,7 @@ Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
...
...
packages/integration_test/ios/.gitignore
View file @
d099ae60
...
...
@@ -34,4 +34,5 @@ Icon?
.tags*
/Flutter/Generated.xcconfig
/Flutter/ephemeral
/Flutter/flutter_export_environment.sh
\ No newline at end of file
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