xcake 0.6.19 → 0.6.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/CHANGELOG.md +12 -1
- data/Gemfile.lock +8 -50
- data/README.md +1 -1
- data/Rakefile +3 -3
- data/_rubocop.yml +1 -1
- data/bin/console +2 -2
- data/bin/xcake +1 -1
- data/docs/Cakefile.md +17 -10
- data/docs/Xcode Project Support.md +1 -0
- data/fastlane-plugin-xcake/README.md +1 -1
- data/fastlane-plugin-xcake/Rakefile +3 -3
- data/fastlane-plugin-xcake/fastlane-plugin-xcake.gemspec +5 -5
- data/fastlane-plugin-xcake/lib/fastlane/plugin/xcake/actions/xcake_action.rb +3 -3
- data/lib/xcake/command/init.rb +4 -4
- data/lib/xcake/command/make.rb +7 -18
- data/lib/xcake/command.rb +5 -6
- data/lib/xcake/configurable.rb +24 -10
- data/lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb +1 -1
- data/lib/xcake/configuration/sugar.rb +7 -7
- data/lib/xcake/configuration.rb +3 -4
- data/lib/xcake/context/xcodeproj_context.rb +10 -7
- data/lib/xcake/context.rb +3 -0
- data/lib/xcake/core_ext/array.rb +5 -0
- data/lib/xcake/core_ext/object.rb +7 -0
- data/lib/xcake/core_ext/string.rb +3 -3
- data/lib/xcake/dependency.rb +4 -9
- data/lib/xcake/dependency_provider.rb +11 -16
- data/lib/xcake/file_reference_installer/compile_source_file_reference_installer.rb +1 -2
- data/lib/xcake/file_reference_installer/compile_xcdatamodeld_file_reference_installer.rb +2 -5
- data/lib/xcake/file_reference_installer/copy_resources_file_reference_installer.rb +3 -4
- data/lib/xcake/file_reference_installer/copy_xcassets_file_reference_installer.rb +2 -5
- data/lib/xcake/file_reference_installer/link_library_file_reference_installer.rb +9 -3
- data/lib/xcake/file_reference_installer.rb +8 -4
- data/lib/xcake/generator/configuration_generator.rb +6 -15
- data/lib/xcake/generator/project_generator.rb +2 -3
- data/lib/xcake/generator/project_metadata_generator.rb +1 -1
- data/lib/xcake/generator/project_structure_generator.rb +2 -8
- data/lib/xcake/generator/scheme_generator.rb +1 -3
- data/lib/xcake/generator/target_build_phase_generator.rb +8 -10
- data/lib/xcake/generator/target_custom_build_phase_generator.rb +0 -1
- data/lib/xcake/generator/target_file_reference_generator.rb +6 -14
- data/lib/xcake/generator/target_framework_generator.rb +3 -1
- data/lib/xcake/generator/target_library_generator.rb +3 -3
- data/lib/xcake/generator.rb +4 -3
- data/lib/xcake/informative.rb +3 -4
- data/lib/xcake/node.rb +11 -17
- data/lib/xcake/plugin.rb +8 -16
- data/lib/xcake/project/hooks.rb +1 -1
- data/lib/xcake/project/sugar.rb +12 -13
- data/lib/xcake/project.rb +3 -5
- data/lib/xcake/resources/Cakefile +2 -2
- data/lib/xcake/target/sugar.rb +1 -1
- data/lib/xcake/target.rb +22 -23
- data/lib/xcake/ui.rb +0 -3
- data/lib/xcake/version.rb +1 -1
- data/lib/xcake/visitor.rb +0 -1
- data/lib/xcake/xcode/project.rb +162 -135
- data/lib/xcake/xcode/scheme_list.rb +9 -11
- data/lib/xcake.rb +36 -58
- data/xcake.gemspec +20 -22
- metadata +8 -21
- data/lib/xcake/file_reference_installer/xcconfig_file_reference_installer.rb +0 -17
data/lib/xcake/project/sugar.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
|
-
require
|
1
|
+
require 'xcodeproj'
|
2
2
|
|
3
3
|
module Xcake
|
4
4
|
class Project
|
5
|
-
|
6
5
|
# Passes the project instance to a block. This is used to easily modify the
|
7
6
|
# properties of the project in the DSL.
|
8
7
|
#
|
@@ -10,8 +9,8 @@ module Xcake
|
|
10
9
|
# @param [Proc] block
|
11
10
|
# an optional block that configures the project through the DSL.
|
12
11
|
#
|
13
|
-
def project
|
14
|
-
|
12
|
+
def project
|
13
|
+
yield(self) if block_given?
|
15
14
|
self
|
16
15
|
end
|
17
16
|
|
@@ -32,14 +31,14 @@ module Xcake
|
|
32
31
|
# @return [Target] the application target
|
33
32
|
# the newly created application target
|
34
33
|
#
|
35
|
-
def application_for(platform, deployment_target, language = :objc
|
34
|
+
def application_for(platform, deployment_target, language = :objc)
|
36
35
|
target do |t|
|
37
36
|
t.type = :application
|
38
37
|
t.platform = platform
|
39
38
|
t.deployment_target = deployment_target
|
40
39
|
t.language = language
|
41
40
|
|
42
|
-
|
41
|
+
yield(t) if block_given?
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
@@ -54,7 +53,7 @@ module Xcake
|
|
54
53
|
# @return [Target] the unit test target
|
55
54
|
# the newly created unit test target
|
56
55
|
#
|
57
|
-
def unit_tests_for(host_target
|
56
|
+
def unit_tests_for(host_target)
|
58
57
|
target do |t|
|
59
58
|
t.name = "#{host_target.name}Tests"
|
60
59
|
|
@@ -65,13 +64,13 @@ module Xcake
|
|
65
64
|
|
66
65
|
host_path = "#{host_target.name}.app/#{host_target.name}"
|
67
66
|
t.all_configurations.each do |c|
|
68
|
-
c.settings[
|
67
|
+
c.settings['TEST_HOST'] = "$(BUILT_PRODUCTS_DIR)/#{host_path}"
|
69
68
|
end
|
70
69
|
t.all_configurations.each do |c|
|
71
|
-
c.settings[
|
70
|
+
c.settings['BUNDLE_LOADER'] = '$(TEST_HOST)'
|
72
71
|
end
|
73
72
|
|
74
|
-
|
73
|
+
yield(t) if block_given?
|
75
74
|
end
|
76
75
|
end
|
77
76
|
|
@@ -85,7 +84,7 @@ module Xcake
|
|
85
84
|
#
|
86
85
|
# @return Void
|
87
86
|
#
|
88
|
-
def watch_app_for(host_target, deployment_target, language = :objc
|
87
|
+
def watch_app_for(host_target, deployment_target, language = :objc)
|
89
88
|
watch_app_target = target do |t|
|
90
89
|
t.name = "#{host_target.name}-Watch"
|
91
90
|
|
@@ -107,9 +106,9 @@ module Xcake
|
|
107
106
|
host_target.target_dependencies << watch_app_target
|
108
107
|
watch_app_target.target_dependencies << watch_extension_target
|
109
108
|
|
110
|
-
|
109
|
+
yield(watch_app_target, watch_extension_target) if block_given?
|
111
110
|
|
112
|
-
|
111
|
+
nil
|
113
112
|
end
|
114
113
|
end
|
115
114
|
end
|
data/lib/xcake/project.rb
CHANGED
@@ -8,7 +8,6 @@ module Xcake
|
|
8
8
|
# The Project creates a hiearchy of targets and configurations
|
9
9
|
# necessary to generate a xcode project.
|
10
10
|
class Project
|
11
|
-
|
12
11
|
include Configurable
|
13
12
|
include Visitable
|
14
13
|
|
@@ -47,12 +46,11 @@ module Xcake
|
|
47
46
|
# c.application_for :ios, 8.0
|
48
47
|
# end
|
49
48
|
#
|
50
|
-
def initialize(name=
|
51
|
-
|
49
|
+
def initialize(name = 'Project')
|
52
50
|
self.name = name
|
53
51
|
self.targets = []
|
54
52
|
|
55
|
-
|
53
|
+
yield(self) if block_given?
|
56
54
|
end
|
57
55
|
|
58
56
|
# @!group Working with a project
|
@@ -68,7 +66,7 @@ module Xcake
|
|
68
66
|
def target(&block)
|
69
67
|
target = Target.new(project, &block)
|
70
68
|
|
71
|
-
|
69
|
+
targets << target
|
72
70
|
target
|
73
71
|
end
|
74
72
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Change this to set a different Project file name
|
2
|
-
#project.
|
2
|
+
#project.name = "Project"
|
3
3
|
|
4
4
|
# Replace this with your class prefix for Objective-C files.
|
5
5
|
project.class_prefix = "APP"
|
@@ -24,7 +24,7 @@ application_for :ios, 8.0 do |target|
|
|
24
24
|
#
|
25
25
|
# File patterns can be seen here https://guides.cocoapods.org/syntax/podspec.html#group_file_patterns
|
26
26
|
#
|
27
|
-
#target.all_configurations.each { |c| .supported_devices = :iphone_only}
|
27
|
+
#target.all_configurations.each { |c| c.supported_devices = :iphone_only}
|
28
28
|
|
29
29
|
# Uncomment this to include additional files
|
30
30
|
#
|
data/lib/xcake/target/sugar.rb
CHANGED
data/lib/xcake/target.rb
CHANGED
@@ -175,12 +175,11 @@ module Xcake
|
|
175
175
|
# t.name "test"
|
176
176
|
# end
|
177
177
|
#
|
178
|
-
def initialize(project
|
179
|
-
|
178
|
+
def initialize(project)
|
180
179
|
@project = project
|
181
180
|
@build_phases = []
|
182
181
|
|
183
|
-
|
182
|
+
yield(self) if block_given?
|
184
183
|
end
|
185
184
|
|
186
185
|
def include_files
|
@@ -192,7 +191,7 @@ module Xcake
|
|
192
191
|
end
|
193
192
|
|
194
193
|
def system_frameworks
|
195
|
-
@system_frameworks ||= default_system_frameworks_for
|
194
|
+
@system_frameworks ||= default_system_frameworks_for platform
|
196
195
|
end
|
197
196
|
|
198
197
|
def system_libraries
|
@@ -214,19 +213,19 @@ module Xcake
|
|
214
213
|
def default_system_frameworks_for(platform)
|
215
214
|
case platform
|
216
215
|
when :ios
|
217
|
-
|
216
|
+
%w(Foundation UIKit)
|
218
217
|
when :osx
|
219
218
|
['Cocoa']
|
220
219
|
when :tvos
|
221
|
-
|
220
|
+
%w(Foundation UIKit)
|
222
221
|
when :watchos
|
223
|
-
|
222
|
+
%w(Foundation UIKit WatchKit)
|
224
223
|
else
|
225
|
-
abort
|
224
|
+
abort 'Platform not supported!'
|
226
225
|
end
|
227
226
|
end
|
228
227
|
|
229
|
-
#Configurable
|
228
|
+
# Configurable
|
230
229
|
|
231
230
|
def parent_configurable
|
232
231
|
@project
|
@@ -236,27 +235,27 @@ module Xcake
|
|
236
235
|
# into here?
|
237
236
|
def default_settings
|
238
237
|
{
|
239
|
-
|
238
|
+
'INFOPLIST_FILE' => "#{name}/Supporting Files/Info.plist"
|
240
239
|
}
|
241
240
|
end
|
242
241
|
|
243
242
|
def default_debug_settings
|
244
|
-
Xcodeproj::Project::ProjectHelper
|
245
|
-
common_build_settings(:debug,
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
243
|
+
Xcodeproj::Project::ProjectHelper
|
244
|
+
.common_build_settings(:debug,
|
245
|
+
platform,
|
246
|
+
deployment_target.to_s,
|
247
|
+
type,
|
248
|
+
language).merge!(default_settings)
|
250
249
|
end
|
251
250
|
|
252
251
|
def default_release_settings
|
253
|
-
Xcodeproj::Project::ProjectHelper
|
254
|
-
common_build_settings(:release,
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
252
|
+
Xcodeproj::Project::ProjectHelper
|
253
|
+
.common_build_settings(:release,
|
254
|
+
platform,
|
255
|
+
deployment_target.to_s,
|
256
|
+
type,
|
257
|
+
language)
|
258
|
+
.merge!(default_settings)
|
260
259
|
end
|
261
260
|
end
|
262
261
|
end
|
data/lib/xcake/ui.rb
CHANGED
data/lib/xcake/version.rb
CHANGED
data/lib/xcake/visitor.rb
CHANGED
data/lib/xcake/xcode/project.rb
CHANGED
@@ -3,144 +3,171 @@ require 'xcodeproj'
|
|
3
3
|
module Xcake
|
4
4
|
module Xcode
|
5
5
|
class Project < Xcodeproj::Project
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
native_target.product_type = target.type
|
98
|
-
end
|
99
|
-
|
100
|
-
native_target.build_configuration_list = new(Xcodeproj::Project::Object::XCConfigurationList)
|
101
|
-
|
102
|
-
product = self.products_group.new_product_ref_for_target(native_target.product_name, native_target.product_type)
|
103
|
-
native_target.product_reference = product
|
104
|
-
|
105
|
-
self.targets << native_target
|
106
|
-
native_target
|
107
|
-
end
|
108
|
-
|
109
|
-
# Creates a new xcode configuration from the configuration DSL
|
110
|
-
#
|
111
|
-
# @param [Configurarion] configuration
|
112
|
-
# configuration DSL to create target from
|
113
|
-
#
|
114
|
-
# @return [Configurarion] new xcode configuration
|
115
|
-
#
|
116
|
-
def new_configuration(configuration)
|
117
|
-
new(Xcodeproj::Project::Object::XCBuildConfiguration)
|
118
|
-
end
|
119
|
-
|
120
|
-
# Creates a new xcode group from the node
|
121
|
-
#
|
122
|
-
# @param [Node] node
|
123
|
-
# configuration DSL to create target from
|
124
|
-
#
|
125
|
-
# @return [Group] new xcode group
|
126
|
-
#
|
127
|
-
def new_group(node)
|
128
|
-
return main_group unless node.parent
|
129
|
-
main_group.find_subpath(node.parent.path, true)
|
6
|
+
# @return [Hash] the attributes of
|
7
|
+
# the project
|
8
|
+
#
|
9
|
+
def attributes
|
10
|
+
root_object.attributes
|
11
|
+
end
|
12
|
+
|
13
|
+
# @return [String] the class name for the project
|
14
|
+
#
|
15
|
+
def class_prefix
|
16
|
+
attributes['CLASSPREFIX']
|
17
|
+
end
|
18
|
+
|
19
|
+
# Sets the class prefix for the project
|
20
|
+
#
|
21
|
+
# @param [String] value to set
|
22
|
+
#
|
23
|
+
# @return [String] the class name for the project
|
24
|
+
#
|
25
|
+
def class_prefix=(class_prefix)
|
26
|
+
attributes['CLASSPREFIX'] = class_prefix
|
27
|
+
end
|
28
|
+
|
29
|
+
# @return [String] the organization for the project
|
30
|
+
#
|
31
|
+
def organization
|
32
|
+
attributes['ORGANIZATIONNAME']
|
33
|
+
end
|
34
|
+
|
35
|
+
# Sets the organization for the project
|
36
|
+
#
|
37
|
+
# @param [String] value to set
|
38
|
+
#
|
39
|
+
# @return [SchemeList] the organization for the project
|
40
|
+
#
|
41
|
+
def organization=(organization)
|
42
|
+
attributes['ORGANIZATIONNAME'] = organization
|
43
|
+
end
|
44
|
+
|
45
|
+
# @return [SchemeList] the scheme list
|
46
|
+
#
|
47
|
+
def scheme_list
|
48
|
+
@scheme_list ||= SchemeList.new(self)
|
49
|
+
end
|
50
|
+
|
51
|
+
def object_version
|
52
|
+
Xcodeproj::Constants::DEFAULT_OBJECT_VERSION.to_s
|
53
|
+
end
|
54
|
+
|
55
|
+
def recreate_user_schemes(*)
|
56
|
+
puts 'Creating Schemes...'
|
57
|
+
|
58
|
+
scheme_list.recreate_schemes
|
59
|
+
scheme_list.save(path)
|
60
|
+
end
|
61
|
+
|
62
|
+
# Configures the Project for use with Xcake.
|
63
|
+
# This makes sure we have sensible defaults and
|
64
|
+
# it as clean as possible.
|
65
|
+
#
|
66
|
+
def setup_for_xcake
|
67
|
+
root_object.remove_referrer(self) if root_object
|
68
|
+
root_object = new(Project::Object::PBXProject)
|
69
|
+
root_object.add_referrer(self)
|
70
|
+
|
71
|
+
config_list = new(XCConfigurationList)
|
72
|
+
root_object.build_configuration_list = config_list
|
73
|
+
|
74
|
+
root_object.main_group = new(PBXGroup)
|
75
|
+
root_object.product_ref_group = root_object.main_group.new_group('Products')
|
76
|
+
|
77
|
+
@root_object = root_object
|
78
|
+
end
|
79
|
+
|
80
|
+
# Creates a new xcode target from the target DSL
|
81
|
+
#
|
82
|
+
# @param [Target] target
|
83
|
+
# target DSL to create target from
|
84
|
+
#
|
85
|
+
# @return [Target] new xcode target
|
86
|
+
#
|
87
|
+
def new_target(target)
|
88
|
+
native_target = new(Xcodeproj::Project::Object::PBXNativeTarget)
|
89
|
+
native_target.name = target.name
|
90
|
+
native_target.product_name = target.name
|
91
|
+
|
92
|
+
case target.type
|
93
|
+
when Symbol
|
94
|
+
native_target.product_type = Xcodeproj::Constants::PRODUCT_TYPE_UTI[target.type]
|
95
|
+
when String
|
96
|
+
native_target.product_type = target.type
|
130
97
|
end
|
131
98
|
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
99
|
+
native_target.build_configuration_list = new(Xcodeproj::Project::Object::XCConfigurationList)
|
100
|
+
|
101
|
+
product = products_group.new_product_ref_for_target(native_target.product_name, native_target.product_type)
|
102
|
+
native_target.product_reference = product
|
103
|
+
|
104
|
+
targets << native_target
|
105
|
+
native_target
|
106
|
+
end
|
107
|
+
|
108
|
+
# Creates a new xcode configuration from the configuration DSL
|
109
|
+
#
|
110
|
+
# @param [Configurarion] configuration
|
111
|
+
# configuration DSL to create target from
|
112
|
+
#
|
113
|
+
# @return [Configurarion] new xcode configuration
|
114
|
+
#
|
115
|
+
def new_configuration(_configuration)
|
116
|
+
new(Xcodeproj::Project::Object::XCBuildConfiguration)
|
117
|
+
end
|
118
|
+
|
119
|
+
# Creates a new xcode group from the node
|
120
|
+
#
|
121
|
+
# @param [Node] node
|
122
|
+
# configuration DSL to create target from
|
123
|
+
#
|
124
|
+
# @return [Group] new xcode group
|
125
|
+
#
|
126
|
+
#
|
127
|
+
# TODO: Simplify this method figure out more reliable rules for group
|
128
|
+
# generation - maybe part of the new file installer in 0.7.
|
129
|
+
#
|
130
|
+
def new_group(node)
|
131
|
+
return main_group unless node.parent
|
132
|
+
|
133
|
+
group = main_group unless node.parent
|
134
|
+
group = main_group.find_subpath(node.parent.path, true) unless group
|
135
|
+
ensure_parent_path(group, node.parent)
|
136
|
+
|
137
|
+
group
|
138
|
+
end
|
139
|
+
|
140
|
+
# Creates a new xcode file reference from the node
|
141
|
+
#
|
142
|
+
# @param [String] path
|
143
|
+
# => path of the file reference from the source root
|
144
|
+
#
|
145
|
+
# @return [PBXFileReference] new xcode file refrence
|
146
|
+
#
|
147
|
+
def new_file_reference(path)
|
148
|
+
path_object = Pathname.new(path)
|
149
|
+
group = main_group.find_subpath(path_object.dirname.to_s, true)
|
150
|
+
group[path_object.basename.to_s] ||
|
151
|
+
group.new_reference(path_object.to_s)
|
152
|
+
end
|
153
|
+
|
154
|
+
def ensure_parent_path(group, node)
|
155
|
+
group.path = node.component
|
156
|
+
ensure_parent_path(group.parent, node.parent) unless node.parent.nil?
|
157
|
+
end
|
158
|
+
|
159
|
+
# Finds a unit test target for a xcode target
|
160
|
+
#
|
161
|
+
# @param [Target] target
|
162
|
+
# target to find a xcode target for.
|
163
|
+
#
|
164
|
+
# @return [Target] unit test target
|
165
|
+
#
|
166
|
+
def find_unit_test_target_for_target(target)
|
167
|
+
targets.find do |t|
|
168
|
+
t.name == "#{target.name}Tests"
|
143
169
|
end
|
170
|
+
end
|
144
171
|
end
|
145
172
|
end
|
146
173
|
end
|
@@ -48,8 +48,8 @@ module Xcake
|
|
48
48
|
#
|
49
49
|
def create_schemes_for_target(target)
|
50
50
|
case target.product_type
|
51
|
-
|
52
|
-
|
51
|
+
when Xcodeproj::Constants::PRODUCT_TYPE_UTI[:application]
|
52
|
+
create_schemes_for_application(target)
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -63,7 +63,7 @@ module Xcake
|
|
63
63
|
scheme = Scheme.new
|
64
64
|
|
65
65
|
scheme.name = "#{target.name}-#{c.name}"
|
66
|
-
@xcschememanagement['SuppressBuildableAutocreation'][target.uuid] = {
|
66
|
+
@xcschememanagement['SuppressBuildableAutocreation'][target.uuid] = { 'primary' => true }
|
67
67
|
|
68
68
|
unit_test_target = project.find_unit_test_target_for_target(target)
|
69
69
|
scheme.configure_with_targets(target, unit_test_target)
|
@@ -74,10 +74,10 @@ module Xcake
|
|
74
74
|
scheme.analyze_action.build_configuration = c.name
|
75
75
|
scheme.archive_action.build_configuration = c.name
|
76
76
|
|
77
|
-
#TODO: We should structure this stuff out
|
78
|
-
if unit_test_target
|
79
|
-
|
80
|
-
|
77
|
+
# TODO: We should structure this stuff out
|
78
|
+
if unit_test_target
|
79
|
+
unit_test_target.add_dependency(target)
|
80
|
+
@xcschememanagement['SuppressBuildableAutocreation'][unit_test_target.uuid] = { 'primary' => true }
|
81
81
|
end
|
82
82
|
|
83
83
|
schemes << scheme
|
@@ -90,23 +90,21 @@ module Xcake
|
|
90
90
|
# path to write to.
|
91
91
|
#
|
92
92
|
def save(writing_path)
|
93
|
-
|
94
93
|
schemes_dir = Scheme.user_data_dir(writing_path)
|
95
94
|
|
96
95
|
FileUtils.rm_rf(schemes_dir)
|
97
96
|
FileUtils.mkdir_p(schemes_dir)
|
98
97
|
|
99
98
|
schemes.each do |s|
|
100
|
-
|
101
99
|
puts "Saving Scheme #{s.name}..."
|
102
100
|
s.save_as(@project.path, s.name, true)
|
103
101
|
|
104
102
|
@xcschememanagement['SchemeUserState']["#{s.name}.xcscheme_^#shared#^_"] = {
|
105
|
-
|
103
|
+
'isShown' => true
|
106
104
|
}
|
107
105
|
end
|
108
106
|
|
109
|
-
puts
|
107
|
+
puts 'Saving Scheme List...'
|
110
108
|
|
111
109
|
xcschememanagement_path = schemes_dir + 'xcschememanagement.plist'
|
112
110
|
write_plist(xcschememanagement_path)
|