lib/cocoapods-jxedt/binary/config.rb in cocoapods-jxedt-0.0.20 vs lib/cocoapods-jxedt/binary/config.rb in cocoapods-jxedt-0.0.21
- old
+ new
@@ -16,10 +16,11 @@
:dev_pods_enabled => "Development Pods是否支持二进制。默认为false",
:excluded_pods => "排除binary的pods,是一个数组。默认是[]",
:xcconfig_configuration_alias => "xcconfig文件中配置多configuration的别名(一定要唯一),用于搜索替换,我们用来支持多configuration的二进制。一般不需要设置,默认值为'cocoapods-jxedt-binary'",
:framework_header_search_enabled => "开启binary的组件是否配置HEADER_SEARCH_PATH头文件搜索,兼容头文件引用的问题。默认为false",
:silent_build => "静默编译,即不输出编译命令。默认true",
+ :fix_swiftinterface_pods => "修复swiftinterface的bug,即:组件中包含和module name同名的class,使用不同swift编译器编译时报错;需要填写需要修复的组件名称",
:configurations => "支持的configuration配置,可以写字符串'Debug'或'Release',也可以写多个'['Debug', 'Release']'。默认为'Release'",
:xcframework => "编译结果是否为xcframework。默认false",
:clean_build => "编译的时候是否clean build。默认true",
:bitcode_enabled => "开启bitcode。默认false",
:device_build_enabled => "编译真机架构。默认true",
@@ -117,10 +118,15 @@
def silent_build?
@dsl_config[:silent_build] || @dsl_config[:silent_build].nil?
end
+ def should_fix_swiftinterface_bug?(target_name)
+ @fix_swiftinterface_pods = @dsl_config[:fix_swiftinterface_pods] || []
+ @fix_swiftinterface_pods.include?(target_name)
+ end
+
def xcframework?
@dsl_config[:xcframework] || false
end
def clean_build?
@@ -199,10 +205,15 @@
cache_repo
end
end
def git_remote_repo
- @remote ||= cache_repo[:remote]
+ @remote ||= begin
+ remote = cache_repo[:remote]
+ remote.chomp!('/') if remote.is_a?(String) # 去除最后的'/'
+ remote.strip! if remote.is_a?(String) # 去除左右空格、转义字符
+ remote
+ end
end
def cache_repo_enabled?
remote = git_remote_repo
remote && remote.is_a?(String) && remote =~ /.*\.git$/
\ No newline at end of file