37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# File 'lib/cocoapods-mtxx-bin/native/gen.rb', line 37
def install!
UI.title "Generating #{spec.name} in #{UI.path install_directory}" do
clean! if configuration.clean?
install_directory.mkpath
UI.message 'Creating stub application' do
create_app_project
end
UI.message 'Writing Podfile' do
podfile.defined_in_file.open('w') { |f| f << podfile.to_yaml }
end
installer = nil
UI.section 'Installing...' do
configuration.pod_config.with_changes(installation_root: install_directory, podfile: podfile,
lockfile: configuration.lockfile, sandbox: nil,
sandbox_root: install_directory + 'Pods',
podfile_path: podfile.defined_in_file,
silent: !configuration.pod_config.verbose?, verbose: false,
lockfile_path: nil) do
installer = ::Pod::Installer.new(configuration.pod_config.sandbox, podfile, configuration.lockfile)
installer.use_default_plugins = configuration.use_default_plugins
installer.install!
end
end
UI.section 'Performing post-installation steps' do
should_perform_post_install = if installer.respond_to?(:generated_aggregate_targets) !installer.generated_aggregate_targets.empty?
else
true
end
perform_post_install_steps(open_app_project, installer) if should_perform_post_install
end
print_post_install_message
installer
end
end
|