From 13e28f1b7f2397d03352ab4e540b84e95b2f96f9 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Tue, 19 Apr 2022 10:33:00 +0300 Subject: [PATCH] add support for custom abstract targets in path to cocoapods xcconfig files. closes #236 --- xcode/config_generator/example_settings.yaml | 1 + xcode/config_generator/render_xcconfigs.rb | 1 + xcode/config_generator/target_xcconfig.mustache | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xcode/config_generator/example_settings.yaml b/xcode/config_generator/example_settings.yaml index 608981a..89d52c3 100644 --- a/xcode/config_generator/example_settings.yaml +++ b/xcode/config_generator/example_settings.yaml @@ -1,5 +1,6 @@ targets: TestProject: + abstract_targets_prefix: "-TestProjectKit" development: PRODUCT_BUNDLE_IDENTIFIER: "ru.touchin.testproject" PROVISIONING_PROFILE_SPECIFIER: "TestProjectDev" diff --git a/xcode/config_generator/render_xcconfigs.rb b/xcode/config_generator/render_xcconfigs.rb index b19f063..79d32cf 100755 --- a/xcode/config_generator/render_xcconfigs.rb +++ b/xcode/config_generator/render_xcconfigs.rb @@ -115,6 +115,7 @@ targets.each do |target_name, target| # Create settings pack config_data = { "target_name": target_name, + "abstract_targets_prefix": target["abstract_targets_prefix"], "configuration": config } diff --git a/xcode/config_generator/target_xcconfig.mustache b/xcode/config_generator/target_xcconfig.mustache index 570fab1..66d5387 100644 --- a/xcode/config_generator/target_xcconfig.mustache +++ b/xcode/config_generator/target_xcconfig.mustache @@ -1,4 +1,4 @@ -#include "Pods/Target Support Files/Pods-{{target_name}}/Pods-{{target_name}}.{{configuration.build_type}}.xcconfig" +#include "Pods/Target Support Files/Pods{{abstract_targets_prefix}}-{{target_name}}/Pods{{abstract_targets_prefix}}-{{target_name}}.{{configuration.build_type}}.xcconfig" {{#configuration.xcconfig_options}} {{key}} = {{value}}