xcake 0.8.9 → 0.8.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xcake/constants.rb +19 -1
- data/lib/xcake/dsl/build_phase/copy_files_build_phase.rb +16 -2
- data/lib/xcake/dsl/project/sugar.rb +9 -6
- data/lib/xcake/generator/default_project_structure_generator.rb +5 -0
- data/lib/xcake/generator/target_file_reference_generator.rb +12 -4
- data/lib/xcake/version.rb +1 -1
- data/lib/xcake/xcode/project.rb +8 -0
- data/xcake.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6858ef15a3027664fd7f953f91e79482b66d26a5
|
4
|
+
data.tar.gz: 67a4a8498f51c731b32011ae958f648e09294b22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17081626ee2a49b2da92c8de2699a65968c5d466809e16a82c8fd341b0ecec808e759f35af1674d4e91e4a4d157653dc0ad4bd71c77c7d590b1c0e87dba58698
|
7
|
+
data.tar.gz: 63bbf69191aa88a4cbb6c7f05901ee62a07e746bf265726ddc4da41b4377f50af0d0a7f0352dca1a8a765f2a1cb0c8afb1db2ce330c4fbde537a91185d041891
|
data/lib/xcake/constants.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
require 'active_support/core_ext/hash/deep_merge'
|
2
|
+
|
1
3
|
module Xcake
|
2
4
|
module Constants
|
3
|
-
COMMON_BUILD_SETTINGS = Xcodeproj::Constants::COMMON_BUILD_SETTINGS.deep_merge(
|
5
|
+
COMMON_BUILD_SETTINGS = Xcodeproj::Constants::COMMON_BUILD_SETTINGS.dup.deep_merge(
|
4
6
|
[:ios, :unit_test_bundle] => {
|
5
7
|
'LD_RUNPATH_SEARCH_PATHS' => [
|
6
8
|
'$(inherited)',
|
@@ -8,17 +10,33 @@ module Xcake
|
|
8
10
|
'@loader_path/Frameworks'
|
9
11
|
]
|
10
12
|
}.freeze,
|
13
|
+
[:ios, :ui_test_bundle] => {
|
14
|
+
"LD_RUNPATH_SEARCH_PATHS" => [
|
15
|
+
"$(inherited)",
|
16
|
+
"@executable_path/Frameworks",
|
17
|
+
"@loader_path/Frameworks"
|
18
|
+
]
|
19
|
+
}.freeze,
|
11
20
|
[:osx, :unit_test_bundle] => {
|
12
21
|
'LD_RUNPATH_SEARCH_PATHS' => [
|
13
22
|
'$(inherited)',
|
14
23
|
'@executable_path/../Frameworks',
|
15
24
|
'@loader_path/../Frameworks'
|
16
25
|
]
|
26
|
+
}.freeze,
|
27
|
+
[:osx, :ui_test_bundle] => {
|
28
|
+
"LD_RUNPATH_SEARCH_PATHS" => [
|
29
|
+
"$(inherited)",
|
30
|
+
"@executable_path/../Frameworks",
|
31
|
+
"@loader_path/../Frameworks"
|
32
|
+
]
|
17
33
|
}.freeze
|
18
34
|
).freeze
|
19
35
|
|
20
36
|
PRODUCT_TYPE_UTI = Xcodeproj::Constants::PRODUCT_TYPE_UTI
|
21
37
|
|
38
|
+
COPY_FILES_BUILD_PHASE_DESTINATIONS = Xcodeproj::Constants::COPY_FILES_BUILD_PHASE_DESTINATIONS
|
39
|
+
|
22
40
|
# Returns the common build settings for a given platform and configuration
|
23
41
|
# name.
|
24
42
|
#
|
@@ -8,16 +8,30 @@ module Xcake
|
|
8
8
|
# The name of files to copy
|
9
9
|
attr_accessor :files
|
10
10
|
|
11
|
+
# The destination
|
12
|
+
attr_accessor :destination
|
13
|
+
|
14
|
+
# The destination path
|
15
|
+
attr_accessor :destination_path
|
16
|
+
|
17
|
+
# Whether the files should be code signed on copy
|
18
|
+
attr_accessor :code_sign
|
19
|
+
|
11
20
|
def build_phase_type
|
12
21
|
Xcodeproj::Project::Object::PBXCopyFilesBuildPhase
|
13
22
|
end
|
14
23
|
|
15
|
-
def configure_native_build_phase(native_build_phase,
|
24
|
+
def configure_native_build_phase(native_build_phase, context)
|
16
25
|
native_build_phase.name = name
|
26
|
+
native_build_phase.dst_path = destination_path
|
27
|
+
native_build_phase.symbol_dst_subfolder_spec = destination
|
17
28
|
|
18
29
|
@files.each do |file|
|
19
30
|
file_reference = context.file_reference_for_path(file)
|
20
|
-
native_build_phase.add_file_reference(file_reference)
|
31
|
+
build_file = native_build_phase.add_file_reference(file_reference)
|
32
|
+
if code_sign
|
33
|
+
build_file.settings = { 'ATTRIBUTES' => ['CodeSignOnCopy'] }
|
34
|
+
end
|
21
35
|
end
|
22
36
|
end
|
23
37
|
|
@@ -97,13 +97,16 @@ module Xcake
|
|
97
97
|
|
98
98
|
if host_target.type == :application
|
99
99
|
test_target.all_configurations.each do |c|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
if host_target.platform == :osx
|
104
|
-
c.settings["TEST_HOST"] = "$(BUILT_PRODUCTS_DIR)/#{host_target.name}.app/Contents/MacOS/#{host_target.name}"
|
100
|
+
if test_target.type == :ui_test_bundle
|
101
|
+
# Do nothing as they break UITests
|
102
|
+
# For more details https://github.com/jcampbell05/xcake/issues/115
|
105
103
|
else
|
106
|
-
c.settings[
|
104
|
+
c.settings["BUNDLE_LOADER"] = "$(TEST_HOST)"
|
105
|
+
if host_target.platform == :osx
|
106
|
+
c.settings["TEST_HOST"] = "$(BUILT_PRODUCTS_DIR)/#{host_target.name}.app/Contents/MacOS/#{host_target.name}"
|
107
|
+
else
|
108
|
+
c.settings["TEST_HOST"] = "$(BUILT_PRODUCTS_DIR)/#{host_target.name}.app/#{host_target.name}"
|
109
|
+
end
|
107
110
|
end
|
108
111
|
end
|
109
112
|
end
|
@@ -16,6 +16,11 @@ module Xcake
|
|
16
16
|
def visit_project(project)
|
17
17
|
EventHooks.run_hook :before_resolving_project_structure, project
|
18
18
|
@project = project
|
19
|
+
|
20
|
+
# Make sure we always have a Release and Debug configuration as Xcode expects these
|
21
|
+
# and these fixes bugs that can happen.
|
22
|
+
@project.debug_configuration
|
23
|
+
@project.release_configuration
|
19
24
|
end
|
20
25
|
|
21
26
|
def leave_project(project)
|
@@ -13,13 +13,21 @@ module Xcake
|
|
13
13
|
[TargetGenerator]
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
## This method will return an array of files based on the passed regular Exp
|
17
|
+
## NOTE:- directories will not be included in the array
|
18
|
+
def get_cleaned_paths(reg_exp)
|
19
|
+
paths_without_directories = Dir.glob(reg_exp).reject do |f|
|
20
|
+
File.directory?(f)
|
19
21
|
end
|
20
|
-
|
22
|
+
paths = paths_without_directories.map do |f|
|
21
23
|
Pathname.new(f).cleanpath.to_s
|
22
24
|
end
|
25
|
+
paths
|
26
|
+
end
|
27
|
+
|
28
|
+
def visit_target(target)
|
29
|
+
paths_to_include = get_cleaned_paths(target.include_files)
|
30
|
+
paths_to_exclude = get_cleaned_paths(target.exclude_files)
|
23
31
|
|
24
32
|
paths = paths_to_include - paths_to_exclude
|
25
33
|
paths.each do |p|
|
data/lib/xcake/version.rb
CHANGED
data/lib/xcake/xcode/project.rb
CHANGED
@@ -49,6 +49,14 @@ module Xcake
|
|
49
49
|
Xcodeproj::Constants::DEFAULT_OBJECT_VERSION.to_s
|
50
50
|
end
|
51
51
|
|
52
|
+
def archive_version
|
53
|
+
Xcodeproj::Constants::LAST_KNOWN_ARCHIVE_VERSION.to_s
|
54
|
+
end
|
55
|
+
|
56
|
+
def classes
|
57
|
+
{}
|
58
|
+
end
|
59
|
+
|
52
60
|
# Configures the Project for use with Xcake.
|
53
61
|
# This makes sure we have sensible defaults and
|
54
62
|
# it as clean as possible.
|
data/xcake.gemspec
CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency 'cork'
|
26
26
|
spec.add_dependency 'hooks', '~> 0.4.1'
|
27
27
|
spec.add_dependency 'xcodeproj', '< 2.0.0', '>= 1.4.0'
|
28
|
+
spec.add_dependency 'deep_merge'
|
28
29
|
|
29
30
|
# Lock `activesupport` (transitive dependency via `xcodeproj`) to keep supporting system ruby
|
30
31
|
spec.add_dependency 'activesupport', '< 5'
|
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.8.
|
4
|
+
version: 0.8.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: claide
|
@@ -78,6 +78,20 @@ dependencies:
|
|
78
78
|
- - '>='
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: 1.4.0
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: deep_merge
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
type: :runtime
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
81
95
|
- !ruby/object:Gem::Dependency
|
82
96
|
name: activesupport
|
83
97
|
requirement: !ruby/object:Gem::Requirement
|