fastlane-plugin-bundletool 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a1ce147b19920327f7ca4a32519214316955aa906469ec9eb2edb5f249e9f72
|
4
|
+
data.tar.gz: abb7030269fda53b86f532da8a137a5fafc593c69be5fbb164f01157c5b5e36d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f6c1a75aa421ef5184da894a6ebdf2a15824698479b90927f86188d8953ddccaa55fcdd62276c18258a4f9beb6d9c4110335e69ecfc9711f693ac851f579d1d
|
7
|
+
data.tar.gz: eadcb068dd75527b1eb35ac1683c43e029d824a859202cff77d8a7de901b516b94243722e34f543cb8714822ae0a7ec9af5679efe6156d64be7f4bed759ba2c4
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ fastlane add_plugin bundletool
|
|
13
13
|
or in your Pluginfile under fastlane folder write the following line and run `bundle install`.
|
14
14
|
|
15
15
|
```
|
16
|
-
gem 'fastlane-plugin-bundletool', '1.0.
|
16
|
+
gem 'fastlane-plugin-bundletool', '1.0.6'
|
17
17
|
```
|
18
18
|
|
19
19
|
## About bundletool
|
@@ -34,7 +34,7 @@ bundletool(
|
|
34
34
|
ks_password: keystore_password,
|
35
35
|
ks_key_alias: keystore_alias,
|
36
36
|
ks_key_alias_password: keystore_alias_password,
|
37
|
-
bundletool_version: '
|
37
|
+
bundletool_version: '1.10.0', # For searching a specific version of bundletool visit https://github.com/google/bundletool/releases
|
38
38
|
aab_path: aab_path,
|
39
39
|
apk_output_path: apk_output_path,
|
40
40
|
verbose: true
|
@@ -20,12 +20,13 @@ module Fastlane
|
|
20
20
|
end
|
21
21
|
|
22
22
|
bundletool_version = params[:bundletool_version]
|
23
|
+
download_url = params[:download_url]
|
23
24
|
aab_path = params[:aab_path]
|
24
25
|
output_path = params[:apk_output_path] || '.'
|
25
26
|
|
26
27
|
return unless validate_aab!(aab_path)
|
27
28
|
|
28
|
-
return unless download_bundletool(bundletool_version)
|
29
|
+
return unless download_bundletool(bundletool_version, download_url)
|
29
30
|
|
30
31
|
extract_universal_apk_from(aab_path, output_path, keystore_info)
|
31
32
|
end
|
@@ -37,22 +38,27 @@ module Fastlane
|
|
37
38
|
return false
|
38
39
|
end
|
39
40
|
puts_success('Checking if .aab file exists')
|
41
|
+
return true
|
40
42
|
end
|
41
43
|
|
42
|
-
def self.download_bundletool(version)
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
44
|
+
def self.download_bundletool(version, download_url)
|
45
|
+
Dir.mkdir "#{@project_root}/bundletool_temp"
|
46
|
+
|
47
|
+
unless download_url.nil?
|
48
|
+
puts "Downloading bundletool from #{download_url}"
|
49
|
+
puts_message("Downloading bundletool from #{download_url}")
|
50
|
+
download_and_write_bundletool(download_url)
|
51
|
+
else
|
52
|
+
puts_message("Downloading bundletool (#{version}) from https://github.com/google/bundletool/releases/download/#{version}/bundletool-all-#{version}.jar...")
|
53
|
+
download_and_write_bundletool("https://github.com/google/bundletool/releases/download/#{version}/bundletool-all-#{version}.jar")
|
49
54
|
end
|
50
|
-
puts_success('
|
55
|
+
puts_success('Downloaded bundletool')
|
56
|
+
true
|
51
57
|
rescue OpenURI::HTTPError => e
|
52
58
|
clean_temp!
|
53
|
-
puts_error!("Something went wrong when downloading bundletool version #{version}. \nError message\n #{e.message}")
|
59
|
+
puts_error!("Something went wrong when downloading bundletool version #{version}" + ". \nError message\n #{e.message}")
|
54
60
|
false
|
55
|
-
end
|
61
|
+
end
|
56
62
|
|
57
63
|
def self.extract_universal_apk_from(aab_path, apk_output_path, keystore_info)
|
58
64
|
aab_absolute_path = Pathname.new(File.expand_path(aab_path)).to_s
|
@@ -155,15 +161,19 @@ module Fastlane
|
|
155
161
|
description: 'Version of bundletool to use, by default 0.11.0 will be used',
|
156
162
|
is_string: true,
|
157
163
|
default_value: '0.11.0'),
|
164
|
+
FastlaneCore::ConfigItem.new(key: :download_url,
|
165
|
+
description: 'Url to download bundletool from, should point to a jar file',
|
166
|
+
is_string: true,
|
167
|
+
optional: true),
|
158
168
|
FastlaneCore::ConfigItem.new(key: :aab_path,
|
159
169
|
description: 'Path where the aab file is',
|
160
170
|
is_string: true,
|
161
171
|
optional: false,
|
162
172
|
verify_block: proc do |value|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
173
|
+
unless value && !value.empty?
|
174
|
+
UI.user_error!('You must set aab_path.')
|
175
|
+
end
|
176
|
+
end),
|
167
177
|
FastlaneCore::ConfigItem.new(key: :apk_output_path,
|
168
178
|
description: 'Path where the apk file is going to be placed',
|
169
179
|
is_string: true,
|
@@ -201,6 +211,16 @@ module Fastlane
|
|
201
211
|
def self.is_supported?(platform)
|
202
212
|
[:android].include?(platform)
|
203
213
|
end
|
214
|
+
|
215
|
+
private
|
216
|
+
|
217
|
+
def self.download_and_write_bundletool(download_url)
|
218
|
+
URI.open(download_url) do |bundletool|
|
219
|
+
File.open("#{@bundletool_temp_path}/bundletool.jar", 'wb') do |file|
|
220
|
+
file.write(bundletool.read)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
204
224
|
end
|
205
225
|
end
|
206
226
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-bundletool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Gonzalez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
|
-
rubygems_version: 3.
|
171
|
+
rubygems_version: 3.1.6
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Extracts a universal apk from an .aab file
|