-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Set platform of macro pods (#141)
- Loading branch information
1 parent
6c56345
commit 3498493
Showing
10 changed files
with
71 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
module Pod | ||
class Installer | ||
def native_targets | ||
pods_project.targets + pod_target_subprojects.flat_map(&:targets) | ||
module InstallerMixin | ||
def native_targets | ||
projects_to_integrate.flat_map(&:targets) | ||
end | ||
|
||
def projects_to_integrate | ||
[pods_project] + pod_target_subprojects | ||
end | ||
end | ||
|
||
include InstallerMixin | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
lib/cocoapods-spm/hooks/post_integrate/06.update_macro_platforms.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
require "cocoapods-spm/hooks/base" | ||
require "cocoapods-spm/macro/metadata" | ||
|
||
module Pod | ||
module SPM | ||
class Hook | ||
class UpdateMacroPlatforms < Hook | ||
def run | ||
to_save = Set.new | ||
native_targets.each do |target| | ||
name = pod_name_of_target(target.name) | ||
metadata = macro_metadata_for_pod(name) | ||
next if metadata.nil? | ||
|
||
settings = metadata.platform_build_settings | ||
target.build_configurations.each do |config| | ||
settings.each { |k, v| config.build_settings[k] = v } | ||
end | ||
to_save << target.project | ||
end | ||
to_save.each(&:save) | ||
end | ||
end | ||
end | ||
end | ||
end |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters