cocoapods-packager-ext 0.0.7 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4bad259dc0746ae906431514b2126827e20dc5200189579fa12915fca3bf108
4
- data.tar.gz: a4561a6da30021012b4041fdb7db3af01b37851c052d734ffc0d9916ef895508
3
+ metadata.gz: 58db525ae0b5173a6d29fc3bf52b373acc3c5464c8ec73f825edcef0842e490a
4
+ data.tar.gz: e3d0f10f47f07e579582c6188146f8eb3d92def26a61c81ffa1888e4f845c9cb
5
5
  SHA512:
6
- metadata.gz: 9df54ee2110513b071651c90fb158e569cd8e844f7372ebd9d367e9fcc9eeb72926750cd7697e6f5db2e5366021e6dced8bd941056c27f808b082704b07cc8ea
7
- data.tar.gz: 9dd8d0adef67e41ec63e7cbcc080e829d2f9ee3592f7a84e94d55eb0d6e21bb90aa8f07e0ccb21f7c198a01b07c05c107192e3adb22a652f330929eacfbe394d
6
+ metadata.gz: 00033ee3fbecaa3740e902a60482e5669368c92ae7e4d08845a4f20d39ff615428a0b4846bb0f61d1bdcfc99db0c6dcff5e816a6a7e67eaf44d0295fc266e9ac
7
+ data.tar.gz: 1d3b69017ead90b8cb023f62c28227a9ddc25480ef1db48809f1e6a872fd62f6a3e4c065bfec54270b9b85888a5a49424e088d9a777f0a93f16c17a373692ed5
@@ -1 +1,2 @@
1
- require 'cocoapods-packager-ext/command/ext'
1
+ require 'cocoapods-packager-ext/command/install_ext'
2
+ require 'cocoapods-packager-ext/command/package_ext'
@@ -0,0 +1,91 @@
1
+ module Pod
2
+ class Installer
3
+ attr_accessor :dry_deps
4
+ alias install_t! install!
5
+ def install!()
6
+ if @dry_deps
7
+ prepare
8
+ resolve_dependencies
9
+ else
10
+ install_t!
11
+ end
12
+ end
13
+
14
+ end
15
+
16
+ class Command
17
+
18
+ # This is an example of a cocoapods plugin adding a top-level subcommand
19
+ # to the 'pod' command.
20
+ #
21
+ # You can also create subcommands of existing or new commands. Say you
22
+ # wanted to add a subcommand to `list` to show newly deprecated pods,
23
+ # (e.g. `pod list deprecated`), there are a few things that would need
24
+ # to change.
25
+ #
26
+ # - move this file to `lib/pod/command/list/deprecated.rb` and update
27
+ # the class to exist in the the Pod::Command::List namespace
28
+ # - change this class to extend from `List` instead of `Command`. This
29
+ # tells the plugin system that it is a subcommand of `list`.
30
+ # - edit `lib/cocoapods_plugins.rb` to require this file
31
+ #
32
+ # @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
33
+ # in the `plugins.json` file, once your plugin is released.
34
+ #
35
+ class Install
36
+ def self.options
37
+ [
38
+ ['--repo-update', 'Force running `pod repo update` before install'],
39
+ ['--deployment', 'Disallow any changes to the Podfile or the Podfile.lock during installation'],
40
+ ['--clean-install', 'Ignore the contents of the project cache and force a full pod installation. This only ' \
41
+ 'applies to projects that have enabled incremental installation'],
42
+ ['--dry-deps','only test depend'],
43
+ ].concat(super).reject { |(name, _)| name == '--no-repo-update' }
44
+ end
45
+ # class << self
46
+ # alias options_t options
47
+ # def options
48
+ # o = options_t
49
+ # o.push(['--dry-deps','only test depend'])
50
+ # o.concat(super)
51
+ # end
52
+ #
53
+ # end
54
+ def initialize(argv)
55
+ super
56
+ @deployment = argv.flag?('deployment', false)
57
+ @clean_install = argv.flag?('clean-install', false)
58
+ @dry_deps = argv.flag?('dry-deps',false)
59
+ end
60
+
61
+ # alias run_t run
62
+ # def run
63
+ # if @dry_deps
64
+ # verify_podfile_exists!
65
+ # installer = installer_for_config
66
+ # installer.repo_update = repo_update?(:default => false)
67
+ # installer.update = false
68
+ # installer.deployment = @deployment
69
+ # installer.clean_install = @clean_install
70
+ # installer.dry_deps = @dry_deps
71
+ # installer.install!
72
+ # else
73
+ # run_t
74
+ # end
75
+ # end
76
+ def run
77
+ verify_podfile_exists!
78
+ installer = installer_for_config
79
+ installer.repo_update = repo_update?(:default => false)
80
+ installer.update = false
81
+ installer.deployment = @deployment
82
+ installer.clean_install = @clean_install
83
+ if @dry_deps
84
+ installer.dry_deps = @dry_deps
85
+ end
86
+ installer.install!
87
+ end
88
+
89
+ end
90
+ end
91
+ end
@@ -1,3 +1,5 @@
1
+ require 'cocoapods-packager-ext/ext/downloader/path'
2
+ require 'cocoapods-packager-ext/ext/downloader_ext'
1
3
  module Pod
2
4
  class Command
3
5
  # This is an example of a cocoapods plugin adding a top-level subcommand
@@ -25,7 +27,7 @@ module Pod
25
27
  o.push(['--all-deps','add all-depends'])
26
28
  o.push(['--archs','select archs'])
27
29
  o.push(['--black-deps','select exclude deps'])
28
-
30
+ o.concat(super)
29
31
  end
30
32
 
31
33
  end
@@ -15,12 +15,16 @@ module Pod
15
15
  if isBlack
16
16
  return
17
17
  end
18
+ begin
18
19
  if File.directory? path
19
20
  FileUtils.copy_entry(path,"#{@target_dir_ext_ext}/#{File.basename(path)}", false,false, true)
20
21
  else
21
22
  FileUtils.cp(path,"#{@target_dir_ext_ext}/#{File.basename(path)}")
22
- end
23
- return
23
+ end
24
+ rescue Exception => e
25
+ puts e
26
+ end
27
+ return
24
28
  end
25
29
  end
26
30
  if File.directory? path
@@ -75,6 +79,15 @@ module Pod
75
79
  if @all_deps
76
80
  return if static_libs.count == 0
77
81
  sim_libs = static_libs_in_sandbox('build-sim')
82
+ for item in @black_deps
83
+ static_libs.delete_if do |obj|
84
+ obj.include? item
85
+ end
86
+ sim_libs.delete_if do |obj|
87
+ obj.include? item
88
+ end
89
+ end
90
+ UI.puts "links statics:#{static_libs.join(' ')}, sim_libs:#{sim_libs.join(' ')}"
78
91
  `xcrun -r libtool -no_warning_for_no_symbols -static -o #{output} #{static_libs.join(' ')} #{sim_libs.join(' ')}`
79
92
  else
80
93
  build_static_lib_for_ios static_libs,_defines,output
@@ -0,0 +1,19 @@
1
+ require 'cocoapods-downloader/remote_file'
2
+
3
+ module Pod
4
+ module Downloader
5
+ class LocalPath < RemoteFile
6
+ DEFAULT_PORT = 22
7
+
8
+ private
9
+
10
+ executable :ln
11
+
12
+ def download_file(full_filename)
13
+
14
+ # ln! "-s",url, full_filename
15
+ end
16
+
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,38 @@
1
+ module Pod
2
+ module Downloader
3
+ autoload :LocalPath,'cocoapods-packager-ext/ext/downloader/path'
4
+ class << self
5
+ alias downloader_class_by_key_t downloader_class_by_key
6
+ def downloader_class_by_key
7
+ keys = downloader_class_by_key_t
8
+ keys[:path] = LocalPath
9
+ return keys
10
+ end
11
+ end
12
+ class RemoteFile
13
+ executable :ln
14
+
15
+ alias filename_with_type_t filename_with_type
16
+ def filename_with_type(type = :zip)
17
+ if not type
18
+ "file"
19
+ else
20
+ filename_with_type_t type
21
+ end
22
+ end
23
+ alias extract_with_type_t extract_with_type
24
+ def extract_with_type(full_filename, type = :zip)
25
+ if not type
26
+ unpack_from = url
27
+ unpack_to = @target_path
28
+ FileUtils.rm_rf(unpack_to) if File.exist?(unpack_to)
29
+ FileUtils.rm_rf(unpack_to) if Dir.exist?(unpack_to)
30
+ ln! '-s',unpack_from,unpack_to
31
+ else
32
+ extract_with_type_t full_filename,type
33
+ end
34
+
35
+ end
36
+ end
37
+ end
38
+ end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPackagerExt
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.12"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-packager-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyle.zhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-19 00:00:00.000000000 Z
11
+ date: 2021-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -67,8 +67,11 @@ files:
67
67
  - cocoapods-packager-ext.gemspec
68
68
  - lib/cocoapods-packager-ext.rb
69
69
  - lib/cocoapods-packager-ext/command.rb
70
- - lib/cocoapods-packager-ext/command/ext.rb
70
+ - lib/cocoapods-packager-ext/command/install_ext.rb
71
+ - lib/cocoapods-packager-ext/command/package_ext.rb
71
72
  - lib/cocoapods-packager-ext/ext/builder.rb
73
+ - lib/cocoapods-packager-ext/ext/downloader/path.rb
74
+ - lib/cocoapods-packager-ext/ext/downloader_ext.rb
72
75
  - lib/cocoapods-packager-ext/gem_version.rb
73
76
  - lib/cocoapods_plugin.rb
74
77
  - spec/command/ext_spec.rb