fastlane-plugin-xcconfig_actions 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -8
- data/lib/fastlane/plugin/xcconfig_actions/helper/xcspec.rb +21 -3
- data/lib/fastlane/plugin/xcconfig_actions/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 308efdc017fd28d18ce6134cd9212a3bda5fafb275a0b7ebaac1804ed78c8f18
|
|
4
|
+
data.tar.gz: e650b28da0a5af7a9bcea3e3ea5976f9506786bc3552fe0b2e3616e62aa95e71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
[](https://rubygems.org/gems/fastlane-plugin-xcconfig_actions)
|
|
4
|
-
[](https://github.com/mgrebenets/fastlane-plugin-xcconfig_actions)
|
|
5
5
|
[](https://circleci.com/gh/mgrebenets/fastlane-plugin-xcconfig_actions)
|
|
6
|
+
[](https://travis-ci.org/mgrebenets/fastlane-plugin-xcconfig_actions)
|
|
7
|
+
[](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
|
-
####
|
|
69
|
+
#### Caveats
|
|
68
70
|
|
|
69
|
-
Flags like `-sdk iphoneos` and `-isysroot iphoneos` may not be suitable for all uses
|
|
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
|
-
|
|
73
|
-
|
|
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
|
-
|
|
76
|
-
|
|
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
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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
|
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.
|
|
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-
|
|
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
|