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
130dfc87
Unverified
Commit
130dfc87
authored
Feb 19, 2018
by
Mikkel Nygaard Ravn
Committed by
GitHub
Feb 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Podfiles use symlinks to local pods (#14748)
parent
54bf773d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
25 deletions
+66
-25
engine.version
bin/internal/engine.version
+1
-1
cache.dart
packages/flutter_tools/lib/src/cache.dart
+20
-0
Podfile-objc
packages/flutter_tools/templates/cocoapods/Podfile-objc
+22
-12
Podfile-swift
packages/flutter_tools/templates/cocoapods/Podfile-swift
+23
-12
No files found.
bin/internal/engine.version
View file @
130dfc87
e5b72e5f87cae358b457b6c1cb55c4560ce3c46c
13cf22c284c24f81357aec6a89074a536efbf4d1
packages/flutter_tools/lib/src/cache.dart
View file @
130dfc87
...
...
@@ -402,6 +402,14 @@ class FlutterEngine extends CachedArtifact {
<
String
>[
'windows-x64'
,
'dart-sdk-windows-x64.zip'
],
];
// A list of cache directory paths to which the LICENSE file should be copied.
List
<
String
>
_getLicenseDirs
()
{
if
(
cache
.
includeAllPlatforms
||
platform
.
isMacOS
)
{
return
const
<
String
>[
'ios'
,
'ios-profile'
,
'ios-release'
];
}
return
const
<
String
>[];
}
@override
bool
isUpToDateInner
()
{
final
Directory
pkgDir
=
cache
.
getCacheDir
(
'pkg'
);
...
...
@@ -416,6 +424,12 @@ class FlutterEngine extends CachedArtifact {
if
(!
dir
.
existsSync
())
return
false
;
}
for
(
String
licenseDir
in
_getLicenseDirs
())
{
final
File
file
=
fs
.
file
(
fs
.
path
.
join
(
location
.
path
,
licenseDir
,
'LICENSE'
));
if
(!
file
.
existsSync
())
return
false
;
}
return
true
;
}
...
...
@@ -447,6 +461,12 @@ class FlutterEngine extends CachedArtifact {
os
.
unzip
(
frameworkZip
,
framework
);
}
}
final
File
licenseSource
=
fs
.
file
(
fs
.
path
.
join
(
Cache
.
flutterRoot
,
'LICENSE'
));
for
(
String
licenseDir
in
_getLicenseDirs
())
{
final
String
licenseDestinationPath
=
fs
.
path
.
join
(
location
.
path
,
licenseDir
,
'LICENSE'
);
await
licenseSource
.
copy
(
licenseDestinationPath
);
}
}
void
_makeFilesExecutable
(
Directory
dir
)
{
...
...
packages/flutter_tools/templates/cocoapods/Podfile-objc
View file @
130dfc87
...
...
@@ -4,7 +4,7 @@
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file,
sepe
rator='=')
def parse_KV_file(file,
sepa
rator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
...
...
@@ -13,12 +13,12 @@ def parse_KV_file(file,seperator='=')
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=sep
e
rator)
plugin = line.split(pattern=sep
a
rator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname,
:path=>
podpath});
pods_ary.push({:name => podname,
:path =>
podpath});
else
puts "Invalid plugin specification: #{line}"
end
...
...
@@ -27,21 +27,31 @@ def parse_KV_file(file,seperator='=')
end
target 'Runner' do
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf Pods/.symlinks')
system('mkdir -p Pods/.symlinks/flutter')
system('mkdir -p Pods/.symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file(
"./Flutter/Generated.xcconfig"
)
generated_xcode_build_settings = parse_KV_file(
'./Flutter/Generated.xcconfig'
)
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter
build or flutter run is executed once
first."
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter
packages get is executed
first."
end
generated_xcode_build_settings.map{ |p|
if p[:name]=='FLUTTER_FRAMEWORK_DIR'
pod 'Flutter', :path => p[:path]
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('Pods', '.symlinks', 'flutter', File.basename(p[:path]))
File.symlink(p[:path], symlink)
pod 'Flutter', :path => symlink
end
}
# Plugin Pods
plugin_pods = parse_KV_file("../.flutter-plugins")
plugin_pods.map{ |p|
pod p[:name], :path => File.expand_path("ios",p[:path])
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('Pods', '.symlinks', 'plugins', File.basename(p[:path]))
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
...
...
packages/flutter_tools/templates/cocoapods/Podfile-swift
View file @
130dfc87
...
...
@@ -4,7 +4,7 @@
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file,
sepe
rator='=')
def parse_KV_file(file,
sepa
rator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
...
...
@@ -13,12 +13,12 @@ def parse_KV_file(file,seperator='=')
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=sep
e
rator)
plugin = line.split(pattern=sep
a
rator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname,
:path=>
podpath});
pods_ary.push({:name => podname,
:path =>
podpath});
else
puts "Invalid plugin specification: #{line}"
end
...
...
@@ -28,21 +28,32 @@ end
target 'Runner' do
use_frameworks!
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf Pods/.symlinks')
system('mkdir -p Pods/.symlinks/flutter')
system('mkdir -p Pods/.symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file(
"./Flutter/Generated.xcconfig"
)
generated_xcode_build_settings = parse_KV_file(
'./Flutter/Generated.xcconfig'
)
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter
build or flutter run is executed once
first."
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter
packages get is executed
first."
end
generated_xcode_build_settings.map{ |p|
if p[:name]=='FLUTTER_FRAMEWORK_DIR'
pod 'Flutter', :path => p[:path]
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('Pods', '.symlinks', 'flutter', File.basename(p[:path]))
File.symlink(p[:path], symlink)
pod 'Flutter', :path => symlink
end
}
# Plugin Pods
plugin_pods = parse_KV_file("../.flutter-plugins")
plugin_pods.map{ |p|
pod p[:name], :path => File.expand_path("ios",p[:path])
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('Pods', '.symlinks', 'plugins', File.basename(p[:path]))
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
...
...
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