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
4a6558f8
Unverified
Commit
4a6558f8
authored
Jun 28, 2018
by
Sigurd Meldgaard
Committed by
GitHub
Jun 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add iOS module template (#18830)" (#18902)
This reverts commit
8be198d8
that broke the build.
parent
328f9b30
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
114 additions
and
395 deletions
+114
-395
project.pbxproj
...ples/flutter_gallery/ios/Runner.xcodeproj/project.pbxproj
+0
-10
xcode_backend.sh
packages/flutter_tools/bin/xcode_backend.sh
+4
-20
cache.dart
packages/flutter_tools/lib/src/cache.dart
+0
-13
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+11
-11
inject_plugins.dart
packages/flutter_tools/lib/src/commands/inject_plugins.dart
+1
-5
packages.dart
packages/flutter_tools/lib/src/commands/packages.dart
+2
-1
cocoapods.dart
packages/flutter_tools/lib/src/ios/cocoapods.dart
+1
-6
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+1
-6
xcodeproj.dart
packages/flutter_tools/lib/src/ios/xcodeproj.dart
+24
-26
plugins.dart
packages/flutter_tools/lib/src/plugins.dart
+31
-86
project.dart
packages/flutter_tools/lib/src/project.dart
+13
-42
AppFrameworkInfo.plist.copy.tmpl
...ols/templates/module/ios/AppFrameworkInfo.plist.copy.tmpl
+0
-26
README.md.copy.tmpl
...es/flutter_tools/templates/module/ios/README.md.copy.tmpl
+0
-2
podhelper.rb.copy.tmpl
...flutter_tools/templates/module/ios/podhelper.rb.copy.tmpl
+0
-77
cocoapods_test.dart
packages/flutter_tools/test/ios/cocoapods_test.dart
+10
-22
xcodeproj_test.dart
packages/flutter_tools/test/ios/xcodeproj_test.dart
+14
-33
project_test.dart
packages/flutter_tools/test/project_test.dart
+2
-9
No files found.
examples/flutter_gallery/ios/Runner.xcodeproj/project.pbxproj
View file @
4a6558f8
...
@@ -182,8 +182,6 @@
...
@@ -182,8 +182,6 @@
TargetAttributes
=
{
TargetAttributes
=
{
97C146ED1CF9000F007C117D
=
{
97C146ED1CF9000F007C117D
=
{
CreatedOnToolsVersion
=
7.3.1
;
CreatedOnToolsVersion
=
7.3.1
;
DevelopmentTeam
=
EQHXZ8M8AV
;
ProvisioningStyle
=
Manual
;
};
};
};
};
};
};
...
@@ -429,8 +427,6 @@
...
@@ -429,8 +427,6 @@
baseConfigurationReference
=
9740EEB21CF90195004384FC
/* Debug.xcconfig */
;
baseConfigurationReference
=
9740EEB21CF90195004384FC
/* Debug.xcconfig */
;
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_STYLE
=
Manual
;
DEVELOPMENT_TEAM
=
EQHXZ8M8AV
;
ENABLE_BITCODE
=
NO
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
FRAMEWORK_SEARCH_PATHS
=
(
"$(inherited)"
,
"$(inherited)"
,
...
@@ -444,8 +440,6 @@
...
@@ -444,8 +440,6 @@
);
);
PRODUCT_BUNDLE_IDENTIFIER
=
io.flutter.examples.gallery
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.flutter.examples.gallery
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"89aa7622-6c03-475d-baed-b7ebcc3c63b2"
;
PROVISIONING_PROFILE_SPECIFIER
=
"Google Development"
;
};
};
name
=
Debug
;
name
=
Debug
;
};
};
...
@@ -454,8 +448,6 @@
...
@@ -454,8 +448,6 @@
baseConfigurationReference
=
7AFA3C8E1D35360C0083082E
/* Release.xcconfig */
;
baseConfigurationReference
=
7AFA3C8E1D35360C0083082E
/* Release.xcconfig */
;
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_STYLE
=
Manual
;
DEVELOPMENT_TEAM
=
EQHXZ8M8AV
;
ENABLE_BITCODE
=
NO
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
FRAMEWORK_SEARCH_PATHS
=
(
"$(inherited)"
,
"$(inherited)"
,
...
@@ -469,8 +461,6 @@
...
@@ -469,8 +461,6 @@
);
);
PRODUCT_BUNDLE_IDENTIFIER
=
io.flutter.examples.gallery
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.flutter.examples.gallery
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"89aa7622-6c03-475d-baed-b7ebcc3c63b2"
;
PROVISIONING_PROFILE_SPECIFIER
=
"Google Development"
;
};
};
name
=
Release
;
name
=
Release
;
};
};
...
...
packages/flutter_tools/bin/xcode_backend.sh
View file @
4a6558f8
...
@@ -83,20 +83,10 @@ BuildApp() {
...
@@ -83,20 +83,10 @@ BuildApp() {
RunCommand
mkdir
-p
--
"
$derived_dir
"
RunCommand
mkdir
-p
--
"
$derived_dir
"
AssertExists
"
$derived_dir
"
AssertExists
"
$derived_dir
"
RunCommand
rm
-rf
--
"
${
derived_dir
}
/Flutter.framework"
RunCommand
rm
-rf
--
"
${
derived_dir
}
/App.framework"
RunCommand
rm
-rf
--
"
${
derived_dir
}
/App.framework"
RunCommand
cp
-r
--
"
${
framework_path
}
/Flutter.framework"
"
${
derived_dir
}
"
if
[[
-e
"
${
project_path
}
/.ios"
]]
;
then
RunCommand find
"
${
derived_dir
}
/Flutter.framework"
-type
f
-exec
chmod
a-w
"{}"
\;
RunCommand
rm
-rf
--
"
${
derived_dir
}
/engine"
mkdir
"
${
derived_dir
}
/engine"
RunCommand
cp
-r
--
"
${
framework_path
}
/Flutter.podspec"
"
${
derived_dir
}
/engine"
RunCommand
cp
-r
--
"
${
framework_path
}
/Flutter.framework"
"
${
derived_dir
}
/engine"
RunCommand find
"
${
derived_dir
}
/engine/Flutter.framework"
-type
f
-exec
chmod
a-w
"{}"
\;
else
RunCommand
rm
-rf
--
"
${
derived_dir
}
/Flutter.framework"
RunCommand
cp
-r
--
"
${
framework_path
}
/Flutter.framework"
"
${
derived_dir
}
"
RunCommand find
"
${
derived_dir
}
/Flutter.framework"
-type
f
-exec
chmod
a-w
"{}"
\;
fi
RunCommand
pushd
"
${
project_path
}
"
>
/dev/null
RunCommand
pushd
"
${
project_path
}
"
>
/dev/null
AssertExists
"
${
target_path
}
"
AssertExists
"
${
target_path
}
"
...
@@ -165,13 +155,7 @@ BuildApp() {
...
@@ -165,13 +155,7 @@ BuildApp() {
-install_name
'@rpath/App.framework/App'
\
-install_name
'@rpath/App.framework/App'
\
-o
"
${
derived_dir
}
/App.framework/App"
-
)
"
-o
"
${
derived_dir
}
/App.framework/App"
-
)
"
fi
fi
RunCommand
cp
--
"
${
project_path
}
/ios/Flutter/AppFrameworkInfo.plist"
"
${
derived_dir
}
/App.framework/Info.plist"
local
plistPath
=
"
${
project_path
}
/ios/Flutter/AppFrameworkInfo.plist"
if
[[
-e
"
${
project_path
}
/.ios"
]]
;
then
plistPath
=
"
${
project_path
}
/.ios/Flutter/AppFrameworkInfo.plist"
fi
RunCommand
cp
--
"
$plistPath
"
"
${
derived_dir
}
/App.framework/Info.plist"
local
precompilation_flag
=
""
local
precompilation_flag
=
""
if
[[
"
$CURRENT_ARCH
"
!=
"x86_64"
]]
&&
[[
"
$build_mode
"
!=
"debug"
]]
;
then
if
[[
"
$CURRENT_ARCH
"
!=
"x86_64"
]]
&&
[[
"
$build_mode
"
!=
"debug"
]]
;
then
...
...
packages/flutter_tools/lib/src/cache.dart
View file @
4a6558f8
...
@@ -169,19 +169,6 @@ class Cache {
...
@@ -169,19 +169,6 @@ class Cache {
return
fs
.
file
(
fs
.
path
.
join
(
getRoot
().
path
,
'
$artifactName
.stamp'
));
return
fs
.
file
(
fs
.
path
.
join
(
getRoot
().
path
,
'
$artifactName
.stamp'
));
}
}
/// Returns `true` if either [file] is older than the tools stamp or if
/// [file] doesn't exist.
bool
fileOlderThanToolsStamp
(
File
file
)
{
if
(!
file
.
existsSync
())
{
return
true
;
}
final
File
flutterToolsStamp
=
getStampFileFor
(
'flutter_tools'
);
return
flutterToolsStamp
.
existsSync
()
&&
flutterToolsStamp
.
lastModifiedSync
()
.
isAfter
(
file
.
lastModifiedSync
());
}
bool
isUpToDate
()
=>
_artifacts
.
every
((
CachedArtifact
artifact
)
=>
artifact
.
isUpToDate
());
bool
isUpToDate
()
=>
_artifacts
.
every
((
CachedArtifact
artifact
)
=>
artifact
.
isUpToDate
());
Future
<
String
>
getThirdPartyFile
(
String
urlStr
,
String
serviceName
)
async
{
Future
<
String
>
getThirdPartyFile
(
String
urlStr
,
String
serviceName
)
async
{
...
...
packages/flutter_tools/lib/src/commands/create.dart
View file @
4a6558f8
...
@@ -233,20 +233,20 @@ To edit platform code in an IDE see https://flutter.io/developing-packages/#edit
...
@@ -233,20 +233,20 @@ To edit platform code in an IDE see https://flutter.io/developing-packages/#edit
}
}
}
}
Future
<
int
>
_generateModule
(
String
p
ath
,
Map
<
String
,
dynamic
>
templateContext
)
async
{
Future
<
int
>
_generateModule
(
String
dirP
ath
,
Map
<
String
,
dynamic
>
templateContext
)
async
{
int
generatedCount
=
0
;
int
generatedCount
=
0
;
final
String
description
=
argResults
.
wasParsed
(
'description'
)
final
String
description
=
argResults
.
wasParsed
(
'description'
)
?
argResults
[
'description'
]
?
argResults
[
'description'
]
:
'A new flutter module project.'
;
:
'A new flutter module project.'
;
templateContext
[
'description'
]
=
description
;
templateContext
[
'description'
]
=
description
;
generatedCount
+=
_renderTemplate
(
fs
.
path
.
join
(
'module'
,
'common'
),
p
ath
,
templateContext
);
generatedCount
+=
_renderTemplate
(
fs
.
path
.
join
(
'module'
,
'common'
),
dirP
ath
,
templateContext
);
if
(
argResults
[
'pub'
])
{
if
(
argResults
[
'pub'
])
{
await
pubGet
(
await
pubGet
(
context:
PubContext
.
create
,
context:
PubContext
.
create
,
directory:
p
ath
,
directory:
dirP
ath
,
offline:
argResults
[
'offline'
],
offline:
argResults
[
'offline'
],
);
);
final
FlutterProject
project
=
new
FlutterProject
.
fromPath
(
path
);
final
FlutterProject
project
=
new
FlutterProject
(
fs
.
directory
(
dirPath
)
);
await
project
.
ensureReadyForPlatformSpecificTooling
();
await
project
.
ensureReadyForPlatformSpecificTooling
();
}
}
return
generatedCount
;
return
generatedCount
;
...
@@ -303,23 +303,23 @@ To edit platform code in an IDE see https://flutter.io/developing-packages/#edit
...
@@ -303,23 +303,23 @@ To edit platform code in an IDE see https://flutter.io/developing-packages/#edit
return
generatedCount
;
return
generatedCount
;
}
}
Future
<
int
>
_generateApp
(
String
project
Path
,
Map
<
String
,
dynamic
>
templateContext
)
async
{
Future
<
int
>
_generateApp
(
String
app
Path
,
Map
<
String
,
dynamic
>
templateContext
)
async
{
int
generatedCount
=
0
;
int
generatedCount
=
0
;
generatedCount
+=
_renderTemplate
(
'create'
,
project
Path
,
templateContext
);
generatedCount
+=
_renderTemplate
(
'create'
,
app
Path
,
templateContext
);
generatedCount
+=
_injectGradleWrapper
(
project
Path
);
generatedCount
+=
_injectGradleWrapper
(
app
Path
);
if
(
argResults
[
'with-driver-test'
])
{
if
(
argResults
[
'with-driver-test'
])
{
final
String
testPath
=
fs
.
path
.
join
(
project
Path
,
'test_driver'
);
final
String
testPath
=
fs
.
path
.
join
(
app
Path
,
'test_driver'
);
generatedCount
+=
_renderTemplate
(
'driver'
,
testPath
,
templateContext
);
generatedCount
+=
_renderTemplate
(
'driver'
,
testPath
,
templateContext
);
}
}
if
(
argResults
[
'pub'
])
{
if
(
argResults
[
'pub'
])
{
await
pubGet
(
context:
PubContext
.
create
,
directory:
project
Path
,
offline:
argResults
[
'offline'
]);
await
pubGet
(
context:
PubContext
.
create
,
directory:
app
Path
,
offline:
argResults
[
'offline'
]);
await
new
FlutterProject
.
fromPath
(
projectPath
).
ensureReadyForPlatformSpecificTooling
();
await
new
FlutterProject
(
fs
.
directory
(
appPath
)
).
ensureReadyForPlatformSpecificTooling
();
}
}
if
(
android_sdk
.
androidSdk
!=
null
)
if
(
android_sdk
.
androidSdk
!=
null
)
await
gradle
.
updateLocalProperties
(
projectPath:
project
Path
);
await
gradle
.
updateLocalProperties
(
projectPath:
app
Path
);
return
generatedCount
;
return
generatedCount
;
}
}
...
...
packages/flutter_tools/lib/src/commands/inject_plugins.dart
View file @
4a6558f8
...
@@ -4,8 +4,6 @@
...
@@ -4,8 +4,6 @@
import
'dart:async'
;
import
'dart:async'
;
import
'../base/file_system.dart'
;
import
'../flutter_manifest.dart'
;
import
'../globals.dart'
;
import
'../globals.dart'
;
import
'../plugins.dart'
;
import
'../plugins.dart'
;
import
'../runner/flutter_command.dart'
;
import
'../runner/flutter_command.dart'
;
...
@@ -26,9 +24,7 @@ class InjectPluginsCommand extends FlutterCommand {
...
@@ -26,9 +24,7 @@ class InjectPluginsCommand extends FlutterCommand {
@override
@override
Future
<
Null
>
runCommand
()
async
{
Future
<
Null
>
runCommand
()
async
{
final
String
projectPath
=
fs
.
currentDirectory
.
path
;
injectPlugins
();
final
FlutterManifest
manifest
=
await
FlutterManifest
.
createFromPath
(
projectPath
);
injectPlugins
(
projectPath:
projectPath
,
manifest:
manifest
);
final
bool
result
=
hasPlugins
();
final
bool
result
=
hasPlugins
();
if
(
result
)
{
if
(
result
)
{
printStatus
(
'GeneratedPluginRegistrants successfully written.'
);
printStatus
(
'GeneratedPluginRegistrants successfully written.'
);
...
...
packages/flutter_tools/lib/src/commands/packages.dart
View file @
4a6558f8
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
import
'dart:async'
;
import
'dart:async'
;
import
'../base/common.dart'
;
import
'../base/common.dart'
;
import
'../base/file_system.dart'
;
import
'../base/os.dart'
;
import
'../base/os.dart'
;
import
'../dart/pub.dart'
;
import
'../dart/pub.dart'
;
import
'../project.dart'
;
import
'../project.dart'
;
...
@@ -80,7 +81,7 @@ class PackagesGetCommand extends FlutterCommand {
...
@@ -80,7 +81,7 @@ class PackagesGetCommand extends FlutterCommand {
}
}
await
_runPubGet
(
target
);
await
_runPubGet
(
target
);
final
FlutterProject
rootProject
=
new
FlutterProject
.
fromPath
(
target
);
final
FlutterProject
rootProject
=
new
FlutterProject
(
fs
.
directory
(
target
)
);
await
rootProject
.
ensureReadyForPlatformSpecificTooling
();
await
rootProject
.
ensureReadyForPlatformSpecificTooling
();
// Get/upgrade packages in example app as well
// Get/upgrade packages in example app as well
...
...
packages/flutter_tools/lib/src/ios/cocoapods.dart
View file @
4a6558f8
...
@@ -15,7 +15,6 @@ import '../base/process.dart';
...
@@ -15,7 +15,6 @@ import '../base/process.dart';
import
'../base/process_manager.dart'
;
import
'../base/process_manager.dart'
;
import
'../base/version.dart'
;
import
'../base/version.dart'
;
import
'../cache.dart'
;
import
'../cache.dart'
;
import
'../flutter_manifest.dart'
;
import
'../globals.dart'
;
import
'../globals.dart'
;
import
'xcodeproj.dart'
;
import
'xcodeproj.dart'
;
...
@@ -151,14 +150,11 @@ class CocoaPods {
...
@@ -151,14 +150,11 @@ class CocoaPods {
/// Ensures the `ios` sub-project of the Flutter project at [appDirectory]
/// Ensures the `ios` sub-project of the Flutter project at [appDirectory]
/// contains a suitable `Podfile` and that its `Flutter/Xxx.xcconfig` files
/// contains a suitable `Podfile` and that its `Flutter/Xxx.xcconfig` files
/// include pods configuration.
/// include pods configuration.
void
setupPodfile
(
String
appDirectory
,
FlutterManifest
manifest
)
{
void
setupPodfile
(
String
appDirectory
)
{
if
(!
xcodeProjectInterpreter
.
isInstalled
)
{
if
(!
xcodeProjectInterpreter
.
isInstalled
)
{
// Don't do anything for iOS when host platform doesn't support it.
// Don't do anything for iOS when host platform doesn't support it.
return
;
return
;
}
}
if
(!
fs
.
directory
(
fs
.
path
.
join
(
appDirectory
,
'ios'
)).
existsSync
())
{
return
;
}
final
String
podfilePath
=
fs
.
path
.
join
(
appDirectory
,
'ios'
,
'Podfile'
);
final
String
podfilePath
=
fs
.
path
.
join
(
appDirectory
,
'ios'
,
'Podfile'
);
if
(!
fs
.
file
(
podfilePath
).
existsSync
())
{
if
(!
fs
.
file
(
podfilePath
).
existsSync
())
{
final
bool
isSwift
=
xcodeProjectInterpreter
.
getBuildSettings
(
final
bool
isSwift
=
xcodeProjectInterpreter
.
getBuildSettings
(
...
@@ -175,7 +171,6 @@ class CocoaPods {
...
@@ -175,7 +171,6 @@ class CocoaPods {
));
));
podfileTemplate
.
copySync
(
podfilePath
);
podfileTemplate
.
copySync
(
podfilePath
);
}
}
_addPodsDependencyToFlutterXcconfig
(
appDirectory
,
'Debug'
);
_addPodsDependencyToFlutterXcconfig
(
appDirectory
,
'Debug'
);
_addPodsDependencyToFlutterXcconfig
(
appDirectory
,
'Release'
);
_addPodsDependencyToFlutterXcconfig
(
appDirectory
,
'Release'
);
}
}
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
4a6558f8
...
@@ -20,7 +20,6 @@ import '../base/process.dart';
...
@@ -20,7 +20,6 @@ import '../base/process.dart';
import
'../base/process_manager.dart'
;
import
'../base/process_manager.dart'
;
import
'../base/utils.dart'
;
import
'../base/utils.dart'
;
import
'../build_info.dart'
;
import
'../build_info.dart'
;
import
'../flutter_manifest.dart'
;
import
'../globals.dart'
;
import
'../globals.dart'
;
import
'../plugins.dart'
;
import
'../plugins.dart'
;
import
'../services.dart'
;
import
'../services.dart'
;
...
@@ -243,15 +242,11 @@ Future<XcodeBuildResult> buildXcodeProject({
...
@@ -243,15 +242,11 @@ Future<XcodeBuildResult> buildXcodeProject({
final
Directory
appDirectory
=
fs
.
directory
(
app
.
appDirectory
);
final
Directory
appDirectory
=
fs
.
directory
(
app
.
appDirectory
);
await
_addServicesToBundle
(
appDirectory
);
await
_addServicesToBundle
(
appDirectory
);
final
FlutterManifest
manifest
=
await
FlutterManifest
.
createFromPath
(
await
updateGeneratedXcodeProperties
(
fs
.
currentDirectory
.
childFile
(
'pubspec.yaml'
).
path
,
);
updateGeneratedXcodeProperties
(
projectPath:
fs
.
currentDirectory
.
path
,
projectPath:
fs
.
currentDirectory
.
path
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
targetOverride:
targetOverride
,
targetOverride:
targetOverride
,
previewDart2:
buildInfo
.
previewDart2
,
previewDart2:
buildInfo
.
previewDart2
,
manifest:
manifest
,
);
);
if
(
hasPlugins
())
{
if
(
hasPlugins
())
{
...
...
packages/flutter_tools/lib/src/ios/xcodeproj.dart
View file @
4a6558f8
...
@@ -2,9 +2,12 @@
...
@@ -2,9 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:async'
;
import
'package:meta/meta.dart'
;
import
'package:meta/meta.dart'
;
import
'../artifacts.dart'
;
import
'../artifacts.dart'
;
import
'../base/common.dart'
;
import
'../base/context.dart'
;
import
'../base/context.dart'
;
import
'../base/file_system.dart'
;
import
'../base/file_system.dart'
;
import
'../base/io.dart'
;
import
'../base/io.dart'
;
...
@@ -25,30 +28,21 @@ String flutterFrameworkDir(BuildMode mode) {
...
@@ -25,30 +28,21 @@ String flutterFrameworkDir(BuildMode mode) {
return
fs
.
path
.
normalize
(
fs
.
path
.
dirname
(
artifacts
.
getArtifactPath
(
Artifact
.
flutterFramework
,
TargetPlatform
.
ios
,
mode
)));
return
fs
.
path
.
normalize
(
fs
.
path
.
dirname
(
artifacts
.
getArtifactPath
(
Artifact
.
flutterFramework
,
TargetPlatform
.
ios
,
mode
)));
}
}
String
_generatedXcodePropertiesPath
(
{
@required
String
projectPath
,
@required
FlutterManifest
manifest
})
{
String
_generatedXcodePropertiesPath
(
String
projectPath
)
{
if
(
manifest
.
isModule
)
{
return
fs
.
path
.
join
(
projectPath
,
'ios'
,
'Flutter'
,
'Generated.xcconfig'
);
return
fs
.
path
.
join
(
projectPath
,
'.ios'
,
'Flutter'
,
'Generated.xcconfig'
);
}
else
{
return
fs
.
path
.
join
(
projectPath
,
'ios'
,
'Flutter'
,
'Generated.xcconfig'
);
}
}
}
/// Writes default Xcode properties files in the Flutter project at [projectPath],
/// Writes default Xcode properties files in the Flutter project at [projectPath],
/// if project is an iOS project and such files are out of date or do not
/// if project is an iOS project and such files do not already exist.
/// already exist.
Future
<
void
>
generateXcodeProperties
(
String
projectPath
)
async
{
void
generateXcodeProperties
(
{
String
projectPath
,
FlutterManifest
manifest
})
{
if
(
fs
.
isDirectorySync
(
fs
.
path
.
join
(
projectPath
,
'ios'
)))
{
if
(
manifest
.
isModule
||
fs
.
isDirectorySync
(
fs
.
path
.
join
(
projectPath
,
'ios'
)))
{
if
(
fs
.
file
(
_generatedXcodePropertiesPath
(
projectPath
)).
existsSync
())
final
File
propertiesFile
=
fs
.
file
(
_generatedXcodePropertiesPath
(
projectPath:
projectPath
,
manifest:
manifest
));
if
(!
Cache
.
instance
.
fileOlderThanToolsStamp
(
propertiesFile
))
{
return
;
return
;
}
await
updateGeneratedXcodeProperties
(
updateGeneratedXcodeProperties
(
projectPath:
projectPath
,
projectPath:
projectPath
,
manifest:
manifest
,
buildInfo:
BuildInfo
.
debug
,
buildInfo:
BuildInfo
.
debug
,
targetOverride:
bundle
.
defaultMainPath
,
targetOverride:
bundle
.
defaultMainPath
,
previewDart2:
tru
e
,
previewDart2:
fals
e
,
);
);
}
}
}
}
...
@@ -57,13 +51,14 @@ void generateXcodeProperties({String projectPath, FlutterManifest manifest}) {
...
@@ -57,13 +51,14 @@ void generateXcodeProperties({String projectPath, FlutterManifest manifest}) {
///
///
/// targetOverride: Optional parameter, if null or unspecified the default value
/// targetOverride: Optional parameter, if null or unspecified the default value
/// from xcode_backend.sh is used 'lib/main.dart'.
/// from xcode_backend.sh is used 'lib/main.dart'.
void
updateGeneratedXcodeProperties
(
{
///
/// Returns the number of files written.
Future
<
void
>
updateGeneratedXcodeProperties
({
@required
String
projectPath
,
@required
String
projectPath
,
@required
FlutterManifest
manifest
,
@required
BuildInfo
buildInfo
,
@required
BuildInfo
buildInfo
,
String
targetOverride
,
String
targetOverride
,
@required
bool
previewDart2
,
@required
bool
previewDart2
,
})
{
})
async
{
final
StringBuffer
localsBuffer
=
new
StringBuffer
();
final
StringBuffer
localsBuffer
=
new
StringBuffer
();
localsBuffer
.
writeln
(
'// This is a generated file; do not edit or check into version control.'
);
localsBuffer
.
writeln
(
'// This is a generated file; do not edit or check into version control.'
);
...
@@ -86,11 +81,14 @@ void updateGeneratedXcodeProperties({
...
@@ -86,11 +81,14 @@ void updateGeneratedXcodeProperties({
localsBuffer
.
writeln
(
'SYMROOT=
\
${SOURCE_ROOT}
/../
${getIosBuildDirectory()}
'
);
localsBuffer
.
writeln
(
'SYMROOT=
\
${SOURCE_ROOT}
/../
${getIosBuildDirectory()}
'
);
if
(!
manifest
.
isModule
)
{
localsBuffer
.
writeln
(
'FLUTTER_FRAMEWORK_DIR=
${flutterFrameworkDir(buildInfo.mode)}
'
);
// For module projects we do not want to write the FLUTTER_FRAMEWORK_DIR
// explicitly. Rather we rely on the xcode backend script and the Podfile
final
String
flutterManifest
=
fs
.
path
.
join
(
projectPath
,
bundle
.
defaultManifestPath
);
// logic to derive it from FLUTTER_ROOT and FLUTTER_BUILD_MODE.
FlutterManifest
manifest
;
localsBuffer
.
writeln
(
'FLUTTER_FRAMEWORK_DIR=
${flutterFrameworkDir(buildInfo.mode)}
'
);
try
{
manifest
=
await
FlutterManifest
.
createFromPath
(
flutterManifest
);
}
catch
(
error
)
{
throwToolExit
(
'Failed to load pubspec.yaml:
$error
'
);
}
}
final
String
buildName
=
buildInfo
?.
buildName
??
manifest
.
buildName
;
final
String
buildName
=
buildInfo
?.
buildName
??
manifest
.
buildName
;
...
@@ -125,7 +123,7 @@ void updateGeneratedXcodeProperties({
...
@@ -125,7 +123,7 @@ void updateGeneratedXcodeProperties({
localsBuffer
.
writeln
(
'TRACK_WIDGET_CREATION=true'
);
localsBuffer
.
writeln
(
'TRACK_WIDGET_CREATION=true'
);
}
}
final
File
localsFile
=
fs
.
file
(
_generatedXcodePropertiesPath
(
projectPath
:
projectPath
,
manifest:
manifest
));
final
File
localsFile
=
fs
.
file
(
_generatedXcodePropertiesPath
(
projectPath
));
localsFile
.
createSync
(
recursive:
true
);
localsFile
.
createSync
(
recursive:
true
);
localsFile
.
writeAsStringSync
(
localsBuffer
.
toString
());
localsFile
.
writeAsStringSync
(
localsBuffer
.
toString
());
}
}
...
...
packages/flutter_tools/lib/src/plugins.dart
View file @
4a6558f8
...
@@ -8,18 +8,9 @@ import 'package:yaml/yaml.dart';
...
@@ -8,18 +8,9 @@ import 'package:yaml/yaml.dart';
import
'base/file_system.dart'
;
import
'base/file_system.dart'
;
import
'dart/package_map.dart'
;
import
'dart/package_map.dart'
;
import
'flutter_manifest.dart'
;
import
'globals.dart'
;
import
'globals.dart'
;
import
'ios/cocoapods.dart'
;
import
'ios/cocoapods.dart'
;
void
_renderTemplateToFile
(
String
template
,
dynamic
context
,
String
filePath
)
{
final
String
renderedTemplate
=
new
mustache
.
Template
(
template
).
renderString
(
context
);
final
File
file
=
fs
.
file
(
filePath
);
file
.
createSync
(
recursive:
true
);
file
.
writeAsStringSync
(
renderedTemplate
);
}
class
Plugin
{
class
Plugin
{
final
String
name
;
final
String
name
;
final
String
path
;
final
String
path
;
...
@@ -69,7 +60,7 @@ Plugin _pluginFromPubspec(String name, Uri packageRoot) {
...
@@ -69,7 +60,7 @@ Plugin _pluginFromPubspec(String name, Uri packageRoot) {
return
new
Plugin
.
fromYaml
(
name
,
packageRootPath
,
flutterConfig
[
'plugin'
]);
return
new
Plugin
.
fromYaml
(
name
,
packageRootPath
,
flutterConfig
[
'plugin'
]);
}
}
List
<
Plugin
>
findPlugins
(
String
directory
)
{
List
<
Plugin
>
_
findPlugins
(
String
directory
)
{
final
List
<
Plugin
>
plugins
=
<
Plugin
>[];
final
List
<
Plugin
>
plugins
=
<
Plugin
>[];
Map
<
String
,
Uri
>
packages
;
Map
<
String
,
Uri
>
packages
;
try
{
try
{
...
@@ -155,9 +146,14 @@ void _writeAndroidPluginRegistrant(String directory, List<Plugin> plugins) {
...
@@ -155,9 +146,14 @@ void _writeAndroidPluginRegistrant(String directory, List<Plugin> plugins) {
'plugins'
:
androidPlugins
,
'plugins'
:
androidPlugins
,
};
};
final
String
pluginRegistry
=
new
mustache
.
Template
(
_androidPluginRegistryTemplate
).
renderString
(
context
);
final
String
javaSourcePath
=
fs
.
path
.
join
(
directory
,
'src'
,
'main'
,
'java'
);
final
String
javaSourcePath
=
fs
.
path
.
join
(
directory
,
'src'
,
'main'
,
'java'
);
final
String
registryPath
=
fs
.
path
.
join
(
javaSourcePath
,
'io'
,
'flutter'
,
'plugins'
,
'GeneratedPluginRegistrant.java'
);
final
Directory
registryDirectory
=
_renderTemplateToFile
(
_androidPluginRegistryTemplate
,
context
,
registryPath
);
fs
.
directory
(
fs
.
path
.
join
(
javaSourcePath
,
'io'
,
'flutter'
,
'plugins'
));
registryDirectory
.
createSync
(
recursive:
true
);
final
File
registryFile
=
registryDirectory
.
childFile
(
'GeneratedPluginRegistrant.java'
);
registryFile
.
writeAsStringSync
(
pluginRegistry
);
}
}
const
String
_iosPluginRegistryHeaderTemplate
=
'''//
const
String
_iosPluginRegistryHeaderTemplate
=
'''//
...
@@ -196,32 +192,7 @@ const String _iosPluginRegistryImplementationTemplate = '''//
...
@@ -196,32 +192,7 @@ const String _iosPluginRegistryImplementationTemplate = '''//
@end
@end
'''
;
'''
;
const
String
_iosPluginRegistrantPodspecTemplate
=
'''
void
_writeIOSPluginRegistrant
(
String
directory
,
List
<
Plugin
>
plugins
)
{
#
# Generated file, do not edit.
#
Pod::Spec.new do |s|
s.name = '
FlutterPluginRegistrant
'
s.version = '
0.0
.
1
'
s.summary = '
Registers
plugins
with
your
flutter
app
'
s.description = <<-DESC
Depends on all your plugins, and provides a function to register them.
DESC
s.homepage = '
https:
//flutter.io'
s
.
license
=
{
:
type
=>
'BSD'
}
s
.
author
=
{
'Flutter Dev Team'
=>
'flutter-dev@googlegroups.com'
}
s
.
ios
.
deployment_target
=
'7.0'
s
.
source_files
=
"Classes"
,
"Classes/**/*.{h,m}"
s
.
source
=
{
:
path
=>
'.'
}
s
.
public_header_files
=
'./Classes/**/*.h'
{{
#plugins
}}
s
.
dependency
'{{name}}'
{{/
plugins
}}
end
''';
void _writeIOSPluginRegistrant(String directory, FlutterManifest manifest, List<Plugin> plugins) {
final
List
<
Map
<
String
,
dynamic
>>
iosPlugins
=
plugins
final
List
<
Map
<
String
,
dynamic
>>
iosPlugins
=
plugins
.
where
((
Plugin
p
)
=>
p
.
pluginClass
!=
null
)
.
where
((
Plugin
p
)
=>
p
.
pluginClass
!=
null
)
.
map
((
Plugin
p
)
=>
<
String
,
dynamic
>{
.
map
((
Plugin
p
)
=>
<
String
,
dynamic
>{
...
@@ -234,41 +205,16 @@ void _writeIOSPluginRegistrant(String directory, FlutterManifest manifest, List<
...
@@ -234,41 +205,16 @@ void _writeIOSPluginRegistrant(String directory, FlutterManifest manifest, List<
'plugins'
:
iosPlugins
,
'plugins'
:
iosPlugins
,
};
};
if
(
manifest
.
isModule
)
{
final
String
pluginRegistryHeader
=
// In a module create the GeneratedPluginRegistrant as a pod to be included
new
mustache
.
Template
(
_iosPluginRegistryHeaderTemplate
).
renderString
(
context
);
// from a hosting app.
final
String
pluginRegistryImplementation
=
final
String
registryDirectory
=
fs
.
path
.
join
(
directory
,
'FlutterPluginRegistrant'
);
new
mustache
.
Template
(
_iosPluginRegistryImplementationTemplate
).
renderString
(
context
);
final
String
registryClassesDirectory
=
fs
.
path
.
join
(
registryDirectory
,
'Classes'
);
final
Directory
registryDirectory
=
fs
.
directory
(
fs
.
path
.
join
(
directory
,
'ios'
,
'Runner'
));
_renderTemplateToFile
(
registryDirectory
.
createSync
(
recursive:
true
);
_iosPluginRegistrantPodspecTemplate
,
final
File
registryHeaderFile
=
registryDirectory
.
childFile
(
'GeneratedPluginRegistrant.h'
);
context
,
registryHeaderFile
.
writeAsStringSync
(
pluginRegistryHeader
);
fs
.
path
.
join
(
registryDirectory
,
'FlutterPluginRegistrant.podspec'
),
final
File
registryImplementationFile
=
registryDirectory
.
childFile
(
'GeneratedPluginRegistrant.m'
);
);
registryImplementationFile
.
writeAsStringSync
(
pluginRegistryImplementation
);
_renderTemplateToFile
(
_iosPluginRegistryHeaderTemplate
,
context
,
fs
.
path
.
join
(
registryClassesDirectory
,
'GeneratedPluginRegistrant.h'
),
);
_renderTemplateToFile
(
_iosPluginRegistryImplementationTemplate
,
context
,
fs
.
path
.
join
(
registryClassesDirectory
,
'GeneratedPluginRegistrant.m'
),
);
}
else
{
// For a non-module create the GeneratedPluginRegistrant as source files
// directly in the ios project.
final
String
runnerDirectory
=
fs
.
path
.
join
(
directory
,
'Runner'
);
_renderTemplateToFile
(
_iosPluginRegistryHeaderTemplate
,
context
,
fs
.
path
.
join
(
runnerDirectory
,
'GeneratedPluginRegistrant.h'
),
);
_renderTemplateToFile
(
_iosPluginRegistryImplementationTemplate
,
context
,
fs
.
path
.
join
(
runnerDirectory
,
'GeneratedPluginRegistrant.m'
),
);
}
}
}
class
InjectPluginsResult
{
class
InjectPluginsResult
{
...
@@ -283,23 +229,22 @@ class InjectPluginsResult{
...
@@ -283,23 +229,22 @@ class InjectPluginsResult{
}
}
/// Injects plugins found in `pubspec.yaml` into the platform-specific projects.
/// Injects plugins found in `pubspec.yaml` into the platform-specific projects.
void
injectPlugins
(
{
@required
String
projectPath
,
@required
FlutterManifest
manifest
})
{
void
injectPlugins
(
{
String
directory
})
{
final
List
<
Plugin
>
plugins
=
findPlugins
(
projectPath
);
directory
??=
fs
.
currentDirectory
.
path
;
final
bool
changed
=
_writeFlutterPluginsList
(
projectPath
,
plugins
);
final
List
<
Plugin
>
plugins
=
_findPlugins
(
directory
);
if
(
manifest
.
isModule
)
{
final
bool
changed
=
_writeFlutterPluginsList
(
directory
,
plugins
);
_writeAndroidPluginRegistrant
(
fs
.
path
.
join
(
projectPath
,
'.android'
,
'Flutter'
),
plugins
);
if
(
fs
.
isDirectorySync
(
fs
.
path
.
join
(
directory
,
'.android'
,
'Flutter'
)))
{
}
else
if
(
fs
.
isDirectorySync
(
fs
.
path
.
join
(
projectPath
,
'android'
,
'app'
)))
{
_writeAndroidPluginRegistrant
(
fs
.
path
.
join
(
directory
,
'.android'
,
'Flutter'
),
plugins
);
_writeAndroidPluginRegistrant
(
fs
.
path
.
join
(
projectPath
,
'android'
,
'app'
),
plugins
);
}
else
if
(
fs
.
isDirectorySync
(
fs
.
path
.
join
(
directory
,
'android'
,
'app'
)))
{
_writeAndroidPluginRegistrant
(
fs
.
path
.
join
(
directory
,
'android'
,
'app'
),
plugins
);
}
}
if
(
manifest
.
isModule
)
{
if
(
fs
.
isDirectorySync
(
fs
.
path
.
join
(
directory
,
'ios'
)))
{
_writeIOSPluginRegistrant
(
fs
.
path
.
join
(
projectPath
,
'.ios'
),
manifest
,
plugins
);
_writeIOSPluginRegistrant
(
directory
,
plugins
);
}
else
if
(
fs
.
isDirectorySync
(
fs
.
path
.
join
(
projectPath
,
'ios'
)))
{
_writeIOSPluginRegistrant
(
fs
.
path
.
join
(
projectPath
,
'ios'
),
manifest
,
plugins
);
final
CocoaPods
cocoaPods
=
new
CocoaPods
();
final
CocoaPods
cocoaPods
=
new
CocoaPods
();
if
(
plugins
.
isNotEmpty
)
if
(
plugins
.
isNotEmpty
)
cocoaPods
.
setupPodfile
(
projectPath
,
manifest
);
cocoaPods
.
setupPodfile
(
directory
);
if
(
changed
)
if
(
changed
)
cocoaPods
.
invalidatePodInstallOutput
(
projectPath
);
cocoaPods
.
invalidatePodInstallOutput
(
directory
);
}
}
}
}
...
...
packages/flutter_tools/lib/src/project.dart
View file @
4a6558f8
...
@@ -8,7 +8,6 @@ import 'dart:convert';
...
@@ -8,7 +8,6 @@ import 'dart:convert';
import
'android/gradle.dart'
as
gradle
;
import
'android/gradle.dart'
as
gradle
;
import
'base/file_system.dart'
;
import
'base/file_system.dart'
;
import
'bundle.dart'
as
bundle
;
import
'cache.dart'
;
import
'cache.dart'
;
import
'flutter_manifest.dart'
;
import
'flutter_manifest.dart'
;
import
'ios/xcodeproj.dart'
as
xcode
;
import
'ios/xcodeproj.dart'
as
xcode
;
...
@@ -17,20 +16,11 @@ import 'template.dart';
...
@@ -17,20 +16,11 @@ import 'template.dart';
/// Represents the contents of a Flutter project at the specified [directory].
/// Represents the contents of a Flutter project at the specified [directory].
class
FlutterProject
{
class
FlutterProject
{
FlutterProject
(
this
.
directory
);
FlutterProject
(
this
.
directory
);
FlutterProject
.
fromPath
(
String
projectPath
)
:
directory
=
fs
.
directory
(
projectPath
);
/// The location of this project.
/// The location of this project.
final
Directory
directory
;
final
Directory
directory
;
Future
<
FlutterManifest
>
get
manifest
{
return
_manifest
??=
FlutterManifest
.
createFromPath
(
directory
.
childFile
(
bundle
.
defaultManifestPath
).
path
,
);
}
Future
<
FlutterManifest
>
_manifest
;
/// Asynchronously returns the organization names found in this project as
/// Asynchronously returns the organization names found in this project as
/// part of iOS product bundle identifier, Android application ID, or
/// part of iOS product bundle identifier, Android application ID, or
/// Gradle group ID.
/// Gradle group ID.
...
@@ -64,17 +54,11 @@ class FlutterProject {
...
@@ -64,17 +54,11 @@ class FlutterProject {
/// The generated AndroidModule sub project of this module project.
/// The generated AndroidModule sub project of this module project.
AndroidModuleProject
get
androidModule
=>
new
AndroidModuleProject
(
directory
.
childDirectory
(
'.android'
));
AndroidModuleProject
get
androidModule
=>
new
AndroidModuleProject
(
directory
.
childDirectory
(
'.android'
));
/// The generated IosModule sub project of this module project.
IosModuleProject
get
iosModule
=>
new
IosModuleProject
(
directory
.
childDirectory
(
'.ios'
));
/// Returns true if this project has an example application
/// Returns true if this project has an example application
bool
get
hasExampleApp
=>
_exampleDirectory
.
childFile
(
'pubspec.yaml'
).
existsSync
();
bool
get
hasExampleApp
=>
directory
.
childDirectory
(
'example'
)
.
childFile
(
'pubspec.yaml'
).
existsSync
();
/// The example sub project of this (package or plugin) project.
/// The example sub project of this (package or plugin) project.
FlutterProject
get
example
=>
new
FlutterProject
(
_exampleDirectory
);
FlutterProject
get
example
=>
new
FlutterProject
(
directory
.
childDirectory
(
'example'
));
/// The directory that will contain the example if an example exists.
Directory
get
_exampleDirectory
=>
directory
.
childDirectory
(
'example'
);
/// Generates project files necessary to make Gradle builds work on Android
/// Generates project files necessary to make Gradle builds work on Android
/// and CocoaPods+Xcode work on iOS, for app and module projects only.
/// and CocoaPods+Xcode work on iOS, for app and module projects only.
...
@@ -84,13 +68,12 @@ class FlutterProject {
...
@@ -84,13 +68,12 @@ class FlutterProject {
if
(!
directory
.
existsSync
()
||
hasExampleApp
)
{
if
(!
directory
.
existsSync
()
||
hasExampleApp
)
{
return
0
;
return
0
;
}
}
final
FlutterManifest
manifest
=
await
this
.
manifest
;
final
FlutterManifest
manifest
=
await
FlutterManifest
.
createFromPath
(
directory
.
childFile
(
'pubspec.yaml'
).
path
)
;
if
(
manifest
.
isModule
)
{
if
(
manifest
.
isModule
)
{
await
androidModule
.
ensureReadyForPlatformSpecificTooling
(
manifest
);
await
androidModule
.
ensureReadyForPlatformSpecificTooling
(
manifest
);
await
iosModule
.
ensureReadyForPlatformSpecificTooling
(
manifest
);
}
}
xcode
.
generateXcodeProperties
(
projectPath:
directory
.
path
,
manifest:
manifest
);
injectPlugins
(
directory:
directory
.
path
);
injectPlugins
(
projectPath:
directory
.
path
,
manifest:
manifest
);
await
xcode
.
generateXcodeProperties
(
directory
.
path
);
}
}
}
}
...
@@ -107,25 +90,6 @@ class IosProject {
...
@@ -107,25 +90,6 @@ class IosProject {
}
}
}
}
/// Represents the contents of the .ios/ folder of a Flutter module
/// project.
class
IosModuleProject
{
IosModuleProject
(
this
.
directory
);
final
Directory
directory
;
Future
<
void
>
ensureReadyForPlatformSpecificTooling
(
FlutterManifest
manifest
)
async
{
if
(
_shouldRegenerate
())
{
final
Template
template
=
new
Template
.
fromName
(
fs
.
path
.
join
(
'module'
,
'ios'
));
template
.
render
(
directory
,
<
String
,
dynamic
>{},
printStatusWhenWriting:
false
);
}
}
bool
_shouldRegenerate
()
{
return
Cache
.
instance
.
fileOlderThanToolsStamp
(
directory
.
childFile
(
'podhelper.rb'
));
}
}
/// Represents the contents of the android/ folder of a Flutter project.
/// Represents the contents of the android/ folder of a Flutter project.
class
AndroidProject
{
class
AndroidProject
{
static
final
RegExp
_applicationIdPattern
=
new
RegExp
(
'^
\\
s*applicationId
\\
s+[
\'\"
](.*)[
\'\"
]
\\
s*
\$
'
);
static
final
RegExp
_applicationIdPattern
=
new
RegExp
(
'^
\\
s*applicationId
\\
s+[
\'\"
](.*)[
\'\"
]
\\
s*
\$
'
);
...
@@ -165,7 +129,14 @@ class AndroidModuleProject {
...
@@ -165,7 +129,14 @@ class AndroidModuleProject {
}
}
bool
_shouldRegenerate
()
{
bool
_shouldRegenerate
()
{
return
Cache
.
instance
.
fileOlderThanToolsStamp
(
directory
.
childFile
(
'build.gradle'
));
final
File
flutterToolsStamp
=
Cache
.
instance
.
getStampFileFor
(
'flutter_tools'
);
final
File
buildDotGradleFile
=
directory
.
childFile
(
'build.gradle'
);
if
(!
buildDotGradleFile
.
existsSync
())
return
true
;
return
flutterToolsStamp
.
existsSync
()
&&
flutterToolsStamp
.
lastModifiedSync
()
.
isAfter
(
buildDotGradleFile
.
lastModifiedSync
());
}
}
}
}
...
...
packages/flutter_tools/templates/module/ios/AppFrameworkInfo.plist.copy.tmpl
deleted
100644 → 0
View file @
328f9b30
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
CFBundleDevelopmentRegion
</key>
<string>
en
</string>
<key>
CFBundleExecutable
</key>
<string>
App
</string>
<key>
CFBundleIdentifier
</key>
<string>
io.flutter.flutter.app
</string>
<key>
CFBundleInfoDictionaryVersion
</key>
<string>
6.0
</string>
<key>
CFBundleName
</key>
<string>
App
</string>
<key>
CFBundlePackageType
</key>
<string>
FMWK
</string>
<key>
CFBundleShortVersionString
</key>
<string>
1.0
</string>
<key>
CFBundleSignature
</key>
<string>
????
</string>
<key>
CFBundleVersion
</key>
<string>
1.0
</string>
<key>
MinimumOSVersion
</key>
<string>
8.0
</string>
</dict>
</plist>
packages/flutter_tools/templates/module/ios/README.md.copy.tmpl
deleted
100644 → 0
View file @
328f9b30
This directory contains support code for embedding the Flutter project in an iOS app.
It should not be edited or checked in.
packages/flutter_tools/templates/module/ios/podhelper.rb.copy.tmpl
deleted
100644 → 0
View file @
328f9b30
# This file should be used from the target section of the host-app's Podfile like this:
# ```
# target 'host' do
# flutter_application_path = /"(.*)\/.ios\/Generated.xcconfig"/.match(File.read("./Flutter/FlutterConfig.xcconfig"))[1]
# eval(File.read(File.join(flutter_application_path, '.ios', 'podhelper.rb')))
# end
# ```
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_array = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_array.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_array
end
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
def flutter_root(f)
generated_xcode_build_settings = parse_KV_file(File.join(f, File.join('.ios', 'Generated.xcconfig')))
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. Make sure `flutter packages get` is executed in ${f}."
exit
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_ROOT'
return p[:path]
end
}
end
framework_dir = File.join(File.expand_path(File.dirname(__FILE__)), 'Flutter')
engine_dir = File.join(framework_dir, 'engine')
if !File.exist?(engine_dir)
# Copy the debug engine to have something to link against if the xcode backend script has not run yet.
debug_framework_dir = File.join(flutter_root(flutter_application_path), 'bin', 'cache', 'artifacts', 'engine', 'ios')
FileUtils.mkdir(engine_dir)
FileUtils.cp_r(File.join(debug_framework_dir, 'Flutter.framework'), engine_dir)
FileUtils.cp(File.join(debug_framework_dir, 'Flutter.podspec'), engine_dir)
end
symlink = File.join('.symlinks', 'flutter')
File.symlink(framework_dir, symlink)
pod 'Flutter', :path => File.join(symlink, 'engine')
plugin_pods = parse_KV_file(File.join(flutter_application_path, '.flutter-plugins'))
plugin_pods.map { |r|
symlink = File.join('.symlinks', 'plugins', r[:name])
File.symlink(r[:path], symlink)
pod r[:name], :path => File.join(symlink, 'ios')
}
symlink = File.join('.symlinks', 'FlutterApp')
File.symlink(File.absolute_path(flutter_application_path), symlink)
pod 'FlutterPluginRegistrant', :path => File.join(symlink, '.ios', 'FlutterPluginRegistrant')
packages/flutter_tools/test/ios/cocoapods_test.dart
View file @
4a6558f8
...
@@ -9,8 +9,6 @@ import 'package:file/memory.dart';
...
@@ -9,8 +9,6 @@ import 'package:file/memory.dart';
import
'package:flutter_tools/src/base/common.dart'
;
import
'package:flutter_tools/src/base/common.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/flutter_manifest.dart'
;
import
'package:flutter_tools/src/project.dart'
;
import
'package:flutter_tools/src/ios/cocoapods.dart'
;
import
'package:flutter_tools/src/ios/cocoapods.dart'
;
import
'package:flutter_tools/src/ios/xcodeproj.dart'
;
import
'package:flutter_tools/src/ios/xcodeproj.dart'
;
import
'package:mockito/mockito.dart'
;
import
'package:mockito/mockito.dart'
;
...
@@ -134,25 +132,21 @@ void main() {
...
@@ -134,25 +132,21 @@ void main() {
podFile
=
fs
.
file
(
fs
.
path
.
join
(
'project'
,
'ios'
,
'Podfile'
));
podFile
=
fs
.
file
(
fs
.
path
.
join
(
'project'
,
'ios'
,
'Podfile'
));
});
});
testUsingContext
(
'creates objective-c Podfile when not present'
,
()
async
{
testUsingContext
(
'creates objective-c Podfile when not present'
,
()
{
final
FlutterManifest
manifest
=
cocoaPodsUnderTest
.
setupPodfile
(
'project'
);
await
new
FlutterProject
.
fromPath
(
'project'
).
manifest
;
cocoaPodsUnderTest
.
setupPodfile
(
'project'
,
manifest
);
expect
(
podFile
.
readAsStringSync
(),
'Objective-C podfile template'
);
expect
(
podFile
.
readAsStringSync
(),
'Objective-C podfile template'
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fs
,
FileSystem:
()
=>
fs
,
});
});
testUsingContext
(
'creates swift Podfile if swift'
,
()
async
{
testUsingContext
(
'creates swift Podfile if swift'
,
()
{
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
any
)).
thenReturn
(<
String
,
String
>{
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
any
)).
thenReturn
(<
String
,
String
>{
'SWIFT_VERSION'
:
'4.0'
,
'SWIFT_VERSION'
:
'4.0'
,
});
});
final
FlutterManifest
manifest
=
cocoaPodsUnderTest
.
setupPodfile
(
'project'
);
await
new
FlutterProject
.
fromPath
(
'project'
).
manifest
;
cocoaPodsUnderTest
.
setupPodfile
(
'project'
,
manifest
);
expect
(
podFile
.
readAsStringSync
(),
'Swift podfile template'
);
expect
(
podFile
.
readAsStringSync
(),
'Swift podfile template'
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
...
@@ -160,24 +154,20 @@ void main() {
...
@@ -160,24 +154,20 @@ void main() {
XcodeProjectInterpreter:
()
=>
mockXcodeProjectInterpreter
,
XcodeProjectInterpreter:
()
=>
mockXcodeProjectInterpreter
,
});
});
testUsingContext
(
'does not recreate Podfile when already present'
,
()
async
{
testUsingContext
(
'does not recreate Podfile when already present'
,
()
{
podFile
..
createSync
()..
writeAsStringSync
(
'Existing Podfile'
);
podFile
..
createSync
()..
writeAsStringSync
(
'Existing Podfile'
);
final
FlutterManifest
manifest
=
cocoaPodsUnderTest
.
setupPodfile
(
'project'
);
await
new
FlutterProject
.
fromPath
(
'project'
).
manifest
;
cocoaPodsUnderTest
.
setupPodfile
(
'project'
,
manifest
);
expect
(
podFile
.
readAsStringSync
(),
'Existing Podfile'
);
expect
(
podFile
.
readAsStringSync
(),
'Existing Podfile'
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fs
,
FileSystem:
()
=>
fs
,
});
});
testUsingContext
(
'does not create Podfile when we cannot interpret Xcode projects'
,
()
async
{
testUsingContext
(
'does not create Podfile when we cannot interpret Xcode projects'
,
()
{
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
false
);
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
false
);
final
FlutterManifest
manifest
=
cocoaPodsUnderTest
.
setupPodfile
(
'project'
);
await
new
FlutterProject
.
fromPath
(
'project'
).
manifest
;
cocoaPodsUnderTest
.
setupPodfile
(
'project'
,
manifest
);
expect
(
podFile
.
existsSync
(),
false
);
expect
(
podFile
.
existsSync
(),
false
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
...
@@ -185,14 +175,12 @@ void main() {
...
@@ -185,14 +175,12 @@ void main() {
XcodeProjectInterpreter:
()
=>
mockXcodeProjectInterpreter
,
XcodeProjectInterpreter:
()
=>
mockXcodeProjectInterpreter
,
});
});
testUsingContext
(
'includes Pod config in xcconfig files, if not present'
,
()
async
{
testUsingContext
(
'includes Pod config in xcconfig files, if not present'
,
()
{
podFile
..
createSync
()..
writeAsStringSync
(
'Existing Podfile'
);
podFile
..
createSync
()..
writeAsStringSync
(
'Existing Podfile'
);
debugConfigFile
..
createSync
(
recursive:
true
)..
writeAsStringSync
(
'Existing debug config'
);
debugConfigFile
..
createSync
(
recursive:
true
)..
writeAsStringSync
(
'Existing debug config'
);
releaseConfigFile
..
createSync
(
recursive:
true
)..
writeAsStringSync
(
'Existing release config'
);
releaseConfigFile
..
createSync
(
recursive:
true
)..
writeAsStringSync
(
'Existing release config'
);
final
FlutterManifest
manifest
=
cocoaPodsUnderTest
.
setupPodfile
(
'project'
);
await
new
FlutterProject
.
fromPath
(
'project'
).
manifest
;
cocoaPodsUnderTest
.
setupPodfile
(
'project'
,
manifest
);
final
String
debugContents
=
debugConfigFile
.
readAsStringSync
();
final
String
debugContents
=
debugConfigFile
.
readAsStringSync
();
expect
(
debugContents
,
contains
(
expect
(
debugContents
,
contains
(
...
...
packages/flutter_tools/test/ios/xcodeproj_test.dart
View file @
4a6558f8
...
@@ -11,8 +11,6 @@ import 'package:flutter_tools/src/base/io.dart';
...
@@ -11,8 +11,6 @@ import 'package:flutter_tools/src/base/io.dart';
import
'package:flutter_tools/src/build_info.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
import
'package:flutter_tools/src/bundle.dart'
as
bundle
;
import
'package:flutter_tools/src/bundle.dart'
as
bundle
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/flutter_manifest.dart'
;
import
'package:flutter_tools/src/project.dart'
;
import
'package:flutter_tools/src/ios/xcodeproj.dart'
;
import
'package:flutter_tools/src/ios/xcodeproj.dart'
;
import
'package:mockito/mockito.dart'
;
import
'package:mockito/mockito.dart'
;
import
'package:platform/platform.dart'
;
import
'package:platform/platform.dart'
;
...
@@ -286,16 +284,12 @@ Information about project "Runner":
...
@@ -286,16 +284,12 @@ Information about project "Runner":
testUsingOsxContext
(
'sets ARCHS=armv7 when armv7 local engine is set'
,
()
async
{
testUsingOsxContext
(
'sets ARCHS=armv7 when armv7 local engine is set'
,
()
async
{
when
(
mockArtifacts
.
getArtifactPath
(
Artifact
.
flutterFramework
,
TargetPlatform
.
ios
,
any
)).
thenReturn
(
'engine'
);
when
(
mockArtifacts
.
getArtifactPath
(
Artifact
.
flutterFramework
,
TargetPlatform
.
ios
,
any
)).
thenReturn
(
'engine'
);
when
(
mockArtifacts
.
engineOutPath
).
thenReturn
(
fs
.
path
.
join
(
'out'
,
'ios_profile_arm'
));
when
(
mockArtifacts
.
engineOutPath
).
thenReturn
(
fs
.
path
.
join
(
'out'
,
'ios_profile_arm'
));
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
debug
,
null
,
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
debug
,
null
,
previewDart2:
true
,
previewDart2:
true
,
targetPlatform:
TargetPlatform
.
ios
,
targetPlatform:
TargetPlatform
.
ios
,
);
);
final
FlutterManifest
manifest
=
await
updateGeneratedXcodeProperties
(
await
new
FlutterProject
.
fromPath
(
'path/to/project'
).
manifest
;
updateGeneratedXcodeProperties
(
projectPath:
'path/to/project'
,
projectPath:
'path/to/project'
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
previewDart2:
true
,
previewDart2:
true
,
);
);
...
@@ -315,11 +309,8 @@ Information about project "Runner":
...
@@ -315,11 +309,8 @@ Information about project "Runner":
trackWidgetCreation:
true
,
trackWidgetCreation:
true
,
targetPlatform:
TargetPlatform
.
ios
,
targetPlatform:
TargetPlatform
.
ios
,
);
);
final
FlutterManifest
manifest
=
await
updateGeneratedXcodeProperties
(
await
new
FlutterProject
.
fromPath
(
'path/to/project'
).
manifest
;
updateGeneratedXcodeProperties
(
projectPath:
'path/to/project'
,
projectPath:
'path/to/project'
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
previewDart2:
true
,
previewDart2:
true
,
);
);
...
@@ -338,11 +329,8 @@ Information about project "Runner":
...
@@ -338,11 +329,8 @@ Information about project "Runner":
previewDart2:
true
,
previewDart2:
true
,
targetPlatform:
TargetPlatform
.
ios
,
targetPlatform:
TargetPlatform
.
ios
,
);
);
final
FlutterManifest
manifest
=
await
updateGeneratedXcodeProperties
(
await
new
FlutterProject
.
fromPath
(
'path/to/project'
).
manifest
;
updateGeneratedXcodeProperties
(
projectPath:
'path/to/project'
,
projectPath:
'path/to/project'
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
previewDart2:
true
,
previewDart2:
true
,
);
);
...
@@ -361,12 +349,8 @@ Information about project "Runner":
...
@@ -361,12 +349,8 @@ Information about project "Runner":
previewDart2:
true
,
previewDart2:
true
,
targetPlatform:
TargetPlatform
.
ios
,
targetPlatform:
TargetPlatform
.
ios
,
);
);
await
updateGeneratedXcodeProperties
(
final
FlutterManifest
manifest
=
await
new
FlutterProject
.
fromPath
(
'path/to/project'
).
manifest
;
updateGeneratedXcodeProperties
(
projectPath:
'path/to/project'
,
projectPath:
'path/to/project'
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
previewDart2:
true
,
previewDart2:
true
,
);
);
...
@@ -410,18 +394,15 @@ Information about project "Runner":
...
@@ -410,18 +394,15 @@ Information about project "Runner":
}
}
Future
<
void
>
checkBuildVersion
({
Future
<
void
>
checkBuildVersion
({
String
manifest
String
,
String
manifest
,
BuildInfo
buildInfo
,
BuildInfo
buildInfo
,
String
expectedBuildName
,
String
expectedBuildName
,
String
expectedBuildNumber
,
String
expectedBuildNumber
,
})
async
{
})
async
{
final
String
projectPath
=
await
createMinimalProject
(
manifest
String
);
final
String
projectPath
=
await
createMinimalProject
(
manifest
);
final
FlutterManifest
manifest
=
await
updateGeneratedXcodeProperties
(
await
new
FlutterProject
.
fromPath
(
projectPath
).
manifest
;
updateGeneratedXcodeProperties
(
projectPath:
projectPath
,
projectPath:
projectPath
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
targetOverride:
bundle
.
defaultMainPath
,
targetOverride:
bundle
.
defaultMainPath
,
previewDart2:
false
,
previewDart2:
false
,
...
@@ -446,7 +427,7 @@ flutter:
...
@@ -446,7 +427,7 @@ flutter:
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
);
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
);
await
checkBuildVersion
(
await
checkBuildVersion
(
manifest
String
:
manifest
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
expectedBuildName:
'1.0.0'
,
expectedBuildName:
'1.0.0'
,
expectedBuildNumber:
'1'
,
expectedBuildNumber:
'1'
,
...
@@ -464,7 +445,7 @@ flutter:
...
@@ -464,7 +445,7 @@ flutter:
'''
;
'''
;
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
);
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
);
await
checkBuildVersion
(
await
checkBuildVersion
(
manifest
String
:
manifest
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
expectedBuildName:
'1.0.0'
,
expectedBuildName:
'1.0.0'
,
expectedBuildNumber:
null
,
expectedBuildNumber:
null
,
...
@@ -482,7 +463,7 @@ flutter:
...
@@ -482,7 +463,7 @@ flutter:
'''
;
'''
;
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
,
buildName:
'1.0.2'
);
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
,
buildName:
'1.0.2'
);
await
checkBuildVersion
(
await
checkBuildVersion
(
manifest
String
:
manifest
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
expectedBuildName:
'1.0.2'
,
expectedBuildName:
'1.0.2'
,
expectedBuildNumber:
'1'
,
expectedBuildNumber:
'1'
,
...
@@ -500,7 +481,7 @@ flutter:
...
@@ -500,7 +481,7 @@ flutter:
'''
;
'''
;
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
,
buildNumber:
3
);
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
,
buildNumber:
3
);
await
checkBuildVersion
(
await
checkBuildVersion
(
manifest
String
:
manifest
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
expectedBuildName:
'1.0.0'
,
expectedBuildName:
'1.0.0'
,
expectedBuildNumber:
'3'
,
expectedBuildNumber:
'3'
,
...
@@ -518,7 +499,7 @@ flutter:
...
@@ -518,7 +499,7 @@ flutter:
'''
;
'''
;
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
,
buildName:
'1.0.2'
,
buildNumber:
3
);
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
,
buildName:
'1.0.2'
,
buildNumber:
3
);
await
checkBuildVersion
(
await
checkBuildVersion
(
manifest
String
:
manifest
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
expectedBuildName:
'1.0.2'
,
expectedBuildName:
'1.0.2'
,
expectedBuildNumber:
'3'
,
expectedBuildNumber:
'3'
,
...
@@ -536,7 +517,7 @@ flutter:
...
@@ -536,7 +517,7 @@ flutter:
'''
;
'''
;
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
,
buildName:
'1.0.2'
,
buildNumber:
3
);
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
,
buildName:
'1.0.2'
,
buildNumber:
3
);
await
checkBuildVersion
(
await
checkBuildVersion
(
manifest
String
:
manifest
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
expectedBuildName:
'1.0.2'
,
expectedBuildName:
'1.0.2'
,
expectedBuildNumber:
'3'
,
expectedBuildNumber:
'3'
,
...
@@ -553,7 +534,7 @@ flutter:
...
@@ -553,7 +534,7 @@ flutter:
'''
;
'''
;
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
,
buildName:
'1.0.2'
,
buildNumber:
3
);
const
BuildInfo
buildInfo
=
const
BuildInfo
(
BuildMode
.
release
,
null
,
buildName:
'1.0.2'
,
buildNumber:
3
);
await
checkBuildVersion
(
await
checkBuildVersion
(
manifest
String
:
manifest
,
manifest:
manifest
,
buildInfo:
buildInfo
,
buildInfo:
buildInfo
,
expectedBuildName:
'1.0.2'
,
expectedBuildName:
'1.0.2'
,
expectedBuildNumber:
'3'
,
expectedBuildNumber:
'3'
,
...
...
packages/flutter_tools/test/project_test.dart
View file @
4a6558f8
...
@@ -15,14 +15,7 @@ void main() {
...
@@ -15,14 +15,7 @@ void main() {
group
(
'Project'
,
()
{
group
(
'Project'
,
()
{
testInMemory
(
'knows location'
,
()
{
testInMemory
(
'knows location'
,
()
{
final
Directory
directory
=
fs
.
directory
(
'myproject'
);
final
Directory
directory
=
fs
.
directory
(
'myproject'
);
expect
(
expect
(
new
FlutterProject
(
directory
).
directory
,
directory
);
new
FlutterProject
(
directory
).
directory
.
absolute
.
path
,
directory
.
absolute
.
path
,
);
expect
(
new
FlutterProject
.
fromPath
(
directory
.
path
).
directory
.
absolute
.
path
,
directory
.
absolute
.
path
,
);
});
});
group
(
'ensure ready for platform-specific tooling'
,
()
{
group
(
'ensure ready for platform-specific tooling'
,
()
{
testInMemory
(
'does nothing, if project is not created'
,
()
async
{
testInMemory
(
'does nothing, if project is not created'
,
()
async
{
...
@@ -101,7 +94,7 @@ void main() {
...
@@ -101,7 +94,7 @@ void main() {
});
});
}
}
FlutterProject
someProject
(
)
=>
new
FlutterProject
.
fromPath
(
'some_project'
);
FlutterProject
someProject
(
)
=>
new
FlutterProject
(
fs
.
directory
(
'some_project'
)
);
FlutterProject
aProjectWithIos
(
)
{
FlutterProject
aProjectWithIos
(
)
{
final
Directory
directory
=
fs
.
directory
(
'ios_project'
);
final
Directory
directory
=
fs
.
directory
(
'ios_project'
);
...
...
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