xcake 0.1.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -8
- data/Cakefile +3 -1
- data/Gemfile.lock +5 -5
- data/README.md +4 -7
- data/docs/Cakefile.md +13 -1
- data/lib/xcake.rb +2 -1
- data/lib/xcake/command.rb +1 -0
- data/lib/xcake/project.rb +0 -62
- data/lib/xcake/project/sugar.rb +94 -0
- data/lib/xcake/project_structure_resolver.rb +2 -2
- data/lib/xcake/version.rb +1 -1
- data/xcake.gemspec +4 -4
- metadata +19 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a76229bc308d9b57a4c42891547f723348af0449
|
4
|
+
data.tar.gz: 45cad23a965f70cf4fe2e3f95df7fa355955cfbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b67059835e24e4fe13fb0b326c699a1511e911e5187e86f0c3cdb7e132a10b7b6d2d88cadad08f4a4cfab754d26be8bd6b6588cb8b7ca7acc6049f5c45104ad
|
7
|
+
data.tar.gz: 64deb9435eb8bb6e4d446cc217f520dd4155b09f8bd27127ce949dc119923c81503f412c3280e037c22af185bffda69e48244e45edf4c5e082a56e9b58953f2e
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,25 @@
|
|
1
|
+
v0.3.0
|
2
|
+
======
|
3
|
+
- Simplified Watch OS target syntax.
|
4
|
+
- Fixes issue with `--version` not working for all installations.
|
5
|
+
|
6
|
+
v0.2.0
|
7
|
+
======
|
8
|
+
- Now adds `--version` flag to command line, to allow you to find out Xcake's version.
|
9
|
+
- Brings naming of default build configurations closer to Xcode's, so that it works with existing build scripts.
|
10
|
+
- Adds support for Watch OS 2 Applications
|
11
|
+
|
12
|
+
v0.1.9
|
13
|
+
======
|
14
|
+
- Updates documentation for tvOS and Watch OS support.
|
15
|
+
|
1
16
|
v0.1.8
|
2
17
|
======
|
3
|
-
- Add tvOS and Watch OS support (Thanks to @petester42)
|
18
|
+
- Add tvOS and Watch OS support (Thanks to @petester42).
|
4
19
|
|
5
20
|
v0.1.7
|
6
21
|
======
|
7
|
-
- Adds ability to set Project Class Prefix and Organization
|
22
|
+
- Adds ability to set Project Class Prefix and Organization.
|
8
23
|
|
9
24
|
v0.1.6
|
10
25
|
======
|
@@ -17,24 +32,24 @@ v0.1.5
|
|
17
32
|
|
18
33
|
v0.1.4
|
19
34
|
======
|
20
|
-
- Removes references to "build_configurations" to just "configuration"
|
35
|
+
- Removes references to "build_configurations" to just "configuration".
|
21
36
|
to make syntax shorter and to reflect the fact it's an abstraction and not directly
|
22
37
|
a Xcode build configuration.
|
23
38
|
|
24
39
|
v0.1.3
|
25
40
|
======
|
26
41
|
- Reverts to an older GemSpec to fix installation issues.
|
27
|
-
- Adds initial Getting Started documentation
|
42
|
+
- Adds initial Getting Started documentation.
|
28
43
|
|
29
44
|
v0.1.2
|
30
45
|
======
|
31
|
-
- Adds dependency information for Ruby and RubyGems versions
|
46
|
+
- Adds dependency information for Ruby and RubyGems versions.
|
32
47
|
|
33
48
|
v0.1.1
|
34
49
|
======
|
35
|
-
- Updated README instructions
|
36
|
-
- General Tidy up of code
|
50
|
+
- Updated README instructions.
|
51
|
+
- General Tidy up of code.
|
37
52
|
|
38
53
|
v0.1.0
|
39
54
|
======
|
40
|
-
- Initial Release
|
55
|
+
- Initial Release.
|
data/Cakefile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
xcake (0.
|
5
|
-
claide
|
4
|
+
xcake (0.3.0)
|
5
|
+
claide (~> 0.9.1)
|
6
6
|
xcodeproj (~> 0.28)
|
7
7
|
|
8
8
|
GEM
|
@@ -78,11 +78,11 @@ PLATFORMS
|
|
78
78
|
|
79
79
|
DEPENDENCIES
|
80
80
|
bundler (~> 1.10)
|
81
|
-
coveralls
|
81
|
+
coveralls (~> 0.8)
|
82
82
|
rake (~> 10.0)
|
83
|
-
rspec
|
83
|
+
rspec (~> 3.4.0)
|
84
84
|
xcake!
|
85
|
-
yard
|
85
|
+
yard (~> 0.8)
|
86
86
|
|
87
87
|
BUNDLED WITH
|
88
88
|
1.10.6
|
data/README.md
CHANGED
@@ -59,7 +59,7 @@ xcake
|
|
59
59
|
:page_with_curl: | Store **everything** but the project in git. Never again manually fix any corruptions or merge issues with the project.
|
60
60
|
:rocket: | Saves you **hours** when working with xcode projects
|
61
61
|
:anchor: | Confidence that the project file is exactly the same during Continuous Delivery
|
62
|
-
:computer: | Support for
|
62
|
+
:computer: | Support for OSX, iOS and watchOS apps
|
63
63
|
|
64
64
|
## Installation
|
65
65
|
|
@@ -90,16 +90,13 @@ Please submit an issue on GitHub and provide information about your setup
|
|
90
90
|
|
91
91
|
## Roadmap
|
92
92
|
|
93
|
-
:white_check_mark:
|
93
|
+
:white_check_mark: Create WatchOS applications.
|
94
94
|
|
95
|
-
:
|
96
|
-
|
97
|
-
:white_check_mark: Generate testing targets.
|
95
|
+
:white_medium_square: Create tvOS applications.
|
98
96
|
|
99
97
|
:white_medium_square: Generate library targets.
|
100
98
|
|
101
|
-
:white_medium_square: Generate
|
102
|
-
|
99
|
+
:white_medium_square: Generate extensions.
|
103
100
|
|
104
101
|
## License
|
105
102
|
This project is licensed under the terms of the MIT license. See the LICENSE file.
|
data/docs/Cakefile.md
CHANGED
@@ -102,7 +102,7 @@ end
|
|
102
102
|
|
103
103
|
###Tests
|
104
104
|
|
105
|
-
We can also specify a testing targets for other targets as well
|
105
|
+
We can also specify a testing targets for other targets as well:
|
106
106
|
|
107
107
|
```ruby
|
108
108
|
Project.new "Workspace" do |project|
|
@@ -112,6 +112,18 @@ Project.new "Workspace" do |project|
|
|
112
112
|
end
|
113
113
|
```
|
114
114
|
|
115
|
+
###Watch
|
116
|
+
|
117
|
+
To create watch applications we can simply use the `watch_app_for` method:
|
118
|
+
|
119
|
+
```ruby
|
120
|
+
Project.new "Workspace" do |project|
|
121
|
+
project.application_for :mac, 8.0 do |target|
|
122
|
+
project.watch_app_for target, 2.0
|
123
|
+
end
|
124
|
+
end
|
125
|
+
```
|
126
|
+
|
115
127
|
###Custom Targets
|
116
128
|
|
117
129
|
If these aren't enough for you then you can specify a target
|
data/lib/xcake.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "xcake/visitable"
|
2
2
|
require "xcake/visitor"
|
3
|
+
require "xcake/version"
|
3
4
|
|
4
5
|
require "xcake/command"
|
5
6
|
require "xcake/configuration"
|
@@ -19,10 +20,10 @@ require "xcake/generator/project"
|
|
19
20
|
require "xcake/generator/target"
|
20
21
|
|
21
22
|
require "xcake/project"
|
23
|
+
require "xcake/project/sugar"
|
22
24
|
require "xcake/project_structure_resolver"
|
23
25
|
require "xcake/node"
|
24
26
|
require "xcake/target"
|
25
|
-
require "xcake/version"
|
26
27
|
|
27
28
|
require "xcake/xcode/project"
|
28
29
|
require "xcake/xcode/scheme"
|
data/lib/xcake/command.rb
CHANGED
data/lib/xcake/project.rb
CHANGED
@@ -71,68 +71,6 @@ module Xcake
|
|
71
71
|
target
|
72
72
|
end
|
73
73
|
|
74
|
-
# Defines a new application target.
|
75
|
-
#
|
76
|
-
# @param [Symbol] platform
|
77
|
-
# platform for the application, can be either `:ios`, `:osx`, `:tvos` or `:watchos`.
|
78
|
-
#
|
79
|
-
# @param [Float] deployment_target
|
80
|
-
# the minimum deployment version for the platform.
|
81
|
-
#
|
82
|
-
# @param [Symbol] language
|
83
|
-
# language for application, can be either `:objc` or `:swift`.
|
84
|
-
#
|
85
|
-
# @param [Proc] block
|
86
|
-
# an optional block that configures the target through the DSL.
|
87
|
-
#
|
88
|
-
# @return [Target] the application target
|
89
|
-
# the newly created application target
|
90
|
-
#
|
91
|
-
def application_for(platform, deployment_target, language=:objc, &block)
|
92
|
-
|
93
|
-
application_target = target do |t|
|
94
|
-
t.type = :application
|
95
|
-
t.platform = platform
|
96
|
-
t.deployment_target = deployment_target
|
97
|
-
t.language = language
|
98
|
-
|
99
|
-
block.call(t) if block_given?
|
100
|
-
end
|
101
|
-
|
102
|
-
application_target
|
103
|
-
end
|
104
|
-
|
105
|
-
# Defines a new unit test target.
|
106
|
-
#
|
107
|
-
# @param [Target] host_target
|
108
|
-
# host target for which the unit tests are for.
|
109
|
-
#
|
110
|
-
# @param [Proc] block
|
111
|
-
# an optional block that configures the target through the DSL.
|
112
|
-
#
|
113
|
-
# @return [Target] the unit test target
|
114
|
-
# the newly created unit test target
|
115
|
-
#
|
116
|
-
def unit_tests_for(host_target, &block)
|
117
|
-
|
118
|
-
unit_test_target = target do |t|
|
119
|
-
|
120
|
-
t.name = "#{host_target.name}Tests"
|
121
|
-
|
122
|
-
t.type = :unit_test_bundle
|
123
|
-
t.platform = host_target.platform
|
124
|
-
t.deployment_target = host_target.deployment_target
|
125
|
-
t.language = host_target.language
|
126
|
-
|
127
|
-
t.all_configurations.settings["TEST_HOST"] = "$(BUILT_PRODUCTS_DIR)/#{host_target.name}.app/#{host_target.name}"
|
128
|
-
t.all_configurations.settings["BUNDLE_LOADER"] = "$(TEST_HOST)"
|
129
|
-
|
130
|
-
block.call(t) if block_given?
|
131
|
-
end
|
132
|
-
|
133
|
-
unit_test_target
|
134
|
-
end
|
135
|
-
|
136
74
|
protected
|
137
75
|
|
138
76
|
# Configurable
|
@@ -0,0 +1,94 @@
|
|
1
|
+
require "xcodeproj"
|
2
|
+
|
3
|
+
module Xcake
|
4
|
+
class Project
|
5
|
+
# Defines a new application target.
|
6
|
+
#
|
7
|
+
# @param [Symbol] platform
|
8
|
+
# platform for the application, can be either `:ios`, `:osx`, `:tvos` or `:watchos`.
|
9
|
+
#
|
10
|
+
# @param [Float] deployment_target
|
11
|
+
# the minimum deployment version for the platform.
|
12
|
+
#
|
13
|
+
# @param [Symbol] language
|
14
|
+
# language for application, can be either `:objc` or `:swift`.
|
15
|
+
#
|
16
|
+
# @param [Proc] block
|
17
|
+
# an optional block that configures the target through the DSL.
|
18
|
+
#
|
19
|
+
# @return [Target] the application target
|
20
|
+
# the newly created application target
|
21
|
+
#
|
22
|
+
def application_for(platform, deployment_target, language = :objc, &block)
|
23
|
+
target do |t|
|
24
|
+
t.type = :application
|
25
|
+
t.platform = platform
|
26
|
+
t.deployment_target = deployment_target
|
27
|
+
t.language = language
|
28
|
+
|
29
|
+
block.call(t) if block_given?
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# Defines a new unit test target.
|
34
|
+
#
|
35
|
+
# @param [Target] host target
|
36
|
+
# host target for which the unit tests are for.
|
37
|
+
#
|
38
|
+
# @param [Proc] block
|
39
|
+
# an optional block that configures the target through the DSL.
|
40
|
+
#
|
41
|
+
# @return [Target] the unit test target
|
42
|
+
# the newly created unit test target
|
43
|
+
#
|
44
|
+
def unit_tests_for(host_target, &block)
|
45
|
+
target do |t|
|
46
|
+
t.name = "#{host_target.name}Tests"
|
47
|
+
|
48
|
+
t.type = :unit_test_bundle
|
49
|
+
t.platform = host_target.platform
|
50
|
+
t.deployment_target = host_target.deployment_target
|
51
|
+
t.language = host_target.language
|
52
|
+
|
53
|
+
t.all_configurations.settings["TEST_HOST"] = "$(BUILT_PRODUCTS_DIR)/#{host_target.name}.app/#{host_target.name}"
|
54
|
+
t.all_configurations.settings["BUNDLE_LOADER"] = "$(TEST_HOST)"
|
55
|
+
|
56
|
+
block.call(t) if block_given?
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# Defines targets for watch app.
|
61
|
+
#
|
62
|
+
# @param [Target] watch app's compantion app
|
63
|
+
# iOS target for the watch app
|
64
|
+
#
|
65
|
+
# @param [Proc] block
|
66
|
+
# an optional block that configures the targets through the DSL.
|
67
|
+
#
|
68
|
+
# @return Void
|
69
|
+
#
|
70
|
+
def watch_app_for(host_target, deployment_target, language = :objc, &block)
|
71
|
+
watch_app_target = target do |t|
|
72
|
+
t.name = "#{host_target.name}-Watch"
|
73
|
+
|
74
|
+
t.type = :watch2_app
|
75
|
+
t.platform = :watchos
|
76
|
+
t.deployment_target = deployment_target
|
77
|
+
t.language = language
|
78
|
+
end
|
79
|
+
|
80
|
+
watch_extension_target = target do |t|
|
81
|
+
t.name = "#{host_target.name}-Watch Extension"
|
82
|
+
|
83
|
+
t.type = :watch2_extension
|
84
|
+
t.platform = :watchos
|
85
|
+
t.deployment_target = deployment_target
|
86
|
+
t.language = language
|
87
|
+
end
|
88
|
+
|
89
|
+
block.call(watch_app_target, watch_extension_target) if block_given?
|
90
|
+
|
91
|
+
return nil
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -21,8 +21,8 @@ module Xcake
|
|
21
21
|
|
22
22
|
@project = project
|
23
23
|
|
24
|
-
@project.debug_configuration :
|
25
|
-
@project.release_configuration :
|
24
|
+
@project.debug_configuration :Debug if @project.debug_configurations.count == 0
|
25
|
+
@project.release_configuration :Release if @project.release_configurations.count == 0
|
26
26
|
end
|
27
27
|
|
28
28
|
def leave_project(project)
|
data/lib/xcake/version.rb
CHANGED
data/xcake.gemspec
CHANGED
@@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.10"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
-
spec.add_development_dependency "rspec"
|
27
|
-
spec.add_development_dependency "coveralls"
|
28
|
-
spec.add_development_dependency "yard"
|
29
|
-
spec.add_dependency "claide"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.4.0"
|
27
|
+
spec.add_development_dependency "coveralls", "~> 0.8"
|
28
|
+
spec.add_development_dependency "yard", "~> 0.8"
|
29
|
+
spec.add_dependency "claide", "~> 0.9.1"
|
30
30
|
spec.add_dependency "xcodeproj", "~> 0.28"
|
31
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,58 +42,58 @@ dependencies:
|
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 3.4.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 3.4.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
61
|
+
version: '0.8'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
68
|
+
version: '0.8'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: yard
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
75
|
+
version: '0.8'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
82
|
+
version: '0.8'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: claide
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 0.9.1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 0.9.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: xcodeproj
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- lib/xcake/generator/target.rb
|
160
160
|
- lib/xcake/node.rb
|
161
161
|
- lib/xcake/project.rb
|
162
|
+
- lib/xcake/project/sugar.rb
|
162
163
|
- lib/xcake/project_structure_resolver.rb
|
163
164
|
- lib/xcake/target.rb
|
164
165
|
- lib/xcake/version.rb
|