xcake 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: d105e4dd053c0ea4a00174991bd3aeefa41ca6b5
4
- data.tar.gz: 1c7b55a7928dba8ce250ed5e61c7e409cc907e08
3
+ metadata.gz: 9b945c7078bf81c6b95c3886e01b6ab16c7191c3
4
+ data.tar.gz: 198fd535fffe2e5d0390873f97900cf8e871a526
5
5
  SHA512:
6
- metadata.gz: 1435609910e57567ae62827810cfcaae216dbbbc6c5d1db1d0d9ddd7067ca7c429bb62ed6d5d69fb8c7f1628ba04e7aede1622734804dbf501c302534b48410d
7
- data.tar.gz: 51725a1c11c2c5805029a3e2c13ea5bbbff70031a8de4fd079ccdb9163730744f4bb8978eb7fab309e36c1c9e20e21e371a88392fecdd15fb9baa073ad9bff0c
6
+ metadata.gz: 8141f00c32e800da77194b0866f21e2438596874c280063b5baaadf25d3b2db3e84bef3e8c276bf43beec0ed245090107effe878c9a38ffc51b66e7eee6abe90
7
+ data.tar.gz: 5f148d62c9c34f2510c301f31f64a32771f1528da1b405dd6888a814910e69adf5e65c4bbb91cc42ec1945176ad4c61f3d37db204145c8aa7045fedf9f8da300
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xcake (0.1.4)
4
+ xcake (0.1.6)
5
5
  claide
6
6
  xcodeproj (~> 0.28)
7
7
 
@@ -16,12 +16,13 @@ GEM
16
16
  tzinfo (~> 1.1)
17
17
  claide (0.9.1)
18
18
  colored (1.2)
19
- coveralls (0.8.3)
19
+ coveralls (0.8.10)
20
20
  json (~> 1.8)
21
21
  rest-client (>= 1.6.8, < 2)
22
- simplecov (~> 0.10.0)
22
+ simplecov (~> 0.11.0)
23
23
  term-ansicolor (~> 1.3)
24
24
  thor (~> 0.19.1)
25
+ tins (~> 1.6.0)
25
26
  diff-lcs (1.2.5)
26
27
  docile (1.1.5)
27
28
  domain_name (0.5.25)
@@ -38,20 +39,20 @@ GEM
38
39
  http-cookie (>= 1.0.2, < 2.0)
39
40
  mime-types (>= 1.16, < 3.0)
40
41
  netrc (~> 0.7)
41
- rspec (3.3.0)
42
- rspec-core (~> 3.3.0)
43
- rspec-expectations (~> 3.3.0)
44
- rspec-mocks (~> 3.3.0)
45
- rspec-core (3.3.2)
46
- rspec-support (~> 3.3.0)
47
- rspec-expectations (3.3.1)
42
+ rspec (3.4.0)
43
+ rspec-core (~> 3.4.0)
44
+ rspec-expectations (~> 3.4.0)
45
+ rspec-mocks (~> 3.4.0)
46
+ rspec-core (3.4.1)
47
+ rspec-support (~> 3.4.0)
48
+ rspec-expectations (3.4.0)
48
49
  diff-lcs (>= 1.2.0, < 2.0)
49
- rspec-support (~> 3.3.0)
50
- rspec-mocks (3.3.2)
50
+ rspec-support (~> 3.4.0)
51
+ rspec-mocks (3.4.0)
51
52
  diff-lcs (>= 1.2.0, < 2.0)
52
- rspec-support (~> 3.3.0)
53
- rspec-support (3.3.0)
54
- simplecov (0.10.0)
53
+ rspec-support (~> 3.4.0)
54
+ rspec-support (3.4.1)
55
+ simplecov (0.11.1)
55
56
  docile (~> 1.1.0)
56
57
  json (~> 1.8)
57
58
  simplecov-html (~> 0.10.0)
data/docs/Cakefile.md CHANGED
@@ -1,13 +1,12 @@
1
- <!-- TODO: Maybe split into files ? -->
2
1
  #Cakefile Syntax Reference
3
2
 
4
3
  The `Cakefile` contains a lightweight DSL which provides the instructions on how to generate
5
4
  a project file. We adopt the convention over configuration and thus it can be very simple:
6
5
 
7
6
  ```ruby
8
- Project.new do |c|
9
- c.application_for :ios, 8.0 do |t|
10
- t.name = "MyApp"
7
+ Project.new do |project|
8
+ project.application_for :ios, 8.0 do |target|
9
+ target.name = "MyApp"
11
10
  end
12
11
  end
13
12
  ```
@@ -15,17 +14,17 @@ end
15
14
  and here is much more complicated one:
16
15
 
17
16
  ```ruby
18
- Project.new do |c|
17
+ Project.new do |project|
19
18
 
20
- c.debug_configuration :staging
21
- c.debug_configuration :debug
22
- c.release_configuration :release
19
+ project.debug_configuration :staging
20
+ project.debug_configuration :debug
21
+ project.release_configuration :release
23
22
 
24
- c.application_for :ios, 8.0 do |t|
25
- t.name = "test"
26
- t.all_configurations.supported_devices = :iphone_only
23
+ project.application_for :ios, 8.0 do |target|
24
+ target.name = "test"
25
+ target.all_configurations.supported_devices = :iphone_only
27
26
 
28
- c.unit_tests_for(t)
27
+ project.unit_tests_for(target)
29
28
  end
30
29
  end
31
30
  ```
@@ -38,21 +37,21 @@ readable, efficient and concise.
38
37
  To create a project we must write the following:
39
38
 
40
39
  ```ruby
41
- Project.new do |c|
40
+ Project.new do |project|
42
41
  end
43
42
  ```
44
43
  By default Xcake will create a project named "Project" but we can change the name
45
44
  by passing a String argument with the name we would like it to be called:
46
45
 
47
46
  ```ruby
48
- Project.new "Workspace" do |c|
47
+ Project.new "Workspace" do |project|
49
48
  end
50
49
  ```
51
50
  We can also customize the structure of the project between the first and second lines, like so:
52
51
 
53
52
  ```ruby
54
- Project.new "Workspace" do |c|
55
- c.debug_configuration :debug
53
+ Project.new "Workspace" do |project|
54
+ project.debug_configuration :debug
56
55
  end
57
56
  ```
58
57
  There are two main ways you can customize a Project, Targets and Configurations.
@@ -70,16 +69,16 @@ A project can specify any application targets such as iOS or Mac Apps.
70
69
  iOS App:
71
70
 
72
71
  ```ruby
73
- Project.new "Workspace" do |c|
74
- c.application_for :ios, 8.0
72
+ Project.new "Workspace" do |project|
73
+ project.application_for :ios, 8.0
75
74
  end
76
75
  ```
77
76
 
78
77
  Mac App:
79
78
 
80
79
  ```ruby
81
- Project.new "Workspace" do |c|
82
- c.application_for :mac, 8.0
80
+ Project.new "Workspace" do |project|
81
+ project.application_for :mac, 8.0
83
82
  end
84
83
  ```
85
84
 
@@ -88,9 +87,9 @@ end
88
87
  We can also specify a testing targets for other targets as well
89
88
 
90
89
  ```ruby
91
- Project.new "Workspace" do |c|
92
- c.application_for :mac, 8.0 do |t|
93
- c.unit_tests_for(t)
90
+ Project.new "Workspace" do |project|
91
+ project.application_for :mac, 8.0 do |target|
92
+ project.unit_tests_for(target)
94
93
  end
95
94
  end
96
95
  ```
@@ -101,9 +100,9 @@ If these aren't enough for you then you can specify a target
101
100
  and manually set up it's properties.
102
101
 
103
102
  ```ruby
104
- Project.new "Workspace" do |c|
105
- c.target do |t|
106
- t.name = "Target"
103
+ Project.new "Workspace" do |project|
104
+ project.target do |target|
105
+ target.name = "Target"
107
106
  end
108
107
  end
109
108
  ```
@@ -112,10 +111,10 @@ end
112
111
 
113
112
  #### Name
114
113
 
115
- Sets the name of the project
114
+ Sets the name of the target
116
115
 
117
116
  ```ruby
118
- t.name = "Target"
117
+ target.name = "Target"
119
118
  ```
120
119
 
121
120
  #### Type
@@ -124,7 +123,7 @@ Sets the type of the target, Can be `:application`, `:dynamic_library`,
124
123
  `:framework` or `:static_library`.
125
124
 
126
125
  ```ruby
127
- t.type = :application
126
+ target.type = :application
128
127
  ```
129
128
 
130
129
  #### Platform
@@ -132,7 +131,7 @@ t.type = :application
132
131
  Sets the platform of the target. Can be `:ios` or `:osx`
133
132
 
134
133
  ```ruby
135
- t.platform = :ios
134
+ target.platform = :ios
136
135
  ```
137
136
 
138
137
  #### Deployment Target
@@ -140,7 +139,7 @@ t.platform = :ios
140
139
  Sets the deployment target for the platform.
141
140
 
142
141
  ```ruby
143
- t.deployment_target = 8.0
142
+ target.deployment_target = 8.0
144
143
  ```
145
144
 
146
145
  #### Language
@@ -148,19 +147,86 @@ t.deployment_target = 8.0
148
147
  Sets the primary language of the target, can be `:objc` or `:swift`.
149
148
 
150
149
  ```ruby
151
- t.language = :swift
150
+ target.language = :swift
152
151
  ```
153
152
 
154
153
  ## Configurations
155
154
 
155
+ Configurations are an abstraction of build settings and scheme settings. Depending
156
+ on the target Xcake will create a scheme per target and per configuration.
157
+
158
+ Xcake allows you define a hierarchy of build settings like you would in Xcode
159
+ for the Project and the Targets.
160
+
156
161
  ### Debug Configurations
157
162
 
163
+ For configurations used for internal testing we create a debug configuration,
164
+ this comes with sensible defaults optimized for debugging (i.e Assertions enabled).
165
+
166
+ ```ruby
167
+ project.debug_configuration :staging
168
+ ```
169
+
158
170
  ### Release Configurations
159
171
 
172
+ For configurations used for release we create a release configuration,
173
+ this comes with sensible defaults optimized for releasing (i.e Compiler optimizations enabled).
174
+
175
+ ```ruby
176
+ project.release_configuration :release
177
+ ```
178
+
160
179
  ### All Configurations
161
180
 
181
+ We can apply a particular shared setting across all of our configurations.
182
+ Xcake provides a simply way of doing this via an "all" configuration.
183
+
184
+ ```ruby
185
+ project.all_configurations.supported_devices = :iphone_only
186
+ ```
187
+
162
188
  ### Configuration Hiearchy
163
189
 
190
+ Xcake allows you to manage the configurations for the project and the target but
191
+ it also has its own hiearchy of settings, which are in the following order
192
+ (One at the top of the list are overwritten by ones at the bottom):
193
+
194
+ - Default Settings
195
+ These are the sensible defaults xcake provides for the configuration.
196
+
197
+ - All Settings
198
+ These are any settings set via the "All" configuration
199
+
200
+ - Custom Settings
201
+ These are the settings set directly on the configuration.
202
+
164
203
  ###Properties
165
204
 
205
+ #### Name
206
+
207
+ Sets the name of the configuration
208
+
209
+ ```ruby
210
+ configuration.name = "Release"
211
+ ```
212
+
166
213
  #### Build Settings
214
+
215
+ A hash of all the build settings for a configuration
216
+
217
+ ```ruby
218
+ configuration.build_settings["ENABLE_BITCODE"] = false
219
+ ```
220
+
221
+ ###Build Settings Shortcuts
222
+
223
+ Xcake also provides some shortcuts for some more common build settings.
224
+
225
+ #### Supported Devices
226
+
227
+ Allows you specify the devices an iOS App can run on, can be `:iphone_only`,
228
+ `:ipad_only` or `:universal`
229
+
230
+ ```ruby
231
+ configuration.supported_devices = :iphone_only
232
+ ```
data/lib/xcake/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xcake
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Campbell