cocoapods-packager-bj 1.5.1 → 1.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf5dcc3095e560ef67bbb27a863dff548eabb28fd0aeda0338a61de93106185f
4
- data.tar.gz: f3060ebdc6f547bb643d9910f472cc04d90873dccda53b8668a04b23b6433552
3
+ metadata.gz: ca9a48165bcbc2e15651427790b34271a9e4a2cc0e4ea17d16aa6802a2a3278d
4
+ data.tar.gz: f9d5e7a98a52ba02567b9b833cc7d50fffa551adb9f0d79df5f9cfc21d1f23ff
5
5
  SHA512:
6
- metadata.gz: 3dedbf04c6b15325c4f670f1a9a97edc2305a114dc8b1a92bd7607f46e8ab36e011be24fc580d0c0b1554c5894d71379abb3b64e3b1966397f7a02b959e03b05
7
- data.tar.gz: fd1052a3c282a7d8e42808d22265a12c768c77c75bc5b0fdb397dd8716822fd4c763e44e8b23a5534e349ae05213befc7ba1050f9ba2b2e184ca76166c962015
6
+ metadata.gz: '08795f4162c27b51898adf95094f450fde09893f8f22e5c3f7b0c4565df0b88694488485c25d7c12fb45069db62c8b145b80f6fee60ca2d116ee71da528355f3'
7
+ data.tar.gz: b42bd769b036c19bfb2ad4bfaf0fa3a3c641f6e3978d091cd520f5b4b469c3ec3b271845e1d6fbf4de4fd346db898602838649fa95b74f1f93de59283309c742
data/README.md CHANGED
@@ -1,2 +1,39 @@
1
1
  # cocoapods_packager-bj
2
+
2
3
  Based on cocoapods-package, support build swift framework
4
+
5
+ ## usage
6
+
7
+ pod bjpackage yourRepo.podspec
8
+
9
+ ## argv
10
+
11
+ ['--force', 'Overwrite existing files.'],
12
+
13
+ ['--no-mangle', 'Do not mangle symbols of depedendant Pods.'],
14
+
15
+ ['--embedded', 'Generate embedded frameworks.'],
16
+
17
+ ['--library', 'Generate static libraries.'],
18
+
19
+ ['--dynamic', 'Generate dynamic framework.'],
20
+
21
+ ['--modules', 'Generate static swift framework use modules.'],
22
+
23
+ ['--local', 'Use local state rather than published versions.'],
24
+
25
+ ['--bundle-identifier', 'Bundle identifier for dynamic framework'],
26
+
27
+ ['--exclude-deps', 'Exclude symbols from dependencies.'],
28
+
29
+ ['--configuration', 'Build the specified configuration (e.g. Debug). Defaults to Release'],
30
+
31
+ ['--subspecs', 'Only include the given subspecs'],
32
+
33
+ ['--usetrunk', 'Use trunk to install project'],
34
+
35
+ ['--spec-sources=private,https://github.com/CocoaPods/Specs.git', 'The sources to pull dependent ' 'pods from (defaults to https://github.com/CocoaPods/Specs.git)']
36
+
37
+ ## normal usage
38
+
39
+ pod bjpackage yourRepo.podspec --embedded --no-mangle --exclude-deps --spec-sources=https://github.com/CocoaPods/Specs.git —verbose
@@ -306,7 +306,7 @@ MAP
306
306
  end
307
307
 
308
308
  def ios_architectures
309
- archs = %w(x86_64 i386 arm64 armv7 armv7s)
309
+ archs = %w(x86_64 arm64)
310
310
  vendored_libraries.each do |library|
311
311
  archs = `lipo -info #{library}`.split & archs
312
312
  end
@@ -380,7 +380,19 @@ MAP
380
380
 
381
381
  Dir.glob("#{modules_sim_sourceinfo_root}/**/*.swiftsourceinfo").
382
382
  each { |h| `ditto #{h} #{@fwk.swiftsourceinfo_path}/#{h.sub(modules_sim_sourceinfo_root, '')}` }
383
-
383
+
384
+ oc_headers_source_root = "#{@public_headers_root}/#{@spec.name}"
385
+ Dir.glob("#{oc_headers_source_root}/**/*.h").
386
+ each { |h| `ditto #{h} #{@fwk.headers_path}/#{h.sub(oc_headers_source_root, '')}` }
387
+
388
+ if Dir.glob("#{@fwk.swiftsourceinfo_path}/*").empty?
389
+ FileUtils.rm_rf("#{@fwk.swiftsourceinfo_path}")
390
+ end
391
+
392
+ if Dir.glob("#{@fwk.swiftmodule_path}/*").empty?
393
+ FileUtils.rm_rf("#{@fwk.swiftmodule_path}")
394
+ end
395
+
384
396
  end
385
397
 
386
398
  end
@@ -20,12 +20,18 @@ module Pod
20
20
  @spec.deployment_target(platform_name),
21
21
  @subspecs,
22
22
  @spec_sources,
23
- modules
23
+ modules,
24
+ @usetrunk
24
25
  )
25
-
26
+
26
27
  static_installer = Installer.new(sandbox, podfile)
27
28
  static_installer.install!
28
-
29
+ spec_targets = static_installer.pod_targets.select do |target|
30
+ target.name == @spec.name
31
+ end
32
+ static_target = spec_targets[0]
33
+ source_dir = Dir.pwd
34
+ UI.puts("build project in directory #{source_dir}")
29
35
  unless static_installer.nil?
30
36
  static_installer.pods_project.targets.each do |target|
31
37
  target.build_configurations.each do |config|
@@ -38,11 +44,10 @@ module Pod
38
44
  end
39
45
  static_installer.pods_project.save
40
46
  end
41
-
42
47
  static_installer
43
48
  end
44
49
 
45
- def podfile_from_spec(path, spec_name, platform_name, deployment_target, subspecs, sources, modules)
50
+ def podfile_from_spec(path, spec_name, platform_name, deployment_target, subspecs, sources, modules, usetrunk)
46
51
  options = {}
47
52
  if path
48
53
  if @local
@@ -54,9 +59,12 @@ module Pod
54
59
  options[:subspecs] = subspecs if subspecs
55
60
  Pod::Podfile.new do
56
61
  if modules
57
- use_frameworks!
62
+ Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
63
+ use_frameworks!(:linkage => :static)
64
+ end
65
+ if !usetrunk
66
+ sources.each { |s| source s }
58
67
  end
59
- sources.each { |s| source s }
60
68
  platform(platform_name, deployment_target)
61
69
  pod(spec_name, options)
62
70
 
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  module BJPackager
3
- VERSION = '1.5.1'.freeze
3
+ VERSION = '1.5.3'.freeze
4
4
  end
5
5
  end
@@ -21,6 +21,7 @@ module Pod
21
21
  ['--exclude-deps', 'Exclude symbols from dependencies.'],
22
22
  ['--configuration', 'Build the specified configuration (e.g. Debug). Defaults to Release'],
23
23
  ['--subspecs', 'Only include the given subspecs'],
24
+ ['--usetrunk', 'Use trunk to install project'],
24
25
  ['--spec-sources=private,https://github.com/CocoaPods/Specs.git', 'The sources to pull dependent ' \
25
26
  'pods from (defaults to https://github.com/CocoaPods/Specs.git)']
26
27
  ]
@@ -49,6 +50,7 @@ module Pod
49
50
  @exclude_deps = argv.flag?('exclude-deps', false)
50
51
  @name = argv.shift_argument
51
52
  @source = argv.shift_argument
53
+ @usetrunk = argv.flag?('usetrunk')
52
54
  @spec_sources = argv.option('spec-sources', 'https://github.com/CocoaPods/Specs.git').split(',')
53
55
 
54
56
  subspecs = argv.option('subspecs')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-packager-bj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Fuller
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-03-22 00:00:00.000000000 Z
12
+ date: 2024-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cocoapods
@@ -68,7 +68,7 @@ files:
68
68
  - ".gitignore"
69
69
  - LICENSE
70
70
  - README.md
71
- - cocoapods_packager-bj.gemspec
71
+ - cocoapods-packager-bj.gemspec
72
72
  - lib/cocoapods-packager-bj/builder.rb
73
73
  - lib/cocoapods-packager-bj/framework.rb
74
74
  - lib/cocoapods-packager-bj/mangle.rb
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.0.3
101
+ rubygems_version: 3.5.3
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Based on cocoapods-packager code, support swift framework, generate a framework