Move Flutter.podspec to add-to-app project template (#71103)

This commit is contained in:
Jenn Magder
2020-11-24 10:16:09 -08:00
committed by GitHub
parent e5c43848a7
commit 9bbc2177ec
6 changed files with 26 additions and 12 deletions

View File

@@ -0,0 +1,18 @@
#
# NOTE: This podspec is NOT to be published. It is only used as a local source!
#
Pod::Spec.new do |s|
s.name = 'Flutter'
s.version = '1.0.0'
s.summary = 'High-performance, high-fidelity mobile apps.'
s.description = <<-DESC
Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS.
DESC
s.homepage = 'https://flutter.io'
s.license = { :type => 'MIT' }
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
s.ios.deployment_target = '8.0'
s.vendored_frameworks = 'Flutter.framework'
end

View File

@@ -30,13 +30,13 @@ end
def install_flutter_engine_pod
current_directory = File.expand_path('..', __FILE__)
engine_dir = File.expand_path('engine', current_directory)
if !File.exist?(engine_dir)
framework_name = 'Flutter.framework'
copied_engine = File.expand_path(framework_name, engine_dir)
if !File.exist?(copied_engine)
# Copy the debug engine to have something to link against if the xcode backend script has not run yet.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
debug_framework_dir = File.join(flutter_root, 'bin', 'cache', 'artifacts', 'engine', 'ios')
FileUtils.mkdir_p(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)
FileUtils.cp_r(File.join(debug_framework_dir, framework_name), engine_dir)
end
# Keep pod path relative so it can be checked into Podfile.lock.

View File

@@ -176,6 +176,7 @@
"templates/module/ios/host_app_ephemeral/Config.tmpl/Debug.xcconfig",
"templates/module/ios/host_app_ephemeral/Config.tmpl/Flutter.xcconfig",
"templates/module/ios/host_app_ephemeral/Config.tmpl/Release.xcconfig",
"templates/module/ios/host_app_ephemeral/Flutter/engine/Flutter.podspec.tmpl",
"templates/module/ios/host_app_ephemeral/Runner.tmpl/AppDelegate.h",
"templates/module/ios/host_app_ephemeral/Runner.tmpl/AppDelegate.m",
"templates/module/ios/host_app_ephemeral/Runner.tmpl/Assets.xcassets/AppIcon.appiconset/Contents.json",