gonative-cli 0.7.12 → 0.7.16

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: 8845cae52c317cbed1805f7c9a207becd51cab6c2eddb9ca23c8dc73b6a20f15
4
- data.tar.gz: d8e9992df4197715a0df5861d21ce073cda34cf1f8891c7ac6349b2f8d87ec75
3
+ metadata.gz: 978a8e1166a47df0eaada6a7acc92f45e5cb48291dd5bce06ea8ef53dce4dc66
4
+ data.tar.gz: d48f9d01b36e2ec6ddeffd9e62d5659002aae942e9a565855776557f27971646
5
5
  SHA512:
6
- metadata.gz: 5162ec5829c885bdb35ce51a17906ac7be4bf7fa3de007cea99ef14349e41d5e9dcaa8b510493470ed8e9c28f404bc3c517410fc778061457723847ea4fe224c
7
- data.tar.gz: 216750144e5eb51d8d3703b00738592cff090a0491124133dfebdbfe31c8f8737a196cbfac23fb5ae9d1ee0583271ec5e4602593ab65e7d8729f1cd212916845
6
+ metadata.gz: ed4433cc3d8c2b83c146692d3239499fd65745adb1cca6265fd74a97f12ae6f6a79dabd9b6be0a0d09261020e53e35ca223fc7ad0a992989841dff50e66328a7
7
+ data.tar.gz: 5409e669f065b340df58c18cf6f7a49c9dc93ababa0b70936c19d8f248ff65c965eafe4e4bd63bf136dc23893c9bf406f5f97ab33564f42f97c57539f301a436
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (0.7.4)
4
+ gonative-cli (0.7.12)
5
5
  activesupport (~> 6.0)
6
6
  cocoapods (~> 1.10)
7
7
  colorize (~> 0.8.0)
@@ -8,10 +8,11 @@ module GoNative
8
8
  argument :name, required: true, desc: 'Name of the plugin'
9
9
  option :skip_build, type: :boolean, default: false
10
10
  option :debug, type: :boolean, default: false
11
+ option :archs, default: 'x86_64,arm64'
11
12
 
12
- def call(name:, skip_build:, debug:, **)
13
+ def call(name:, skip_build:, debug:, archs:, **)
13
14
  Plugins::IOS::Verify.call
14
- Plugins::IOS::BuildFramework.call(name, debug) unless skip_build
15
+ Plugins::IOS::BuildFramework.call(name, archs, debug) unless skip_build
15
16
  Plugins::IOS::Release.call
16
17
  end
17
18
  end
@@ -14,10 +14,11 @@ 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, :persist_build_dir
17
+ attr_reader :plugin_name, :archs, :persist_build_dir
18
18
 
19
- def initialize(plugin_name, persist_build_dir)
19
+ def initialize(plugin_name, archs, persist_build_dir)
20
20
  @plugin_name = plugin_name
21
+ @archs = archs.gsub(',', ' ')
21
22
  @persist_build_dir = persist_build_dir
22
23
  end
23
24
 
@@ -42,7 +43,10 @@ module GoNative
42
43
 
43
44
  def create_framework_proj
44
45
  proj = Xcodeproj::Project.new(FileUtils.pwd)
45
- target = proj.new_target(:framework, "#{plugin_name}", :ios, '11.0')
46
+ target = proj.new_target(:framework,
47
+ "#{plugin_name}",
48
+ :ios,
49
+ deployment_target)
46
50
  main_group = proj.new_group(plugin_name, plugin_name)
47
51
  classes_group = main_group.new_group('Classes', 'Classes')
48
52
  references = Dir.glob("../#{plugin_name}/Classes/**").map{ |file| classes_group.new_file("../../#{file}") }
@@ -54,10 +58,13 @@ module GoNative
54
58
  end
55
59
 
56
60
  def move_template_files
57
- spec = Pod::Specification.from_file("../#{plugin_name}.podspec")
58
61
  plugin_dependencies = spec.dependencies.map{|d| ["pod '#{d.name}'", "'#{d.requirement}'"].compact.join(', ') } * "\n\t"
59
62
  FileUtils.cp_r("#{BUILD_TEMPLATE_DIRECTORY_PATH}/.", '.')
60
- Utils::TemplateInflator.new(plugin_name: plugin_name, plugin_dependencies: plugin_dependencies).call
63
+ Utils::TemplateInflator.new(plugin_name: plugin_name,
64
+ plugin_dependencies: plugin_dependencies,
65
+ archs: archs,
66
+ deployment_target: deployment_target
67
+ ).call
61
68
  end
62
69
 
63
70
  def run_pod_install
@@ -78,6 +85,14 @@ module GoNative
78
85
  def move_framework_file
79
86
  FileUtils.mv("XCFramework", '..', force: true)
80
87
  end
88
+
89
+ def deployment_target
90
+ spec.deployment_target('ios') || '11.0'
91
+ end
92
+
93
+ def spec
94
+ @spec ||= Pod::Specification.from_file("../#{plugin_name}.podspec")
95
+ end
81
96
  end
82
97
  end
83
98
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = "0.7.12"
4
+ VERSION = "0.7.16"
5
5
  end
@@ -1,4 +1,4 @@
1
- platform :ios, '11.0'
1
+ platform :ios, '#{deployment_target}'
2
2
 
3
3
  source 'https://cdn.cocoapods.org/'
4
4
  source 'git@github.com:gonativeio/gonative-specs.git'
@@ -21,7 +21,7 @@ mkdir "${FRAMEWORK_FOLDER_NAME}"
21
21
  echo "Created ${FRAMEWORK_FOLDER_NAME}"
22
22
  echo "Archiving ${FRAMEWORK_NAME}"
23
23
 
24
- xcodebuild -workspace "#{plugin_name}.xcworkspace" archive ONLY_ACTIVE_ARCH=NO ARCHS="x86_64 arm64" -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS Simulator" -archivePath "${SIMULATOR_ARCHIVE_PATH}" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
24
+ xcodebuild -workspace "#{plugin_name}.xcworkspace" archive ONLY_ACTIVE_ARCH=NO ARCHS="#{archs}" -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS Simulator" -archivePath "${SIMULATOR_ARCHIVE_PATH}" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
25
25
 
26
26
  xcodebuild archive -workspace "#{plugin_name}.xcworkspace" -scheme ${BUILD_SCHEME} -destination="generic/platform=iOS" -archivePath "${IOS_DEVICE_ARCHIVE_PATH}" -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
27
27
 
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: 0.7.12
4
+ version: 0.7.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-06 00:00:00.000000000 Z
11
+ date: 2022-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli