gonative-cli 1.3.2 → 1.3.4

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: 8ef02e059ff5c0717aac8097dbf445915dee082bebb01f985df2046206445cc3
4
- data.tar.gz: 41c6b9dc087274e8dc5cf56199a7760328a9d79396c7803453fc3394283f7774
3
+ metadata.gz: 94b317942c90bb00d730654df5b2b8dd2affcd57cd354fa10f8737f81c4850e4
4
+ data.tar.gz: 89df4858f9133fcf52eedea2a77cc92869ef1edd7be5477f069f2f8b26066ecf
5
5
  SHA512:
6
- metadata.gz: 605137fd3b2e8babfcb9cc5851e41df7f89d579bf95741e072afb23a098c2369618edef7c9e097736633f76b3e4fb9bc82180663381b47a9d76af1f7f573e5fe
7
- data.tar.gz: 43bc2301c2282ce32c93e9abb420f224196508e136394139a032b16952e55c11b8bca31d4f854c77e53499663095a300fb135e3d35ea3badb6142b3777ad5d6a
6
+ metadata.gz: 50c202324e6a27e916e16d2dd3764d2f99b52a0b3c69a5b8372e856bf200d7131484fe67eeb080d3b9ed326c7a9aeb9f9449570394c1cf8867344dcb9cb58bb2
7
+ data.tar.gz: e0deef3dac770b7f54ded9e3b958c4adcd2df198e9b05614a6d6f8ee2412f51166836ffa966482553a41556a5007d129a1aa04922d553a0cb2ace577f0dc69a2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (1.3.2)
4
+ gonative-cli (1.3.4)
5
5
  activesupport (~> 6.0)
6
6
  cocoapods (~> 1.10)
7
7
  colorize (~> 0.8.0)
@@ -29,12 +29,12 @@ GEM
29
29
  atomos (0.1.3)
30
30
  byebug (11.1.3)
31
31
  claide (1.1.0)
32
- cocoapods (1.13.0)
32
+ cocoapods (1.14.3)
33
33
  addressable (~> 2.8)
34
34
  claide (>= 1.0.2, < 2.0)
35
- cocoapods-core (= 1.13.0)
35
+ cocoapods-core (= 1.14.3)
36
36
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
37
- cocoapods-downloader (>= 1.6.0, < 2.0)
37
+ cocoapods-downloader (>= 2.1, < 3.0)
38
38
  cocoapods-plugins (>= 1.0.0, < 2.0)
39
39
  cocoapods-search (>= 1.0.0, < 2.0)
40
40
  cocoapods-trunk (>= 1.6.0, < 2.0)
@@ -47,7 +47,7 @@ GEM
47
47
  nap (~> 1.0)
48
48
  ruby-macho (>= 2.3.0, < 3.0)
49
49
  xcodeproj (>= 1.23.0, < 2.0)
50
- cocoapods-core (1.13.0)
50
+ cocoapods-core (1.14.3)
51
51
  activesupport (>= 5.0, < 8)
52
52
  addressable (~> 2.8)
53
53
  algoliasearch (~> 1.0)
@@ -58,7 +58,7 @@ GEM
58
58
  public_suffix (~> 4.0)
59
59
  typhoeus (~> 1.0)
60
60
  cocoapods-deintegrate (1.0.5)
61
- cocoapods-downloader (1.6.3)
61
+ cocoapods-downloader (2.1)
62
62
  cocoapods-plugins (1.0.0)
63
63
  nap
64
64
  cocoapods-search (1.0.1)
@@ -144,7 +144,7 @@ GEM
144
144
  colored2 (~> 3.1)
145
145
  nanaimo (~> 0.3.0)
146
146
  rexml (~> 3.2.4)
147
- zeitwerk (2.6.11)
147
+ zeitwerk (2.6.12)
148
148
 
149
149
  PLATFORMS
150
150
  arm64-darwin-21
@@ -8,11 +8,12 @@ module GoNative
8
8
  desc 'Verify, build and release a new version'
9
9
  option :skip_build, type: :boolean, default: false
10
10
  option :debug, type: :boolean, default: false
11
+ option :use_existing_build, type: :boolean, default: false
11
12
  option :archs, default: 'x86_64,arm64'
12
13
 
13
- def call(skip_build:, debug:, archs:, **)
14
+ def call(skip_build:, debug:, archs:, use_existing_build:, **)
14
15
  Plugins::IOS::Verify.call
15
- Plugins::IOS::BuildFramework.call(archs, debug) unless skip_build
16
+ Plugins::IOS::BuildFramework.call(archs, debug, use_existing_build) unless skip_build
16
17
  Plugins::IOS::Release.call
17
18
  end
18
19
  end
@@ -14,23 +14,26 @@ module GoNative
14
14
 
15
15
  BUILD_TEMPLATE_DIRECTORY_PATH = File.expand_path(File.join(__dir__, '../../../..', 'templates', 'build', 'ios'))
16
16
 
17
- attr_reader :plugin_name, :archs, :persist_build_dir
17
+ attr_reader :plugin_name, :archs, :persist_build_dir, :use_existing_build
18
18
 
19
- def initialize(archs, persist_build_dir)
20
- podspec_file = Dir["./*.podspec"].first
21
- raise Error, "No podspec exists." unless podspec_file
19
+ def initialize(archs, persist_build_dir, use_existing_build)
20
+ podspec_file = Dir['./*.podspec'].first
21
+ raise Error, 'No podspec exists.' unless podspec_file
22
22
 
23
23
  @plugin_name = File.basename(podspec_file, '.podspec')
24
24
  @archs = archs.gsub(',', ' ')
25
25
  @persist_build_dir = persist_build_dir
26
+ @use_existing_build = use_existing_build
26
27
  end
27
28
 
28
29
  def call
29
- setup_dirs
30
- create_framework_proj
31
- move_template_files!
32
- run_pod_install
33
- chmod_frameworks_script!
30
+ cd_build_dir(!use_existing_build)
31
+ unless use_existing_build
32
+ create_framework_proj
33
+ move_template_files!
34
+ run_pod_install
35
+ chmod_frameworks_script!
36
+ end
34
37
  build_framework!
35
38
  move_framework_file
36
39
  ensure
@@ -38,16 +41,16 @@ module GoNative
38
41
  FileUtils.rm_rf('build') unless persist_build_dir
39
42
  end
40
43
 
41
- def setup_dirs
44
+ def cd_build_dir(create)
42
45
  build_dir = File.join(FileUtils.pwd, 'build')
43
- FileUtils.mkdir(build_dir)
46
+ FileUtils.mkdir(build_dir) if create
44
47
  FileUtils.cd(build_dir)
45
48
  end
46
49
 
47
50
  def create_framework_proj
48
51
  proj = Xcodeproj::Project.new(FileUtils.pwd)
49
52
  target = proj.new_target(:framework,
50
- "#{plugin_name}",
53
+ plugin_name.to_s,
51
54
  :ios,
52
55
  deployment_target)
53
56
  main_group = proj.new_group(plugin_name, plugin_name)
@@ -83,9 +86,9 @@ module GoNative
83
86
 
84
87
  def add_headers(target, group)
85
88
  headers_group = group.new_group('Headers', 'Headers')
86
- references = Dir.glob("../#{plugin_name}/Classes/**/*.h").map { |file|
89
+ references = Dir.glob("../#{plugin_name}/Classes/**/*.h").map do |file|
87
90
  headers_group.new_file("../../#{file}")
88
- }
91
+ end
89
92
  header_files = target.add_file_references(references)
90
93
  header_files << target.headers_build_phase.add_file_reference(group.new_file("../#{plugin_name}-umbrella.h"))
91
94
  header_files.each do |header|
@@ -94,9 +97,9 @@ module GoNative
94
97
  end
95
98
 
96
99
  def move_template_files!
97
- plugin_dependencies = spec.dependencies.map { |d|
100
+ plugin_dependencies = spec.dependencies.map do |d|
98
101
  ["pod '#{d.name}'", "'#{d.requirement}'"].compact.join(', ')
99
- } * "\n\t"
102
+ end * "\n\t"
100
103
  FileUtils.cp_r("#{BUILD_TEMPLATE_DIRECTORY_PATH}/.", '.')
101
104
  headers = Dir.glob("../#{plugin_name}/Classes/**/*.h").map { |f| "#import \"#{File.basename(f)}\"" } * "\n"
102
105
  Utils::TemplateInflator.new(plugin_name: plugin_name,
@@ -118,12 +121,12 @@ module GoNative
118
121
  Utils::UI.info 'Building framework'
119
122
  return if system('sh create-framework.sh >/dev/null 2>/dev/null')
120
123
 
121
- raise Error, "Error building framework. Please run the create-framework file manually to fix any errors"
124
+ raise Error, 'Error building framework. Please run the create-framework file manually to fix any errors'
122
125
  end
123
126
 
124
127
  def move_framework_file
125
128
  FileUtils.rm_rf('../XCFramework')
126
- FileUtils.mv("XCFramework", '..', force: true)
129
+ FileUtils.mv('XCFramework', '..', force: true)
127
130
  end
128
131
 
129
132
  def deployment_target
@@ -59,7 +59,7 @@ module GoNative
59
59
  app_target.add_dependency(extension_target)
60
60
  extension_file = proj.files.find { |f| f.path == "#{extension["name"]}.appex" }
61
61
  embed_phase = app_target.build_phases.find do |phase|
62
- phase.class.method_defined?(:name) && phase.name == 'Embed App Extensions'
62
+ phase.class.method_defined?(:name) && phase.name == 'Embed Foundation Extensions'
63
63
  end
64
64
  embed_phase.add_file_reference(extension_file, true)
65
65
  app_config = proj.files.find { |f| f.path == 'appConfig.json' }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = '1.3.2'
4
+ VERSION = '1.3.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gonative-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-10 00:00:00.000000000 Z
11
+ date: 2023-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli