gonative-cli 1.3.9 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gonative/commands/ios/add_files.rb +16 -0
- data/lib/gonative/commands.rb +1 -0
- data/lib/gonative/plugins/ios/add_files.rb +43 -0
- data/lib/gonative/plugins/ios/rename.rb +1 -1
- data/lib/gonative/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7a7465e4576b65e4c983f4f420e3f19b658b37fc9a7e80e81f6620f913a4810
|
4
|
+
data.tar.gz: a5c3dd7216761ac731794b99eed4a38458c346f505094223bd935b90167dc7e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27189c9ca970e01bb2e6b60de95623aba7ccb1b33f2b19101c48556329ff8e8e54ae609510ce2658593a74b55ccf2b9eca0fc4695b6eae89f786dda1c98a322a
|
7
|
+
data.tar.gz: d4e2c029b68fffd959a5435575bb0c4cd328bbf900266f863da1ff14bc7a927e0d08cfe95608ede98df7f8c212da10ff4a1700194b0a8083ae0a2dde5853102b
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module GoNative
|
4
|
+
module Commands
|
5
|
+
module IOS
|
6
|
+
class AddFiles < Base
|
7
|
+
desc 'Add language to the project'
|
8
|
+
|
9
|
+
argument :path, required: true
|
10
|
+
def call(path:, **)
|
11
|
+
Plugins::IOS::AddFiles.call(path)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/gonative/commands.rb
CHANGED
@@ -14,6 +14,7 @@ module GoNative
|
|
14
14
|
register 'ios rename', IOS::Rename
|
15
15
|
register 'ios version', IOS::Version
|
16
16
|
register 'ios add-language', IOS::AddLanguage
|
17
|
+
register 'ios add-files', IOS::AddFiles
|
17
18
|
|
18
19
|
register 'android create', Android::Create
|
19
20
|
register 'android publish', Android::Publish
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'xcodeproj'
|
4
|
+
|
5
|
+
module GoNative
|
6
|
+
module Plugins
|
7
|
+
module IOS
|
8
|
+
class AddFiles
|
9
|
+
extend DSL::Serviceable
|
10
|
+
|
11
|
+
attr_reader :file_paths
|
12
|
+
|
13
|
+
def initialize(path)
|
14
|
+
@file_paths = Dir.glob(path)
|
15
|
+
end
|
16
|
+
|
17
|
+
def call
|
18
|
+
return if file_paths.empty?
|
19
|
+
|
20
|
+
project = Xcodeproj::Project.open('MedianIOS.xcodeproj')
|
21
|
+
target = project.native_targets.first
|
22
|
+
|
23
|
+
resources_directory = File.join(FileUtils.pwd, 'Resources')
|
24
|
+
FileUtils.mkdir_p(resources_directory)
|
25
|
+
|
26
|
+
resources_group = project.main_group['Resources'] || project.main_group.new_group('Resources')
|
27
|
+
|
28
|
+
file_paths.each do |file_path|
|
29
|
+
file_name = File.basename(file_path)
|
30
|
+
destination_path = File.join(resources_directory, file_name)
|
31
|
+
FileUtils.cp(file_path, destination_path)
|
32
|
+
|
33
|
+
relative_path = File.join('Resources', file_name)
|
34
|
+
file_ref = resources_group.new_file(relative_path)
|
35
|
+
target.resources_build_phase.add_file_reference(file_ref)
|
36
|
+
end
|
37
|
+
|
38
|
+
project.save
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/lib/gonative/version.rb
CHANGED
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.
|
4
|
+
version: 1.4.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: 2024-
|
11
|
+
date: 2024-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-cli
|
@@ -192,6 +192,7 @@ files:
|
|
192
192
|
- lib/gonative/commands/android/publish.rb
|
193
193
|
- lib/gonative/commands/android/version.rb
|
194
194
|
- lib/gonative/commands/base.rb
|
195
|
+
- lib/gonative/commands/ios/add_files.rb
|
195
196
|
- lib/gonative/commands/ios/add_language.rb
|
196
197
|
- lib/gonative/commands/ios/create.rb
|
197
198
|
- lib/gonative/commands/ios/embed_extensions.rb
|
@@ -205,6 +206,7 @@ files:
|
|
205
206
|
- lib/gonative/dsl/error_catchable.rb
|
206
207
|
- lib/gonative/dsl/serviceable.rb
|
207
208
|
- lib/gonative/plugins/android/create.rb
|
209
|
+
- lib/gonative/plugins/ios/add_files.rb
|
208
210
|
- lib/gonative/plugins/ios/add_language.rb
|
209
211
|
- lib/gonative/plugins/ios/build_framework.rb
|
210
212
|
- lib/gonative/plugins/ios/create.rb
|