gonative-cli 0.9.2 → 1.0.1

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: a4acd28ffd8efd342c4c219852429ff3903688af2052b94d3357afd631d62bf5
4
- data.tar.gz: a7378f8e35fc7468c7430d42d26e7762909f0d35aa5223e1910e4125b4127287
3
+ metadata.gz: 0b7a1b125d1ffe1178c8aac7ce7a83f28763f56a4143927ea5f98af65a6e8b0d
4
+ data.tar.gz: 5e3d40a22098d80e8a81caf9f09238103beac627fadfc60fbfec32ba7787baee
5
5
  SHA512:
6
- metadata.gz: d3ffa2955b932c8d308fd1c01607a9dd08227e54ac3d2f05771c70e7e9284b4f1f42a7a439688129614cd8e66f6a68d591eab1fed023ea63f12f4e089cf10a25
7
- data.tar.gz: ab087bde09fc635de3def712d0a5e9d50fef4af59e3a54302545739b5d1f878ae743ffd147d4ac2fa1c59c8fb29b71d1e1dc9cb07510e839fa999a907fd89bf7
6
+ metadata.gz: c957a26340165e854405d1d8d29501396abb32cdae937f18ad49679630b266034f0389a073061f46b78549e472b5eaaa5145d262842ec2b5de4713a087f30eba
7
+ data.tar.gz: cbeb838d856380b958636c938596419ee3b94594ca8a61ee9f081e3990ab26cbd429be34423835888bd56d535050b3a85aa579e902d367fbf1d4515655c39b18
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (0.9.1)
4
+ gonative-cli (0.9.3)
5
5
  activesupport (~> 6.0)
6
6
  cocoapods (~> 1.10)
7
7
  colorize (~> 0.8.0)
@@ -68,7 +68,7 @@ GEM
68
68
  coderay (1.1.3)
69
69
  colored2 (3.1.2)
70
70
  colorize (0.8.1)
71
- concurrent-ruby (1.1.9)
71
+ concurrent-ruby (1.1.10)
72
72
  diff-lcs (1.4.4)
73
73
  dry-cli (0.7.0)
74
74
  escape (0.0.4)
data/LICENSE.txt CHANGED
@@ -1,21 +1 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2021 Hunaid Hassan
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ Licensing information available at https://gonative.io/
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GoNative
4
+ module Commands
5
+ module Android
6
+ class Publish < Base
7
+ desc 'Used to update one of the android internal dependencies'
8
+
9
+ def call
10
+ assert_build_file_exists!
11
+ create_and_push_tag!
12
+ end
13
+
14
+ def assert_build_file_exists!
15
+ return if gradle_file
16
+
17
+ raise Error, "No build.gradle file exists"
18
+ end
19
+
20
+ private
21
+
22
+ def gradle_file
23
+ @gradle_file ||= Dir.entries(".").select { |s| s == "build.gradle" }.first
24
+ end
25
+
26
+ def version
27
+ str = IO.read(gradle_file)
28
+ str.match(/versionName\s+\"(?<version>.+)\"/)
29
+
30
+ str.match(/versionName\s+\"(?<version>.+)\"/)[:version]
31
+ end
32
+
33
+ def create_and_push_tag!
34
+ unless system("git tag | grep #{version} > /dev/null")
35
+ system "git add -A && git commit -m \"Releases #{version}.\""
36
+ system "git tag #{version}"
37
+ system "git push && git push --tags"
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -11,5 +11,6 @@ module GoNative
11
11
  register 'ios embed-extensions', IOS::EmbedExtensions
12
12
  register 'ios set-bundle-id', IOS::SetBundleId
13
13
  register 'android create', Android::Create
14
+ register 'android publish', Android::Publish
14
15
  end
15
16
  end
@@ -34,27 +34,29 @@ module GoNative
34
34
  proj = Xcodeproj::Project.open('GoNativeIOS.xcodeproj')
35
35
  app_target = proj.native_targets.first
36
36
  extensions.each do |extension|
37
- target = proj.new_target(:app_extension,
37
+ extension_target = proj.new_target(:app_extension,
38
38
  extension['name'],
39
39
  :ios,
40
40
  '11.0')
41
41
  extension_group = proj.new_group(extension['name'], extension['name'])
42
42
 
43
43
  extension['headers'].each { |path| extension_group.new_file(path) }
44
- target.add_file_references(extension['source_files'].map { |path| extension_group.new_file(path) })
45
- target.add_resources(extension['resources'].map { |path| extension_group.new_file(path) })
46
- target.add_system_frameworks(extension['system_frameworks'])
44
+ extension_target.add_file_references(extension['source_files'].map { |path| extension_group.new_file(path) })
45
+ extension_target.add_resources(extension['resources'].map { |path| extension_group.new_file(path) })
46
+ extension_target.add_system_frameworks(extension['system_frameworks'])
47
47
  extension_group.new_file(extension['info'])
48
48
  extension_group.new_file(extension['entitlements']) if extension['entitlements']
49
- target.build_configurations.each do |config|
49
+ extension_target.build_configurations.each do |config|
50
50
  config.build_settings['PRODUCT_NAME'] = "$(TARGET_NAME)"
51
51
  config.build_settings['INFOPLIST_FILE'] = "#{extension['name']}/#{extension['info']}"
52
52
  config.build_settings['CODE_SIGN_ENTITLEMENTS'] = "#{extension['name']}/#{extension['entitlements']}" if extension['entitlements']
53
53
  end
54
- app_target.add_dependency(target)
54
+ app_target.add_dependency(extension_target)
55
55
  extension_file = proj.files.find{|f| f.path == "#{extension['name']}.appex" }
56
56
  embed_phase = app_target.build_phases.find { |phase| phase.class.method_defined?(:name) && phase.name == 'Embed App Extensions' }
57
57
  embed_phase.add_file_reference(extension_file, true)
58
+ app_config = proj.files.find{|f| f.path == 'appConfig.json' }
59
+ extension_target.resources_build_phase.add_file_reference(app_config, true)
58
60
  end
59
61
 
60
62
  proj.save
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = "0.9.2"
4
+ VERSION = "1.0.1"
5
5
  end
@@ -28,6 +28,6 @@ android {
28
28
  }
29
29
 
30
30
  dependencies {
31
- implementation "io.gonative.android:library:+"
32
- api project(':gonative-core')
31
+ implementation 'com.github.gonativeio:gonative-android-library:+'
32
+ implementation 'com.github.gonativeio:gonative-android-core:+'
33
33
  }
@@ -14,16 +14,17 @@ TODO: Add long description of the pod here.
14
14
 
15
15
  s.ios.deployment_target = '10.0'
16
16
  s.swift_versions = '5.0'
17
- s.preserve_paths = ['plist/*.{plist}', 'Extensions/**/*']
18
17
 
19
18
  s.subspec 'Source' do |cs|
20
19
  cs.source_files = '#{plugin_name}/Classes/**/*.{h,m,swift}'
21
20
  cs.resource_bundle = { '#{plugin_name}JS' => 'js/*.{js,json}' }
21
+ cs.preserve_paths = ['plist/*.{plist}', 'Extensions/**/*']
22
22
  end
23
23
 
24
24
  s.subspec 'Binary' do |cs|
25
25
  cs.ios.vendored_frameworks = 'XCFramework/#{plugin_name}.xcframework'
26
26
  cs.resource_bundle = { '#{plugin_name}JS' => 'js/*.{js,json}' }
27
+ cs.preserve_paths = ['plist/*.{plist}', 'Extensions/**/*']
27
28
  end
28
29
 
29
30
  s.default_subspec = 'Source'
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.9.2
4
+ version: 1.0.1
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-03-08 00:00:00.000000000 Z
11
+ date: 2022-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -188,6 +188,7 @@ files:
188
188
  - lib/gonative.rb
189
189
  - lib/gonative/commands.rb
190
190
  - lib/gonative/commands/android/create.rb
191
+ - lib/gonative/commands/android/publish.rb
191
192
  - lib/gonative/commands/base.rb
192
193
  - lib/gonative/commands/ios/create.rb
193
194
  - lib/gonative/commands/ios/embed_extensions.rb
@@ -254,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
254
255
  - !ruby/object:Gem::Version
255
256
  version: '0'
256
257
  requirements: []
257
- rubygems_version: 3.2.3
258
+ rubygems_version: 3.2.22
258
259
  signing_key:
259
260
  specification_version: 4
260
261
  summary: CLI to create gonative plugins.