cocoapods-rome 0.8.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +40 -39
- data/README.md +68 -0
- data/lib/cocoapods-rome/gem_version.rb +1 -1
- data/lib/cocoapods-rome/post_install.rb +48 -15
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 311a92d3767d97104b9f5b68d8fec1f778270ae1
|
4
|
+
data.tar.gz: '0888b5c3242fdf62303f654d41f3987105d2dd35'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f466d6e2a5d277af6d6e14bf891452f32025012e4e212bbccb4ab2f51089a98e2fbc1ce3abef3ee8741b843cb701cdb838849df58d337f0df6fb2a14534ad226
|
7
|
+
data.tar.gz: 258d314b5de0cfd1960558d609e77384ebb3eac0515dd4dbeb2d8f8a5d6b6240669594f5bbb14089221aa0fe2e41e6a4f840b4f1474423202b32c2d821d26efc
|
data/Gemfile.lock
CHANGED
@@ -1,78 +1,79 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cocoapods-rome (0.
|
4
|
+
cocoapods-rome (1.0.0)
|
5
5
|
cocoapods (>= 1.1.0, < 2.0)
|
6
6
|
fourflusher (~> 2.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
CFPropertyList (
|
12
|
-
activesupport (4.2.
|
11
|
+
CFPropertyList (3.0.0)
|
12
|
+
activesupport (4.2.10)
|
13
13
|
i18n (~> 0.7)
|
14
|
-
json (~> 1.7, >= 1.7.7)
|
15
14
|
minitest (~> 5.1)
|
16
15
|
thread_safe (~> 0.3, >= 0.3.4)
|
17
16
|
tzinfo (~> 1.1)
|
17
|
+
atomos (0.1.2)
|
18
18
|
bacon (1.2.0)
|
19
|
-
claide (1.0.
|
20
|
-
cocoapods (1.
|
19
|
+
claide (1.0.2)
|
20
|
+
cocoapods (1.5.0)
|
21
21
|
activesupport (>= 4.0.2, < 5)
|
22
|
-
claide (>= 1.0.
|
23
|
-
cocoapods-core (= 1.
|
24
|
-
cocoapods-deintegrate (>= 1.0.
|
25
|
-
cocoapods-downloader (>= 1.
|
22
|
+
claide (>= 1.0.2, < 2.0)
|
23
|
+
cocoapods-core (= 1.5.0)
|
24
|
+
cocoapods-deintegrate (>= 1.0.2, < 2.0)
|
25
|
+
cocoapods-downloader (>= 1.2.0, < 2.0)
|
26
26
|
cocoapods-plugins (>= 1.0.0, < 2.0)
|
27
27
|
cocoapods-search (>= 1.0.0, < 2.0)
|
28
28
|
cocoapods-stats (>= 1.0.0, < 2.0)
|
29
|
-
cocoapods-trunk (>= 1.
|
29
|
+
cocoapods-trunk (>= 1.3.0, < 2.0)
|
30
30
|
cocoapods-try (>= 1.1.0, < 2.0)
|
31
|
-
|
31
|
+
colored2 (~> 3.1)
|
32
32
|
escape (~> 0.0.4)
|
33
33
|
fourflusher (~> 2.0.1)
|
34
34
|
gh_inspector (~> 1.0)
|
35
|
-
molinillo (~> 0.
|
35
|
+
molinillo (~> 0.6.5)
|
36
36
|
nap (~> 1.0)
|
37
|
-
ruby-macho (~>
|
38
|
-
xcodeproj (>= 1.
|
39
|
-
cocoapods-core (1.
|
40
|
-
activesupport (>= 4.0.2, <
|
37
|
+
ruby-macho (~> 1.1)
|
38
|
+
xcodeproj (>= 1.5.7, < 2.0)
|
39
|
+
cocoapods-core (1.5.0)
|
40
|
+
activesupport (>= 4.0.2, < 6)
|
41
41
|
fuzzy_match (~> 2.0.4)
|
42
42
|
nap (~> 1.0)
|
43
|
-
cocoapods-deintegrate (1.0.
|
44
|
-
cocoapods-downloader (1.
|
43
|
+
cocoapods-deintegrate (1.0.2)
|
44
|
+
cocoapods-downloader (1.2.0)
|
45
45
|
cocoapods-plugins (1.0.0)
|
46
46
|
nap
|
47
47
|
cocoapods-search (1.0.0)
|
48
48
|
cocoapods-stats (1.0.0)
|
49
|
-
cocoapods-trunk (1.
|
49
|
+
cocoapods-trunk (1.3.0)
|
50
50
|
nap (>= 0.8, < 2.0)
|
51
|
-
netrc (
|
51
|
+
netrc (~> 0.11)
|
52
52
|
cocoapods-try (1.1.0)
|
53
|
-
|
53
|
+
colored2 (3.1.2)
|
54
|
+
concurrent-ruby (1.0.5)
|
54
55
|
escape (0.0.4)
|
55
56
|
fourflusher (2.0.1)
|
56
57
|
fuzzy_match (2.0.4)
|
57
|
-
gh_inspector (1.
|
58
|
-
i18n (0.
|
59
|
-
|
60
|
-
minitest (5.
|
61
|
-
molinillo (0.
|
62
|
-
nanaimo (0.2.
|
58
|
+
gh_inspector (1.1.3)
|
59
|
+
i18n (0.9.5)
|
60
|
+
concurrent-ruby (~> 1.0)
|
61
|
+
minitest (5.11.3)
|
62
|
+
molinillo (0.6.5)
|
63
|
+
nanaimo (0.2.5)
|
63
64
|
nap (1.1.0)
|
64
|
-
netrc (0.
|
65
|
+
netrc (0.11.0)
|
65
66
|
rake (11.2.2)
|
66
|
-
ruby-macho (
|
67
|
-
thread_safe (0.3.
|
68
|
-
tzinfo (1.2.
|
67
|
+
ruby-macho (1.1.0)
|
68
|
+
thread_safe (0.3.6)
|
69
|
+
tzinfo (1.2.5)
|
69
70
|
thread_safe (~> 0.1)
|
70
|
-
xcodeproj (1.
|
71
|
-
CFPropertyList (
|
72
|
-
|
73
|
-
claide (>= 1.0.
|
74
|
-
|
75
|
-
nanaimo (~> 0.2.
|
71
|
+
xcodeproj (1.5.7)
|
72
|
+
CFPropertyList (>= 2.3.3, < 4.0)
|
73
|
+
atomos (~> 0.1.2)
|
74
|
+
claide (>= 1.0.2, < 2.0)
|
75
|
+
colored2 (~> 3.1)
|
76
|
+
nanaimo (~> 0.2.4)
|
76
77
|
|
77
78
|
PLATFORMS
|
78
79
|
ruby
|
@@ -84,4 +85,4 @@ DEPENDENCIES
|
|
84
85
|
rake
|
85
86
|
|
86
87
|
BUNDLED WITH
|
87
|
-
1.
|
88
|
+
1.15.4
|
data/README.md
CHANGED
@@ -38,3 +38,71 @@ $ tree Rome/
|
|
38
38
|
Rome/
|
39
39
|
└── Alamofire.framework
|
40
40
|
```
|
41
|
+
|
42
|
+
For your production builds, when you want dSYMs created and stored:
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
platform :osx, '10.10'
|
46
|
+
|
47
|
+
plugin 'cocoapods-rome', {
|
48
|
+
dsym: true,
|
49
|
+
configuration: 'Release'
|
50
|
+
}
|
51
|
+
|
52
|
+
target 'caesar' do
|
53
|
+
pod 'Alamofire'
|
54
|
+
end
|
55
|
+
```
|
56
|
+
|
57
|
+
Resulting in:
|
58
|
+
|
59
|
+
```
|
60
|
+
$ tree dSYM/
|
61
|
+
dSYM/
|
62
|
+
├── iphoneos
|
63
|
+
│ └── Alamofire.framework.dSYM
|
64
|
+
│ └── Contents
|
65
|
+
│ ├── Info.plist
|
66
|
+
│ └── Resources
|
67
|
+
│ └── DWARF
|
68
|
+
│ └── Alamofire
|
69
|
+
└── iphonesimulator
|
70
|
+
└── Alamofire.framework.dSYM
|
71
|
+
└── Contents
|
72
|
+
├── Info.plist
|
73
|
+
└── Resources
|
74
|
+
└── DWARF
|
75
|
+
└── Alamofire
|
76
|
+
```
|
77
|
+
|
78
|
+
## Hooks
|
79
|
+
|
80
|
+
The plugin allows you to provides hooks that will be called during the installation process.
|
81
|
+
|
82
|
+
### `pre_compile`
|
83
|
+
|
84
|
+
This hook allows you to make any last changes to the generated Xcode project before the compilation of frameworks begins.
|
85
|
+
|
86
|
+
It receives the `Pod::Installer` as its only argument.
|
87
|
+
|
88
|
+
#### Example
|
89
|
+
|
90
|
+
Customising the Swift version of all pods
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
platform :osx, '10.10'
|
94
|
+
|
95
|
+
plugin 'cocoapods-rome', :pre_compile => Proc.new { |installer|
|
96
|
+
installer.pods_project.targets.each do |target|
|
97
|
+
target.build_configurations.each do |config|
|
98
|
+
config.build_settings['SWIFT_VERSION'] = '4.0'
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
installer.pods_project.save
|
103
|
+
}
|
104
|
+
|
105
|
+
target 'caesar' do
|
106
|
+
pod 'Alamofire'
|
107
|
+
end
|
108
|
+
```
|
@@ -1,47 +1,77 @@
|
|
1
1
|
require 'fourflusher'
|
2
2
|
|
3
|
-
CONFIGURATION = "Release"
|
4
3
|
PLATFORMS = { 'iphonesimulator' => 'iOS',
|
5
4
|
'appletvsimulator' => 'tvOS',
|
6
5
|
'watchsimulator' => 'watchOS' }
|
7
6
|
|
8
|
-
def build_for_iosish_platform(sandbox, build_dir, target, device, simulator)
|
7
|
+
def build_for_iosish_platform(sandbox, build_dir, target, device, simulator, configuration)
|
9
8
|
deployment_target = target.platform_deployment_target
|
10
9
|
target_label = target.cocoapods_target_label
|
11
10
|
|
12
|
-
xcodebuild(sandbox, target_label, device, deployment_target)
|
13
|
-
xcodebuild(sandbox, target_label, simulator, deployment_target)
|
11
|
+
xcodebuild(sandbox, target_label, device, deployment_target, configuration)
|
12
|
+
xcodebuild(sandbox, target_label, simulator, deployment_target, configuration)
|
14
13
|
|
15
14
|
spec_names = target.specs.map { |spec| [spec.root.name, spec.root.module_name] }.uniq
|
16
15
|
spec_names.each do |root_name, module_name|
|
17
16
|
executable_path = "#{build_dir}/#{root_name}"
|
18
|
-
device_lib = "#{build_dir}/#{
|
17
|
+
device_lib = "#{build_dir}/#{configuration}-#{device}/#{root_name}/#{module_name}.framework/#{module_name}"
|
19
18
|
device_framework_lib = File.dirname(device_lib)
|
20
|
-
simulator_lib = "#{build_dir}/#{
|
19
|
+
simulator_lib = "#{build_dir}/#{configuration}-#{simulator}/#{root_name}/#{module_name}.framework/#{module_name}"
|
21
20
|
|
22
21
|
next unless File.file?(device_lib) && File.file?(simulator_lib)
|
23
22
|
|
24
23
|
lipo_log = `lipo -create -output #{executable_path} #{device_lib} #{simulator_lib}`
|
25
24
|
puts lipo_log unless File.exist?(executable_path)
|
26
25
|
|
27
|
-
FileUtils.mv executable_path, device_lib
|
28
|
-
FileUtils.mv device_framework_lib, build_dir
|
26
|
+
FileUtils.mv executable_path, device_lib, :force => true
|
27
|
+
FileUtils.mv device_framework_lib, build_dir, :force => true
|
29
28
|
FileUtils.rm simulator_lib if File.file?(simulator_lib)
|
30
29
|
FileUtils.rm device_lib if File.file?(device_lib)
|
31
30
|
end
|
32
31
|
end
|
33
32
|
|
34
|
-
def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil)
|
35
|
-
args = %W(-project #{sandbox.project_path.realdirpath} -scheme #{target} -configuration #{
|
33
|
+
def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, configuration)
|
34
|
+
args = %W(-project #{sandbox.project_path.realdirpath} -scheme #{target} -configuration #{configuration} -sdk #{sdk})
|
36
35
|
platform = PLATFORMS[sdk]
|
37
36
|
args += Fourflusher::SimControl.new.destination(:oldest, platform, deployment_target) unless platform.nil?
|
38
37
|
Pod::Executable.execute_command 'xcodebuild', args, true
|
39
38
|
end
|
40
39
|
|
41
|
-
|
40
|
+
def enable_debug_information(project_path, configuration)
|
41
|
+
project = Xcodeproj::Project.open(project_path)
|
42
|
+
project.targets.each do |target|
|
43
|
+
config = target.build_configurations.find { |config| config.name.eql? configuration }
|
44
|
+
config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf-with-dsym'
|
45
|
+
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
|
46
|
+
end
|
47
|
+
project.save
|
48
|
+
end
|
49
|
+
|
50
|
+
def copy_dsym_files(dsym_destination, configuration)
|
51
|
+
dsym_destination.rmtree if dsym_destination.directory?
|
52
|
+
platforms = ['iphoneos', 'iphonesimulator']
|
53
|
+
platforms.each do |platform|
|
54
|
+
dsym = Pathname.glob("build/#{configuration}-#{platform}/**/*.dSYM")
|
55
|
+
dsym.each do |dsym|
|
56
|
+
destination = dsym_destination + platform
|
57
|
+
FileUtils.mkdir_p destination
|
58
|
+
FileUtils.cp_r dsym, destination, :remove_destination => true
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
Pod::HooksManager.register('cocoapods-rome', :post_install) do |installer_context, user_options|
|
64
|
+
enable_dsym = user_options.fetch('dsym', true)
|
65
|
+
configuration = user_options.fetch('configuration', true)
|
66
|
+
if user_options["pre_compile"]
|
67
|
+
user_options["pre_compile"].call(installer_context)
|
68
|
+
end
|
69
|
+
|
42
70
|
sandbox_root = Pathname(installer_context.sandbox_root)
|
43
71
|
sandbox = Pod::Sandbox.new(sandbox_root)
|
44
72
|
|
73
|
+
enable_debug_information(sandbox.project_path, configuration) if enable_dsym
|
74
|
+
|
45
75
|
build_dir = sandbox_root.parent + 'build'
|
46
76
|
destination = sandbox_root.parent + 'Rome'
|
47
77
|
|
@@ -51,10 +81,10 @@ Pod::HooksManager.register('cocoapods-rome', :post_install) do |installer_contex
|
|
51
81
|
targets = installer_context.umbrella_targets.select { |t| t.specs.any? }
|
52
82
|
targets.each do |target|
|
53
83
|
case target.platform_name
|
54
|
-
when :ios then build_for_iosish_platform(sandbox, build_dir, target, 'iphoneos', 'iphonesimulator')
|
55
|
-
when :osx then xcodebuild(sandbox, target.cocoapods_target_label)
|
56
|
-
when :tvos then build_for_iosish_platform(sandbox, build_dir, target, 'appletvos', 'appletvsimulator')
|
57
|
-
when :watchos then build_for_iosish_platform(sandbox, build_dir, target, 'watchos', 'watchsimulator')
|
84
|
+
when :ios then build_for_iosish_platform(sandbox, build_dir, target, 'iphoneos', 'iphonesimulator', configuration)
|
85
|
+
when :osx then xcodebuild(sandbox, target.cocoapods_target_label, configuration)
|
86
|
+
when :tvos then build_for_iosish_platform(sandbox, build_dir, target, 'appletvos', 'appletvsimulator', configuration)
|
87
|
+
when :watchos then build_for_iosish_platform(sandbox, build_dir, target, 'watchos', 'watchsimulator', configuration)
|
58
88
|
else raise "Unknown platform '#{target.platform_name}'" end
|
59
89
|
end
|
60
90
|
|
@@ -85,5 +115,8 @@ Pod::HooksManager.register('cocoapods-rome', :post_install) do |installer_contex
|
|
85
115
|
FileUtils.mkdir_p destination
|
86
116
|
FileUtils.cp_r framework, destination, :remove_destination => true
|
87
117
|
end
|
118
|
+
|
119
|
+
copy_dsym_files(sandbox_root.parent + 'dSYM', configuration) if enable_dsym
|
120
|
+
|
88
121
|
build_dir.rmtree if build_dir.directory?
|
89
122
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-rome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Bügling
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|
@@ -113,11 +113,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.2.2
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: Rome makes it easy to build a list of frameworks for consumption outside
|
120
120
|
of Xcode
|
121
121
|
test_files:
|
122
122
|
- spec/spec_helper.rb
|
123
|
-
has_rdoc:
|