diff --git a/PodMergeExample/MergeFile b/PodMergeExample/MergeFile index 7cc81cc..b00253a 100644 --- a/PodMergeExample/MergeFile +++ b/PodMergeExample/MergeFile @@ -13,6 +13,8 @@ end group 'MergedSwiftPods' do pod 'SnapKit' pod 'SwiftyJSON' + pod 'Kingfisher', '~> 5.0' + end group 'AlamofireGroup' do diff --git a/PodMergeExample/PodMergeExample/ViewController.swift b/PodMergeExample/PodMergeExample/ViewController.swift index 6ae05c8..fe317e3 100644 --- a/PodMergeExample/PodMergeExample/ViewController.swift +++ b/PodMergeExample/PodMergeExample/ViewController.swift @@ -44,12 +44,17 @@ class ViewController: UIViewController { let request = ImageRequest(url: URL(string: "https://github.com/grab/cocoapods-pod-merge")!) + let url = URL(string: "https://example.com/image.png") + override func viewDidLoad() { super.viewDidLoad() // SnapKit Usage let box = UIView() box.snp.makeConstraints { _ in } + + let imageView = UIImageView(frame: .zero) + imageView.kf.setImage(with: url) } } diff --git a/PodMergeExample/Podfile.lock b/PodMergeExample/Podfile.lock index 1dc8868..af7fe2b 100644 --- a/PodMergeExample/Podfile.lock +++ b/PodMergeExample/Podfile.lock @@ -13,7 +13,7 @@ DEPENDENCIES: - UI (from `MergedPods/UI`) SPEC REPOS: - https://cdn.cocoapods.org/: + trunk: - Nuke EXTERNAL SOURCES: @@ -27,11 +27,11 @@ EXTERNAL SOURCES: :path: MergedPods/UI SPEC CHECKSUMS: - AlamofireGroup: 113f3ab321b31b75a748378909f3f96305b771a2 - MergedSwiftPods: 86f52fdd7411987cd39e6c80e709ef0de0126fd3 - Networking: 844633d13d2328a829083b24ffaee99aea51c1de + AlamofireGroup: c7af15f9d1f646dd2d5793dd470efc1942bfc20b + MergedSwiftPods: 90c36ec9c0177f0cd19776a428e6e22d6df267a4 + Networking: 63b67ccfde89eaf06f6e01218d294ec2c8b6c628 Nuke: 85fb80f8df0cb26c28d2f4e0cb7fb93bcd6548d3 - UI: 2aa82721ee430cd2f0ab314904bbe1a281fa2ff9 + UI: 82623fb675f17ffe5a5cd00602619ee4f2040cd7 PODFILE CHECKSUM: 88ffe01efb39e0f819cf88bf11786182ab6f4441 diff --git a/lib/cocoapods-pod-merge/Main.rb b/lib/cocoapods-pod-merge/Main.rb index af2ad06..5f1d6b9 100644 --- a/lib/cocoapods-pod-merge/Main.rb +++ b/lib/cocoapods-pod-merge/Main.rb @@ -334,7 +334,7 @@ def merge(merged_framework_name, group_contents, podfile_info) # Create the local podspec Pod::UI.puts "\tCreating Podspec for the merged framework".magenta - create_podspec(merged_framework_name, pods_to_merge, PodspecInfo.new(frameworks.uniq, prefix_header_contents.uniq, private_header_files.uniq, resources.uniq, script_phases.uniq, compiler_flags.uniq, libraries.uniq, prepare_command.uniq, resource_bundles, vendored_libraries.uniq, swift_version), mixed_language_group) + create_podspec(merged_framework_name, pods_to_merge, PodspecInfo.new(frameworks.uniq, prefix_header_contents.uniq, private_header_files.uniq, resources.uniq, script_phases.uniq, compiler_flags.uniq, libraries.uniq, prepare_command.uniq, resource_bundles, vendored_libraries.uniq, swift_version), mixed_language_group, podfile_info) Pod::UI.puts 'Cleaning up cache'.cyan FileUtils.rm_rf(CacheDirectory) @@ -478,7 +478,7 @@ def generate_module_map(merged_framework_name, public_headers) module_map.close end - def create_podspec(merged_framework_name, pods_to_merge, podspec_info, mixed_language_group) + def create_podspec(merged_framework_name, pods_to_merge, podspec_info, mixed_language_group, podfile_info) frameworks = podspec_info.frameworks prefix_header_contents = podspec_info.prefix_header_contents private_header_files = podspec_info.private_header_files @@ -490,6 +490,7 @@ def create_podspec(merged_framework_name, pods_to_merge, podspec_info, mixed_lan resource_bundles = podspec_info.resource_bundles vendored_libraries = podspec_info.vendored_libraries swift_versions = podspec_info.swift_versions + ios_deployment_target = podfile_info.platforms.find { |platform| platform.include? "ios"}.split(',')[1] mergedPodspec = %( Pod::Spec.new do |s| @@ -501,7 +502,7 @@ def create_podspec(merged_framework_name, pods_to_merge, podspec_info, mixed_lan s.license = { :type => 'MIT', :text => 'Merged Pods by cocoapods-pod-merge plugin ' } s.author = { 'GrabTaxi Pte Ltd' => 'dummy@grabtaxi.com' } s.source = { :git => 'https://github.com/grab/cocoapods-pod-merge', :tag => '1.0.0' } - s.ios.deployment_target = '8.0' + s.ios.deployment_target = #{ios_deployment_target} s.source_files = 'Sources/**/*.{h,m,mm,swift}' )