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
84
85
86
|
# File 'lib/hmap/xc/target/target_helper.rb', line 84
def build_as_framework_swift?
uses_swift? && build_as_framework?
end
|
#build_dir ⇒ Object
70
71
72
73
74
75
76
77
78
|
# File 'lib/hmap/xc/target/target_helper.rb', line 70
def build_dir
return @build_dir if defined?(@build_dir)
b_d = xcconfig_paths.any? do |path|
xc = Xcodeproj::Config.new(path)
!xc.attributes[Constants::CONFIGURATION_BUILD_DIR].nil?
end
@build_dir = target_name if b_d
end
|
#build_root ⇒ Object
42
43
44
|
# File 'lib/hmap/xc/target/target_helper.rb', line 42
def build_root
project.build_root
end
|
#context ⇒ Object
101
102
103
104
105
106
107
108
109
110
111
|
# File 'lib/hmap/xc/target/target_helper.rb', line 101
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
94
95
96
97
98
99
|
# File 'lib/hmap/xc/target/target_helper.rb', line 94
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
58
59
60
|
# File 'lib/hmap/xc/target/target_helper.rb', line 58
def full_product_name
target.product_reference.instance_variable_get('@simple_attributes_hash')['path'] || ''
end
|
#hmap_root ⇒ Object
46
47
48
|
# File 'lib/hmap/xc/target/target_helper.rb', line 46
def hmap_root
project.hmap_root
end
|
#product_name ⇒ Object
54
55
56
|
# File 'lib/hmap/xc/target/target_helper.rb', line 54
def product_name
target.product_name
end
|
#target_name ⇒ Object
50
51
52
|
# File 'lib/hmap/xc/target/target_helper.rb', line 50
def target_name
target.name
end
|
#temp_dir ⇒ Object
66
67
68
|
# File 'lib/hmap/xc/target/target_helper.rb', line 66
def temp_dir
project.temp_dir
end
|
#temp_name ⇒ Object
62
63
64
|
# File 'lib/hmap/xc/target/target_helper.rb', line 62
def temp_name
"#{target_name}.build"
end
|
#uses_swift? ⇒ Boolean
88
89
90
91
92
|
# File 'lib/hmap/xc/target/target_helper.rb', line 88
def uses_swift?
return @uses_swift if defined?(@uses_swift)
@uses_swift = PBXHelper.uses_swift?(target)
end
|