Module: HMap::Target::Helper
Instance Method Summary
collapse
Methods included from HeaderType
#headers_hash, #private_entrys, #project_entrys, #public_entrys, #use_vfs?
Instance Method Details
#build_as_framework? ⇒ Boolean
#build_as_framework_swift? ⇒ Boolean
97
98
99
|
# File 'lib/hmap/xc/target/target_helper.rb', line 97
def build_as_framework_swift?
uses_swift? && build_as_framework?
end
|
#build_dir ⇒ Object
83
84
85
86
87
88
89
90
91
|
# File 'lib/hmap/xc/target/target_helper.rb', line 83
def build_dir
return @build_dir if defined?(@build_dir)
b_d = xcconfig_paths.any? do |path|
xc = XCConfig.new(path)
!xc.attributes[Constants::CONFIGURATION_BUILD_DIR].nil?
end
@build_dir = target_name if b_d
end
|
#build_root ⇒ Object
55
56
57
|
# File 'lib/hmap/xc/target/target_helper.rb', line 55
def build_root
project.build_root
end
|
#context ⇒ Object
114
115
116
117
118
119
120
121
122
123
124
|
# File 'lib/hmap/xc/target/target_helper.rb', line 114
def context
TargetContext.new(build_root,
temp_dir,
hmap_root,
temp_name,
build_dir,
product_name,
full_product_name,
defines_module?,
build_as_framework_swift?)
end
|
#defines_module? ⇒ Boolean
107
108
109
110
111
112
|
# File 'lib/hmap/xc/target/target_helper.rb', line 107
def defines_module?
return @defines_module if defined?(@defines_module)
return @defines_module = true if build_as_framework?
@defines_module = PBXHelper.defines_module?(target)
end
|
#full_product_name ⇒ Object
71
72
73
|
# File 'lib/hmap/xc/target/target_helper.rb', line 71
def full_product_name
target.product_reference.instance_variable_get('@simple_attributes_hash')['path'] || ''
end
|
#hmap_root ⇒ Object
59
60
61
|
# File 'lib/hmap/xc/target/target_helper.rb', line 59
def hmap_root
project.hmap_root
end
|
#product_name ⇒ Object
67
68
69
|
# File 'lib/hmap/xc/target/target_helper.rb', line 67
def product_name
target.product_name.gsub(/[-]/, '_')
end
|
#target_name ⇒ Object
63
64
65
|
# File 'lib/hmap/xc/target/target_helper.rb', line 63
def target_name
target.name
end
|
#temp_dir ⇒ Object
79
80
81
|
# File 'lib/hmap/xc/target/target_helper.rb', line 79
def temp_dir
project.temp_dir
end
|
#temp_name ⇒ Object
75
76
77
|
# File 'lib/hmap/xc/target/target_helper.rb', line 75
def temp_name
"#{target_name}.build"
end
|
#uses_swift? ⇒ Boolean
101
102
103
104
105
|
# File 'lib/hmap/xc/target/target_helper.rb', line 101
def uses_swift?
return @uses_swift if defined?(@uses_swift)
@uses_swift = PBXHelper.uses_swift?(target)
end
|