xcodeproj 1.6.0 → 1.7.0

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
  SHA256:
3
- metadata.gz: 965a58aaa67ae7f0816637cadffecc3e53d6794b7ebe97d21a562b8ceeefd7dc
4
- data.tar.gz: f2331d54681cec7fa80abab0f9d7f8ca21e04dae8d75fd037d6d71b757cf87e7
3
+ metadata.gz: a926103d6bbeeea7900326a53221df41a158228484f36dce922c54eadfa741b1
4
+ data.tar.gz: d15b7d1db2f2ad119b4660a5cad26476930866dd1bee818e770ce8d2c1b8ee4e
5
5
  SHA512:
6
- metadata.gz: b7ec36d7eeda318e9c8d0eec8755fcbfe5a522abd650f173a86de627072fe200e05efa63125a4d56b4c5a880bf53abf07a649a41cf3c87152730eda0d57f77b5
7
- data.tar.gz: 65ccb89e5efea8092af076619a8077f324084fc258132bf9763e7f8b27ce0a7e9827ee1e0d1a79700ec48b79c6f6c0d1c0f40c6f45138386969ff85d7b98e759
6
+ metadata.gz: 4886ecf3b87f33ab29072b8ae56b22bfc7810cd0feb9a460449c612d9c947befb7a101e56ffd3dadc03bda4268057f4a48d46cb2ad2dade6a645aa0a65ab5dff
7
+ data.tar.gz: 85e155a16497eab7dafc72b1c4732cf32ed1ecf90cb10d08d144eea810dd79b99193782c5031609cb5be17e2f961526b4b087eb1196ae971e067083e2f81ab94
@@ -4,17 +4,17 @@ module Xcodeproj
4
4
  module Constants
5
5
  # @return [String] The last known iOS SDK (stable).
6
6
  #
7
- LAST_KNOWN_IOS_SDK = '11.3'
7
+ LAST_KNOWN_IOS_SDK = '12.0'
8
8
 
9
9
  # @return [String] The last known OS X SDK (stable).
10
10
  #
11
- LAST_KNOWN_OSX_SDK = '10.13'
11
+ LAST_KNOWN_OSX_SDK = '10.14'
12
12
 
13
13
  # @return [String] The last known tvOS SDK (stable).
14
- LAST_KNOWN_TVOS_SDK = '11.3'
14
+ LAST_KNOWN_TVOS_SDK = '12.0'
15
15
 
16
16
  # @return [String] The last known watchOS SDK (stable).
17
- LAST_KNOWN_WATCHOS_SDK = '4.3'
17
+ LAST_KNOWN_WATCHOS_SDK = '5.0'
18
18
 
19
19
  # @return [String] The last known archive version to Xcodeproj.
20
20
  #
@@ -223,12 +223,10 @@ module Xcodeproj
223
223
  # Empty?
224
224
  }.freeze,
225
225
  [:debug, :swift] => {
226
- 'SWIFT_OPTIMIZATION_LEVEL' => '-Onone',
227
- 'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => 'DEBUG',
226
+ # Swift optimization settings are provided by the project settings
228
227
  }.freeze,
229
228
  [:release, :swift] => {
230
- 'SWIFT_COMPILATION_MODE' => 'wholemodule',
231
- 'SWIFT_OPTIMIZATION_LEVEL' => '-O',
229
+ # Swift optimization settings are provided by the project settings
232
230
  }.freeze,
233
231
  [:debug, :static_library, :swift] => {
234
232
  }.freeze,
@@ -374,20 +372,25 @@ module Xcodeproj
374
372
  'GCC_WARN_UNUSED_VARIABLE' => 'YES',
375
373
  'MTL_FAST_MATH' => 'YES',
376
374
  'PRODUCT_NAME' => '$(TARGET_NAME)',
375
+ 'SWIFT_VERSION' => '4.2',
377
376
  },
378
377
  :release => {
379
378
  'DEBUG_INFORMATION_FORMAT' => 'dwarf-with-dsym',
380
379
  'ENABLE_NS_ASSERTIONS' => 'NO',
381
380
  'MTL_ENABLE_DEBUG_INFO' => 'NO',
381
+ 'SWIFT_COMPILATION_MODE' => 'wholemodule',
382
+ 'SWIFT_OPTIMIZATION_LEVEL' => '-O',
382
383
  }.freeze,
383
384
  :debug => {
384
- 'DEBUG_INFORMATION_FORMAT' => 'dwarf',
385
- 'ENABLE_TESTABILITY' => 'YES',
386
- 'GCC_DYNAMIC_NO_PIC' => 'NO',
387
- 'GCC_OPTIMIZATION_LEVEL' => '0',
388
- 'GCC_PREPROCESSOR_DEFINITIONS' => ['DEBUG=1', '$(inherited)'],
389
- 'MTL_ENABLE_DEBUG_INFO' => 'INCLUDE_SOURCE',
390
- 'ONLY_ACTIVE_ARCH' => 'YES',
385
+ 'DEBUG_INFORMATION_FORMAT' => 'dwarf',
386
+ 'ENABLE_TESTABILITY' => 'YES',
387
+ 'GCC_DYNAMIC_NO_PIC' => 'NO',
388
+ 'GCC_OPTIMIZATION_LEVEL' => '0',
389
+ 'GCC_PREPROCESSOR_DEFINITIONS' => ['DEBUG=1', '$(inherited)'],
390
+ 'MTL_ENABLE_DEBUG_INFO' => 'INCLUDE_SOURCE',
391
+ 'ONLY_ACTIVE_ARCH' => 'YES',
392
+ 'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => 'DEBUG',
393
+ 'SWIFT_OPTIMIZATION_LEVEL' => '-Onone',
391
394
  }.freeze,
392
395
  }.freeze
393
396
 
@@ -1,5 +1,5 @@
1
1
  module Xcodeproj
2
2
  # The version of the xcodeproj gem.
3
3
  #
4
- VERSION = '1.6.0'.freeze unless defined? Xcodeproj::VERSION
4
+ VERSION = '1.7.0'.freeze unless defined? Xcodeproj::VERSION
5
5
  end
@@ -811,7 +811,7 @@ module Xcodeproj
811
811
  # folder) and optionally hides them.
812
812
  #
813
813
  # @param [Bool] visible
814
- # Wether the schemes should be visible or hidden.
814
+ # Whether the schemes should be visible or hidden.
815
815
  #
816
816
  # @return [void]
817
817
  #
@@ -826,8 +826,11 @@ module Xcodeproj
826
826
 
827
827
  targets.each do |target|
828
828
  scheme = XCScheme.new
829
- scheme.add_build_target(target)
830
- scheme.add_test_target(target) if target.respond_to?(:test_target_type?) && target.test_target_type?
829
+
830
+ test_target = target if target.respond_to?(:test_target_type?) && target.test_target_type?
831
+ launch_target = target.respond_to?(:launchable_target_type?) && target.launchable_target_type?
832
+ scheme.configure_with_targets(target, test_target, :launch_target => launch_target)
833
+
831
834
  yield scheme, target if block_given?
832
835
  scheme.save_as(path, target.name, false)
833
836
  xcschememanagement['SchemeUserState']["#{target.name}.xcscheme"] = {}
@@ -460,6 +460,17 @@ module Xcodeproj
460
460
  end
461
461
  end
462
462
 
463
+ # @return [Boolean] Whether the target is launchable.
464
+ #
465
+ def launchable_target_type?
466
+ case symbol_type
467
+ when :application, :command_line_tool
468
+ true
469
+ else
470
+ false
471
+ end
472
+ end
473
+
463
474
  # Adds source files to the target.
464
475
  #
465
476
  # @param [Array<PBXFileReference>] file_references
@@ -64,13 +64,18 @@ module Xcodeproj
64
64
  # @param [Xcodeproj::Project::Object::PBXAbstractTarget] test_target
65
65
  # The target to use for the 'Test' action
66
66
  #
67
- def configure_with_targets(runnable_target, test_target)
68
- build_action.add_entry BuildAction::Entry.new(runnable_target) if runnable_target
69
- build_action.add_entry BuildAction::Entry.new(test_target) if test_target
70
-
71
- test_action.add_testable TestAction::TestableReference.new(test_target) if test_target
72
- launch_action.buildable_product_runnable = BuildableProductRunnable.new(runnable_target, 0) if runnable_target
73
- profile_action.buildable_product_runnable = BuildableProductRunnable.new(runnable_target) if runnable_target
67
+ # @param [Boolean] launch_target
68
+ # Determines if the runnable_target is launchable.
69
+ #
70
+ def configure_with_targets(runnable_target, test_target, launch_target: false)
71
+ if runnable_target
72
+ add_build_target(runnable_target)
73
+ set_launch_target(runnable_target) if launch_target
74
+ end
75
+ if test_target
76
+ add_build_target(test_target, false) if test_target != runnable_target
77
+ add_test_target(test_target)
78
+ end
74
79
  end
75
80
 
76
81
  public
@@ -69,9 +69,7 @@ module Xcodeproj
69
69
  def absolute_path(workspace_dir_path)
70
70
  workspace_dir_path = workspace_dir_path.to_s
71
71
  case type
72
- when 'group'
73
- File.expand_path(File.join(workspace_dir_path, path))
74
- when 'container'
72
+ when 'group', 'container', 'self'
75
73
  File.expand_path(File.join(workspace_dir_path, path))
76
74
  when 'absolute'
77
75
  File.expand_path(path)
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.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-16 00:00:00.000000000 Z
11
+ date: 2018-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: atomos