xcodeproj 1.14.0 → 1.21.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 +1 -1
- data/lib/xcodeproj/command/sort.rb +12 -1
- data/lib/xcodeproj/config/other_linker_flags_parser.rb +5 -0
- data/lib/xcodeproj/config.rb +12 -2
- data/lib/xcodeproj/constants.rb +63 -49
- data/lib/xcodeproj/gem_version.rb +1 -1
- data/lib/xcodeproj/project/object/build_configuration.rb +33 -8
- data/lib/xcodeproj/project/object/build_file.rb +7 -1
- data/lib/xcodeproj/project/object/build_phase.rb +31 -0
- data/lib/xcodeproj/project/object/group.rb +11 -9
- data/lib/xcodeproj/project/object/helpers/file_references_factory.rb +8 -6
- data/lib/xcodeproj/project/object/helpers/groupable_helper.rb +2 -2
- data/lib/xcodeproj/project/object/native_target.rb +43 -0
- data/lib/xcodeproj/project/object/swift_package_product_dependency.rb +10 -0
- data/lib/xcodeproj/project/object/swift_package_remote_reference.rb +14 -0
- data/lib/xcodeproj/project/object/target_dependency.rb +1 -0
- data/lib/xcodeproj/project/project_helper.rb +6 -6
- data/lib/xcodeproj/project.rb +9 -6
- data/lib/xcodeproj/scheme/abstract_scheme_action.rb +72 -0
- data/lib/xcodeproj/scheme/build_action.rb +108 -1
- data/lib/xcodeproj/scheme/execution_action.rb +86 -0
- data/lib/xcodeproj/scheme/launch_action.rb +33 -2
- data/lib/xcodeproj/scheme/location_scenario_reference.rb +49 -0
- data/lib/xcodeproj/scheme/profile_action.rb +5 -5
- data/lib/xcodeproj/scheme/send_email_action_content.rb +84 -0
- data/lib/xcodeproj/scheme/shell_script_action_content.rb +77 -0
- data/lib/xcodeproj/scheme/test_action.rb +26 -3
- data/lib/xcodeproj/scheme.rb +5 -1
- data/lib/xcodeproj/workspace/file_reference.rb +1 -1
- data/lib/xcodeproj/workspace.rb +3 -2
- metadata +26 -8
@@ -0,0 +1,84 @@
|
|
1
|
+
module Xcodeproj
|
2
|
+
class XCScheme
|
3
|
+
# This class wraps a 'ActionContent' node of type
|
4
|
+
# 'Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.SendEmailAction' of a .xcscheme XML file
|
5
|
+
#
|
6
|
+
class SendEmailActionContent < XMLElementWrapper
|
7
|
+
# @param [REXML::Element] node
|
8
|
+
# The 'ActionContent' XML node that this object will wrap.
|
9
|
+
# If nil, will create a default XML node to use.
|
10
|
+
#
|
11
|
+
def initialize(node = nil)
|
12
|
+
create_xml_element_with_fallback(node, 'ActionContent') do
|
13
|
+
self.title = 'Send Email'
|
14
|
+
# For some reason this is not visible in Xcode's UI and it's always set to 'NO'
|
15
|
+
# couldn't find much documentation on it so it might be safer to keep it read only
|
16
|
+
@xml_element.attributes['attachLogToEmail'] = 'NO'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [Bool]
|
21
|
+
# Whether or not this action should attach log to email
|
22
|
+
#
|
23
|
+
def attach_log_to_email?
|
24
|
+
string_to_bool(@xml_element.attributes['attachLogToEmail'])
|
25
|
+
end
|
26
|
+
|
27
|
+
# @return [String]
|
28
|
+
# The title of this ActionContent
|
29
|
+
#
|
30
|
+
def title
|
31
|
+
@xml_element.attributes['title']
|
32
|
+
end
|
33
|
+
|
34
|
+
# @param [String] value
|
35
|
+
# Set the title of this ActionContent
|
36
|
+
#
|
37
|
+
def title=(value)
|
38
|
+
@xml_element.attributes['title'] = value
|
39
|
+
end
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# The email recipient of this ActionContent
|
43
|
+
#
|
44
|
+
def email_recipient
|
45
|
+
@xml_element.attributes['emailRecipient']
|
46
|
+
end
|
47
|
+
|
48
|
+
# @param [String] value
|
49
|
+
# Set the email recipient of this ActionContent
|
50
|
+
#
|
51
|
+
def email_recipient=(value)
|
52
|
+
@xml_element.attributes['emailRecipient'] = value
|
53
|
+
end
|
54
|
+
|
55
|
+
# @return [String]
|
56
|
+
# The email subject of this ActionContent
|
57
|
+
#
|
58
|
+
def email_subject
|
59
|
+
@xml_element.attributes['emailSubject']
|
60
|
+
end
|
61
|
+
|
62
|
+
# @param [String] value
|
63
|
+
# Set the email subject of this ActionContent
|
64
|
+
#
|
65
|
+
def email_subject=(value)
|
66
|
+
@xml_element.attributes['emailSubject'] = value
|
67
|
+
end
|
68
|
+
|
69
|
+
# @return [String]
|
70
|
+
# The email body of this ActionContent
|
71
|
+
#
|
72
|
+
def email_body
|
73
|
+
@xml_element.attributes['emailBody']
|
74
|
+
end
|
75
|
+
|
76
|
+
# @param [String] value
|
77
|
+
# Set the email body of this ActionContent
|
78
|
+
#
|
79
|
+
def email_body=(value)
|
80
|
+
@xml_element.attributes['emailBody'] = value
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
module Xcodeproj
|
2
|
+
class XCScheme
|
3
|
+
# This class wraps a 'ActionContent' node of type
|
4
|
+
# 'Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction' of a .xcscheme XML file
|
5
|
+
#
|
6
|
+
class ShellScriptActionContent < XMLElementWrapper
|
7
|
+
# @param [REXML::Element] node
|
8
|
+
# The 'ActionContent' XML node that this object will wrap.
|
9
|
+
# If nil, will create a default XML node to use.
|
10
|
+
#
|
11
|
+
def initialize(node = nil)
|
12
|
+
create_xml_element_with_fallback(node, 'ActionContent') do
|
13
|
+
self.title = 'Run Script'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [String]
|
18
|
+
# The title of this ActionContent
|
19
|
+
#
|
20
|
+
def title
|
21
|
+
@xml_element.attributes['title']
|
22
|
+
end
|
23
|
+
|
24
|
+
# @param [String] value
|
25
|
+
# Set the title of this ActionContent
|
26
|
+
#
|
27
|
+
def title=(value)
|
28
|
+
@xml_element.attributes['title'] = value
|
29
|
+
end
|
30
|
+
|
31
|
+
# @return [String]
|
32
|
+
# The contents of the shell script represented by this ActionContent
|
33
|
+
#
|
34
|
+
def script_text
|
35
|
+
@xml_element.attributes['scriptText']
|
36
|
+
end
|
37
|
+
|
38
|
+
# @param [String] value
|
39
|
+
# Set the contents of the shell script represented by this ActionContent
|
40
|
+
#
|
41
|
+
def script_text=(value)
|
42
|
+
@xml_element.attributes['scriptText'] = value
|
43
|
+
end
|
44
|
+
|
45
|
+
# @return [String]
|
46
|
+
# The preferred shell to invoke with this ActionContent
|
47
|
+
#
|
48
|
+
def shell_to_invoke
|
49
|
+
@xml_element.attributes['shellToInvoke']
|
50
|
+
end
|
51
|
+
|
52
|
+
# @param [String] value
|
53
|
+
# Set the preferred shell to invoke with this ActionContent
|
54
|
+
#
|
55
|
+
def shell_to_invoke=(value)
|
56
|
+
@xml_element.attributes['shellToInvoke'] = value
|
57
|
+
end
|
58
|
+
|
59
|
+
# @return [BuildableReference]
|
60
|
+
# The BuildableReference (Xcode target) associated with this ActionContent
|
61
|
+
#
|
62
|
+
def buildable_reference
|
63
|
+
BuildableReference.new(@xml_element.elements['EnvironmentBuildable'].elements['BuildableReference'])
|
64
|
+
end
|
65
|
+
|
66
|
+
# @param [BuildableReference] ref
|
67
|
+
# Set the BuildableReference (Xcode target) associated with this ActionContent
|
68
|
+
#
|
69
|
+
def buildable_reference=(ref)
|
70
|
+
@xml_element.delete_element('EnvironmentBuildable')
|
71
|
+
|
72
|
+
env_buildable = @xml_element.add_element('EnvironmentBuildable')
|
73
|
+
env_buildable.add_element(ref.xml_element)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -11,11 +11,11 @@ module Xcodeproj
|
|
11
11
|
#
|
12
12
|
def initialize(node = nil)
|
13
13
|
create_xml_element_with_fallback(node, 'TestAction') do
|
14
|
+
self.build_configuration = 'Debug'
|
14
15
|
@xml_element.attributes['selectedDebuggerIdentifier'] = 'Xcode.DebuggerFoundation.Debugger.LLDB'
|
15
16
|
@xml_element.attributes['selectedLauncherIdentifier'] = 'Xcode.DebuggerFoundation.Launcher.LLDB'
|
16
|
-
@xml_element.add_element('AdditionalOptions')
|
17
17
|
self.should_use_launch_scheme_args_env = true
|
18
|
-
|
18
|
+
@xml_element.add_element('Testables')
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -76,6 +76,18 @@ module Xcodeproj
|
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
79
|
+
# @param [Array<TestableReference>] testables
|
80
|
+
# Sets the list of TestableReference (test bundles) associated with this Test Action
|
81
|
+
#
|
82
|
+
def testables=(testables)
|
83
|
+
@xml_element.delete_element('Testables')
|
84
|
+
testables_element = @xml_element.add_element('Testables')
|
85
|
+
testables.each do |testable|
|
86
|
+
testables_element.add_element(testable.xml_element)
|
87
|
+
end
|
88
|
+
testables
|
89
|
+
end
|
90
|
+
|
79
91
|
# @param [TestableReference] testable
|
80
92
|
# Add a TestableReference (test bundle) to this Test Action
|
81
93
|
#
|
@@ -97,7 +109,11 @@ module Xcodeproj
|
|
97
109
|
# Add a MacroExpansion to this TestAction
|
98
110
|
#
|
99
111
|
def add_macro_expansion(macro_expansion)
|
100
|
-
@xml_element.
|
112
|
+
if testables = @xml_element.elements['Testables']
|
113
|
+
@xml_element.insert_before(testables, macro_expansion.xml_element)
|
114
|
+
else
|
115
|
+
@xml_element.add_element(macro_expansion.xml_element)
|
116
|
+
end
|
101
117
|
end
|
102
118
|
|
103
119
|
# @return [EnvironmentVariables]
|
@@ -219,6 +235,13 @@ module Xcodeproj
|
|
219
235
|
@xml_element.add_element(ref.xml_element)
|
220
236
|
end
|
221
237
|
|
238
|
+
# @param [BuildableReference] ref
|
239
|
+
# The BuildableReference to remove from the list of targets this entry will build
|
240
|
+
#
|
241
|
+
def remove_buildable_reference(ref)
|
242
|
+
@xml_element.delete_element(ref.xml_element)
|
243
|
+
end
|
244
|
+
|
222
245
|
# @return [Array<Test>]
|
223
246
|
# The list of SkippedTest this action will skip.
|
224
247
|
#
|
data/lib/xcodeproj/scheme.rb
CHANGED
@@ -9,8 +9,12 @@ require 'xcodeproj/scheme/archive_action'
|
|
9
9
|
|
10
10
|
require 'xcodeproj/scheme/buildable_product_runnable'
|
11
11
|
require 'xcodeproj/scheme/buildable_reference'
|
12
|
+
require 'xcodeproj/scheme/location_scenario_reference'
|
13
|
+
require 'xcodeproj/scheme/execution_action'
|
12
14
|
require 'xcodeproj/scheme/macro_expansion'
|
13
15
|
require 'xcodeproj/scheme/remote_runnable'
|
16
|
+
require 'xcodeproj/scheme/send_email_action_content'
|
17
|
+
require 'xcodeproj/scheme/shell_script_action_content'
|
14
18
|
|
15
19
|
module Xcodeproj
|
16
20
|
# This class represents a Scheme document represented by a ".xcscheme" file
|
@@ -221,7 +225,7 @@ module Xcodeproj
|
|
221
225
|
launch_runnable = BuildableProductRunnable.new(build_target, 0)
|
222
226
|
launch_action.buildable_product_runnable = launch_runnable
|
223
227
|
|
224
|
-
profile_runnable = BuildableProductRunnable.new(build_target)
|
228
|
+
profile_runnable = BuildableProductRunnable.new(build_target, 0)
|
225
229
|
profile_action.buildable_product_runnable = profile_runnable
|
226
230
|
|
227
231
|
macro_exp = MacroExpansion.new(build_target)
|
data/lib/xcodeproj/workspace.rb
CHANGED
@@ -107,8 +107,9 @@ module Xcodeproj
|
|
107
107
|
else
|
108
108
|
raise ArgumentError, "Input to the << operator must be a file path or FileReference, got #{path_or_reference.inspect}"
|
109
109
|
end
|
110
|
-
|
111
|
-
|
110
|
+
unless file_references.any? { |ref| project_file_reference.eql? ref }
|
111
|
+
@document.root.add_element(project_file_reference.to_node)
|
112
|
+
end
|
112
113
|
load_schemes_from_project File.expand_path(projpath || project_file_reference.path)
|
113
114
|
end
|
114
115
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcodeproj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: atomos
|
@@ -84,14 +84,28 @@ dependencies:
|
|
84
84
|
requirements:
|
85
85
|
- - "~>"
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version: 0.
|
87
|
+
version: 0.3.0
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
92
|
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version: 0.
|
94
|
+
version: 0.3.0
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: rexml
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 3.2.4
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 3.2.4
|
95
109
|
description: Xcodeproj lets you create and modify Xcode projects from Ruby. Script
|
96
110
|
boring management tasks or build Xcode-friendly libraries. Also includes support
|
97
111
|
for Xcode workspaces (.xcworkspace) and configuration files (.xcconfig).
|
@@ -152,10 +166,14 @@ files:
|
|
152
166
|
- lib/xcodeproj/scheme/buildable_reference.rb
|
153
167
|
- lib/xcodeproj/scheme/command_line_arguments.rb
|
154
168
|
- lib/xcodeproj/scheme/environment_variables.rb
|
169
|
+
- lib/xcodeproj/scheme/execution_action.rb
|
155
170
|
- lib/xcodeproj/scheme/launch_action.rb
|
171
|
+
- lib/xcodeproj/scheme/location_scenario_reference.rb
|
156
172
|
- lib/xcodeproj/scheme/macro_expansion.rb
|
157
173
|
- lib/xcodeproj/scheme/profile_action.rb
|
158
174
|
- lib/xcodeproj/scheme/remote_runnable.rb
|
175
|
+
- lib/xcodeproj/scheme/send_email_action_content.rb
|
176
|
+
- lib/xcodeproj/scheme/shell_script_action_content.rb
|
159
177
|
- lib/xcodeproj/scheme/test_action.rb
|
160
178
|
- lib/xcodeproj/scheme/xml_element_wrapper.rb
|
161
179
|
- lib/xcodeproj/user_interface.rb
|
@@ -168,7 +186,7 @@ homepage: https://github.com/cocoapods/xcodeproj
|
|
168
186
|
licenses:
|
169
187
|
- MIT
|
170
188
|
metadata: {}
|
171
|
-
post_install_message:
|
189
|
+
post_install_message:
|
172
190
|
rdoc_options: []
|
173
191
|
require_paths:
|
174
192
|
- lib
|
@@ -183,8 +201,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
201
|
- !ruby/object:Gem::Version
|
184
202
|
version: '0'
|
185
203
|
requirements: []
|
186
|
-
rubygems_version: 3.0.
|
187
|
-
signing_key:
|
204
|
+
rubygems_version: 3.0.3
|
205
|
+
signing_key:
|
188
206
|
specification_version: 3
|
189
207
|
summary: Create and modify Xcode projects from Ruby.
|
190
208
|
test_files: []
|