fastlane-plugin-xcconfig_actions 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30f7b3c21a1a28602e3c0a9a731fbada3655e6afb83add108306849be0e1082b
4
- data.tar.gz: a7c2fba226b99df76127464e12973d4ee60837ef4dc42b99ed31978fa7a2feb7
3
+ metadata.gz: 308efdc017fd28d18ce6134cd9212a3bda5fafb275a0b7ebaac1804ed78c8f18
4
+ data.tar.gz: e650b28da0a5af7a9bcea3e3ea5976f9506786bc3552fe0b2e3616e62aa95e71
5
5
  SHA512:
6
- metadata.gz: eb2cb546352b5e76235a6892018172fe8ee0f3b2159d550ce2a8ff75b7dc365f18804a33264aa5ecc540eecadca766c7d0b54f90d9dc054c4dd60c912d5765d9
7
- data.tar.gz: 571e8f6db522621f847d63ceaad0c4f3fe0b7e94232023dc12b71a275a96fb4a84aae291946193d9c7a5c745a25be5e35ba894df2735b3cdb3dd05c888e8e45f
6
+ metadata.gz: 95b1a3130f4b6fd4564c79b9331ad28758c34f576d550ea6893720cdc938782100900094b9c44a7c750967b46fe251904f02dd37a59d35007fa688ab79d24365
7
+ data.tar.gz: 48907de2bcc9f49f6d05fc15fccf7197215a90e28338f27f1f3321582d8b3d68e1ef8559903dca0cb513217f69ddc3dd4448e23953abc797b624bcbc01cb0715
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # xcconfig_actions plugin
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-xcconfig_actions)
4
- [![version](https://badge.fury.io/gh/mgrebenets%2Ffastlane-plugin-xcconfig_actions.svg)](https://badge.fury.io/gh/mgrebenets%2Ffastlane-plugin-xcconfig_actions)
4
+ [![version](https://img.shields.io/github/tag/mgrebenets/fastlane-plugin-xcconfig_actions.svg?color=green&label=version)](https://github.com/mgrebenets/fastlane-plugin-xcconfig_actions)
5
5
  [![CircleCI](https://circleci.com/gh/mgrebenets/fastlane-plugin-xcconfig_actions.svg?style=svg)](https://circleci.com/gh/mgrebenets/fastlane-plugin-xcconfig_actions)
6
+ [![Travis CI](https://img.shields.io/travis/mgrebenets/fastlane-plugin-xcconfig_actions.svg?label=%20&logo=travis)](https://travis-ci.org/mgrebenets/fastlane-plugin-xcconfig_actions)
7
+ [![Coverage Status](https://coveralls.io/repos/github/mgrebenets/fastlane-plugin-xcconfig_actions/badge.svg)](https://coveralls.io/github/mgrebenets/fastlane-plugin-xcconfig_actions)
6
8
 
7
9
  ## Getting Started
8
10
 
@@ -64,16 +66,23 @@ References:
64
66
  - https://gist.github.com/fabiopelosin/4560417
65
67
  - https://pewpewthespells.com/blog/xcode_build_system.html
66
68
 
67
- #### Known Issues
69
+ #### Caveats
68
70
 
69
- Flags like `-sdk iphoneos` and `-isysroot iphoneos` may not be suitable for all uses, so may have to remove them from all flags.
70
- These settings only get generated if you add `SDKROOT = iphoneos` to your xcconfigs.
71
+ Flags like `-sdk iphoneos` and `-isysroot iphoneos` may not be suitable for all uses.
72
+ These settings only get generated if you add `SDKROOT = iphoneos` to your xcconfigs, so don't define `SDKROOT` in xcconfigs and leave it to build tool.
71
73
 
72
- The flag like `-std=gnu++14` is added to `compiler_flags` but it's not applicable for Objective-C code.
73
- Most tools have differentiation between C flags (C and Objective-C) and Cxx flags (C++/Objective-C++).
74
+ ##### Code Coverage
75
+
76
+ Flags like `CLANG_ENABLE_CODE_COVERAGE` will not have effect if set to `YES`.
77
+ This flag needs to be accompanied to changes in Xcode scheme UI to enable code coverage.
78
+ When ran from command just settings `CLANG_ENABLE_CODE_COVERAGE=YES` has no effect either, instead the `-enableCodeCoverage YES` option has to be used.
79
+
80
+ In case of `CLANG_ENABLE_CODE_COVERAGE` add `CLANG_COVERAGE_MAPPING = YES` to xcconfigs to get proper flags mapping.
74
81
 
75
- Flags like `CLANG_ENABLE_CODE_COVERAGE` and `ENABLE_TESTABILITY` will have no effect unless `CLANG_COVERAGE_MAPPING = $(CLANG_ENABLE_CODE_COVERAGE)` and `SWIFT_ENABLE_TESTABILITY = $(ENABLE_TESTABILITY)` are explicitly added to xcconfigs.
76
- This has to be fixed in the future.
82
+ #### Known Issues
83
+
84
+ - [ ] The flags like `-std=gnu++14` are added to `compiler_flags` but are not applicable for C/Objective-C code.
85
+ Most tools have differentiation between C flags (C and Objective-C) and Cxx flags (C++/Objective-C++).
77
86
 
78
87
  ### validate_xcconfig
79
88
 
@@ -78,6 +78,18 @@ module Fastlane
78
78
  ###
79
79
 
80
80
  def map_build_settings(build_settings)
81
+ # Some settings like ENABLE_TESTABILITY are used as default value for other build settings,
82
+ # e.g. SWIFT_ENABLE_TESTABILITY.
83
+ # So need to treat dependant (implicit) build settings as if they were defined in xcconfig
84
+ # in order to get them properly resolved.
85
+ implicit_build_settings = @options.reduce({}) do |memo, opt|
86
+ name = opt["Name"]
87
+ next memo if build_settings.key?(name)
88
+ reference = build_settings.find { |k, _| opt["DefaultValue"].eql?("$(#{k})") }
89
+ reference ? memo.merge({ name => reference.last }) : memo
90
+ end
91
+ build_settings = build_settings.merge(implicit_build_settings)
92
+
81
93
  # Build settings provided for mapping will not include all possible build settings.
82
94
  # Add default values for missing build settings.
83
95
  missing_build_settings = @options.reduce({}) do |memo, opt|
@@ -252,9 +264,15 @@ module Fastlane
252
264
  # Quote everything except YES and NO.
253
265
  resolved_condition = (" " + resolved_condition + " ").gsub(/\s((\w|\d|-|\+|\.)+?)\s/, " '\\1' ").gsub(/'(YES|NO)'/, '\\1')
254
266
 
255
- # rubocop:disable Security/Eval
256
- eval(resolved_condition)
257
- # rubocop:enable Security/Eval
267
+ begin
268
+ # rubocop:disable Security/Eval
269
+ eval(resolved_condition)
270
+ # rubocop:enable Security/Eval
271
+ rescue SyntaxError
272
+ # Values like USE_LLVM_TARGET_TRIPLES_FOR_CLANG are not defined anywhere.
273
+ # Those will be resolved into nothing and result into condition that can't be evaluated.
274
+ false
275
+ end
258
276
  end
259
277
  end
260
278
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module XcconfigActions
3
- VERSION = "1.3.0"
3
+ VERSION = "1.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-xcconfig_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maksym Grebenets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-15 00:00:00.000000000 Z
11
+ date: 2019-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri-plist
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: coveralls
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: fastlane
43
57
  requirement: !ruby/object:Gem::Requirement