fastlane-plugin-android_unpack 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +52 -0
- data/lib/fastlane/plugin/android_unpack.rb +16 -0
- data/lib/fastlane/plugin/android_unpack/actions/android_unpack_action.rb +271 -0
- data/lib/fastlane/plugin/android_unpack/actions/upload_oss.rb +97 -0
- data/lib/fastlane/plugin/android_unpack/helper/android_unpack_helper.rb +16 -0
- data/lib/fastlane/plugin/android_unpack/version.rb +5 -0
- metadata +175 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7092ae356660d1db1d87695c9f6bb3552468a63f4ee365279416451f12aafa44
|
4
|
+
data.tar.gz: b2800a26cc5738b76c4486f393b3ad0bfb80edaab8f43050ab5f00ccea4a7843
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 457de53b951d57e52d6f3ca1840c1104c11e6e6b676f89d44701bd2200b79819536bcde64275e6c52eb50b981a57558d0e0e4c758f978850eec2971e2cd3d1c0
|
7
|
+
data.tar.gz: 52782850da34b6ca331b6913bbe8f7715ea2e045f435da5e9ccfdcc85fafdfbab56b3707cfe6159826927e4a3ff3ecf62be174c7dea6b589422c8ac206dfcd86
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 yejinxin <1028579616@qq.com>
|
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 all
|
13
|
+
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 THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# android_unpack plugin
|
2
|
+
|
3
|
+
[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-android_unpack)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-android_unpack`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin android_unpack
|
11
|
+
```
|
12
|
+
|
13
|
+
## About android_unpack
|
14
|
+
|
15
|
+
Fastlane Android Unpack
|
16
|
+
|
17
|
+
**Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
22
|
+
|
23
|
+
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
|
24
|
+
|
25
|
+
## Run tests for this plugin
|
26
|
+
|
27
|
+
To run both the tests, and code style validation, run
|
28
|
+
|
29
|
+
```
|
30
|
+
rake
|
31
|
+
```
|
32
|
+
|
33
|
+
To automatically fix many of the styling issues, use
|
34
|
+
```
|
35
|
+
rubocop -a
|
36
|
+
```
|
37
|
+
|
38
|
+
## Issues and Feedback
|
39
|
+
|
40
|
+
For any other issues and feedback about this plugin, please submit it to this repository.
|
41
|
+
|
42
|
+
## Troubleshooting
|
43
|
+
|
44
|
+
If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
|
45
|
+
|
46
|
+
## Using _fastlane_ Plugins
|
47
|
+
|
48
|
+
For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
|
49
|
+
|
50
|
+
## About _fastlane_
|
51
|
+
|
52
|
+
_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/android_unpack/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module AndroidUnpack
|
5
|
+
# Return all .rb files inside the "actions" and "helper" directory
|
6
|
+
def self.all_classes
|
7
|
+
Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# By default we want to import all available actions and helpers
|
13
|
+
# A plugin can contain any number of actions and plugins
|
14
|
+
Fastlane::AndroidUnpack.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
@@ -0,0 +1,271 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/android_unpack_helper'
|
3
|
+
require 'fastlane-plugin-android_versioning'
|
4
|
+
require 'fastlane-plugin-dingtalk'
|
5
|
+
require 'fir-cli'
|
6
|
+
require_relative 'upload_oss'
|
7
|
+
|
8
|
+
module Fastlane
|
9
|
+
module Actions
|
10
|
+
class AndroidUnpackAction < Action
|
11
|
+
def self.run(params)
|
12
|
+
UI.message("The android_unpack plugin is working!")
|
13
|
+
|
14
|
+
target_type = params[:type]
|
15
|
+
target_type_name = params[:typeName]
|
16
|
+
target_task = params[:task]
|
17
|
+
target_app = params[:app]
|
18
|
+
build_type = options[:build_type]
|
19
|
+
project_name = params[:project]
|
20
|
+
project_flag = params[:project_flag]
|
21
|
+
app_project_dir = options[:project_dir]
|
22
|
+
comment_content = params[:comment]
|
23
|
+
version_code_ = params[:versionCode]
|
24
|
+
version_name_ = options[:version]
|
25
|
+
fir_token = options[:fir_token]
|
26
|
+
dingtalk_access_key = options[:dingtalk_access_key]
|
27
|
+
oss_endpoint = options[:oss_endpoint]
|
28
|
+
access_key_id = options[:oss_access_key_id]
|
29
|
+
access_key_secret = options[:oss_access_key_secret]
|
30
|
+
oss_bucket = options[:oss_bucket]
|
31
|
+
|
32
|
+
if !app_project_dir
|
33
|
+
app_project_dir = "./app"
|
34
|
+
end
|
35
|
+
|
36
|
+
timespans = Hash.new(Time.now)
|
37
|
+
timespans["version_handle_start"] = Time.now
|
38
|
+
|
39
|
+
if !version_name_
|
40
|
+
version_name_ = git_branch.match(/(\d{1,3}\.){1,2}\d{1,3}/).to_s
|
41
|
+
if version_name_.length == 0
|
42
|
+
version_name_ = get_version_name(
|
43
|
+
app_project_dir: app_project_dir
|
44
|
+
)
|
45
|
+
end
|
46
|
+
else
|
47
|
+
version_name_ = version_name_.match(/(\d{1,3}\.){1,2}\d{1,3}/).to_s
|
48
|
+
end
|
49
|
+
|
50
|
+
build_time_ = Time.now.strftime("%Y%m%d%H%M")
|
51
|
+
|
52
|
+
if !version_code_
|
53
|
+
version_code_ = build_time_[2..10]
|
54
|
+
else
|
55
|
+
version_code_ = version_code_.match(/\d{6,9}/).to_s
|
56
|
+
end
|
57
|
+
|
58
|
+
set_value_in_build(
|
59
|
+
app_project_dir:app_project_dir,
|
60
|
+
key:"versionCode",
|
61
|
+
value:version_code_
|
62
|
+
)
|
63
|
+
|
64
|
+
set_value_in_build(
|
65
|
+
app_project_dir:app_project_dir,
|
66
|
+
key:"versionName",
|
67
|
+
value:version_name_
|
68
|
+
)
|
69
|
+
|
70
|
+
gradle(task: "clean")
|
71
|
+
|
72
|
+
# 获取最后一次 git 提交记录
|
73
|
+
commit = last_git_commit
|
74
|
+
# 获取 git branch
|
75
|
+
branch = git_branch
|
76
|
+
|
77
|
+
timespans["version_handle_end"] = Time.now;
|
78
|
+
|
79
|
+
timespans["compile_start"] = Time.now;
|
80
|
+
gradle(
|
81
|
+
task: target_task,
|
82
|
+
flavor: target_app,
|
83
|
+
build_type: build_type,
|
84
|
+
#flags: "--stacktrace",
|
85
|
+
properties: {'versionCode' => version_code_}
|
86
|
+
)
|
87
|
+
|
88
|
+
timespans["compile_end"] = Time.now;
|
89
|
+
|
90
|
+
# 发版时间
|
91
|
+
release_time_ = Time.now.strftime("%Y年%m月%d日%H点%M分")
|
92
|
+
release_time_upload = Time.now.strftime("%Y%m%d%H%M")
|
93
|
+
apk_nameS_backup = "#{project_flag}-" + target_app + "-" + version_name_ + "." + release_time_upload+".apk"
|
94
|
+
apk_remote_path_backup = "#{project_flag}/app/" + target_type + "/android/backup/" + apk_name_backup
|
95
|
+
apk_path_local = lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
|
96
|
+
|
97
|
+
timespans["upload_apk_start"] = Time.now;
|
98
|
+
upload_oss({
|
99
|
+
endpoint:oss_endpoint,
|
100
|
+
access_key_id:access_key_id,
|
101
|
+
access_key_secret:access_key_secret,
|
102
|
+
bucket:oss_bucket,
|
103
|
+
remote_path:apk_remote_path_backup,
|
104
|
+
file_path:apk_path_local})
|
105
|
+
|
106
|
+
fir_result = fir_cli({
|
107
|
+
api_token: fir_token,
|
108
|
+
specify_file_path: apk_path_local,
|
109
|
+
need_release_id: true,
|
110
|
+
force_pin_history: true,
|
111
|
+
changelog: "【#{branch}】 #{commit[:message]}"
|
112
|
+
})
|
113
|
+
timespans["upload_apk_end"] = Time.now;
|
114
|
+
|
115
|
+
# 钉钉通知
|
116
|
+
dingtalk_message = "![logo](http://shouqianba.oss-cn-hangzhou.aliyuncs.com/fastlane/fastlane_app_android_logo.gif)\n" +
|
117
|
+
"### 收钱吧\n" +
|
118
|
+
"*`Android`* *`" + target_type_name + "`* for **`" + target_app + "`**\n" +
|
119
|
+
"- version:" + version_name_ + "\n" +
|
120
|
+
"- versionCode:" + version_code_ + "\n" +
|
121
|
+
"- build:" + build_time_ + "\n" +
|
122
|
+
"- 打包分支:" + git_branch + "\n" +
|
123
|
+
"- 发版时间:" + release_time_ + "\n"
|
124
|
+
|
125
|
+
if project_name
|
126
|
+
dingtalk_message = dingtalk_message + "- 项目:**" + project_name + "**\n"
|
127
|
+
end
|
128
|
+
dingtalk_message = dingtalk_message + "- 修改内容:\n> " + commit[:message] + "\n"
|
129
|
+
if comment_content
|
130
|
+
dingtalk_message = dingtalk_message + comment_content + "\n"
|
131
|
+
end
|
132
|
+
|
133
|
+
p_preprocess = Time.at(Integer(timespans["version_handle_end"].to_f - timespans["version_handle_start"].to_f)).strftime("%M分%S秒").to_s + "\n";
|
134
|
+
p_compile = Time.at(Integer(timespans["compile_end"].to_f - timespans["compile_start"].to_f)).strftime("%M分%S秒").to_s + "\n";
|
135
|
+
p_upload = Time.at(Integer(timespans["upload_apk_end"].to_f - timespans["upload_apk_start"].to_f)).strftime("%M分%S秒").to_s + "\n";
|
136
|
+
dingtalk_message = dingtalk_message + "- 打包性能:\n> " +
|
137
|
+
"各种预处理: " + p_preprocess +
|
138
|
+
"安装包编译: " + p_compile +
|
139
|
+
"安装包上传: " + p_upload
|
140
|
+
|
141
|
+
apksize = (File.size(apk_path_local).to_f / 2**20).round(2);
|
142
|
+
dingtalk_message = dingtalk_message + "- 文件大小: " + apksize.to_s + ' MB' + "\n";
|
143
|
+
dingtalk_message = dingtalk_message + "- 安装包下载链接:**[" + target_url + "](" + target_url + ")**\n"
|
144
|
+
dingtalk_message = dingtalk_message + "- 感谢关注!欢迎反馈问题!O(∩_∩)O"
|
145
|
+
|
146
|
+
dingtalk(
|
147
|
+
access_token: dingtalk_access_key,
|
148
|
+
title: "Android" + target_type_name + "发布了",
|
149
|
+
message: dingtalk_message,
|
150
|
+
#more_title: "安装包下载地址",
|
151
|
+
#more_url: target_url,
|
152
|
+
)
|
153
|
+
end
|
154
|
+
|
155
|
+
def self.description
|
156
|
+
"Fastlane Android Unpack"
|
157
|
+
end
|
158
|
+
|
159
|
+
def self.authors
|
160
|
+
["yejinxin"]
|
161
|
+
end
|
162
|
+
|
163
|
+
def self.return_value
|
164
|
+
# If your method provides a return value, you can describe here what it does
|
165
|
+
end
|
166
|
+
|
167
|
+
def self.details
|
168
|
+
# Optional:
|
169
|
+
"通过fastlane打包上传fir后,发送通知到钉钉平台"
|
170
|
+
end
|
171
|
+
|
172
|
+
def self.available_options
|
173
|
+
[
|
174
|
+
FastlaneCore::ConfigItem.new(key: :type,
|
175
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
176
|
+
description: "type",
|
177
|
+
optional: false,
|
178
|
+
type: String),
|
179
|
+
FastlaneCore::ConfigItem.new(key: :typeName,
|
180
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
181
|
+
description: "typeName",
|
182
|
+
optional: false,
|
183
|
+
type: String),
|
184
|
+
FastlaneCore::ConfigItem.new(key: :task,
|
185
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
186
|
+
description: "task",
|
187
|
+
optional: false,
|
188
|
+
type: String),
|
189
|
+
FastlaneCore::ConfigItem.new(key: :app,
|
190
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
191
|
+
description: "app",
|
192
|
+
optional: false,
|
193
|
+
type: String),
|
194
|
+
FastlaneCore::ConfigItem.new(key: :build_type,
|
195
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
196
|
+
description: "build_type",
|
197
|
+
optional: false,
|
198
|
+
type: String),
|
199
|
+
FastlaneCore::ConfigItem.new(key: :project,
|
200
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
201
|
+
description: "project",
|
202
|
+
optional: false,
|
203
|
+
type: String),
|
204
|
+
FastlaneCore::ConfigItem.new(key: :project_flag,
|
205
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
206
|
+
description: "project_flag",
|
207
|
+
optional: false,
|
208
|
+
type: String),
|
209
|
+
FastlaneCore::ConfigItem.new(key: :project_dir,
|
210
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
211
|
+
description: "project_dir",
|
212
|
+
optional: false,
|
213
|
+
type: String),
|
214
|
+
FastlaneCore::ConfigItem.new(key: :comment,
|
215
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
216
|
+
description: "comment",
|
217
|
+
optional: false,
|
218
|
+
type: String),
|
219
|
+
FastlaneCore::ConfigItem.new(key: :versionCode,
|
220
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
221
|
+
description: "versionCode",
|
222
|
+
optional: false,
|
223
|
+
type: String),
|
224
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
225
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
226
|
+
description: "version",
|
227
|
+
optional: false,
|
228
|
+
type: String),
|
229
|
+
FastlaneCore::ConfigItem.new(key: :fir_token,
|
230
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
231
|
+
description: "fir_token",
|
232
|
+
optional: false,
|
233
|
+
type: String),
|
234
|
+
FastlaneCore::ConfigItem.new(key: :dingtalk_access_key,
|
235
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
236
|
+
description: "dingtalk_access_key",
|
237
|
+
optional: false,
|
238
|
+
type: String),
|
239
|
+
FastlaneCore::ConfigItem.new(key: :oss_endpoint,
|
240
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
241
|
+
description: "oss_endpoint",
|
242
|
+
optional: false,
|
243
|
+
type: String),
|
244
|
+
FastlaneCore::ConfigItem.new(key: :oss_access_key_id,
|
245
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
246
|
+
description: "oss_access_key_id",
|
247
|
+
optional: false,
|
248
|
+
type: String),
|
249
|
+
FastlaneCore::ConfigItem.new(key: :oss_access_key_secret,
|
250
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
251
|
+
description: "oss_access_key_secret",
|
252
|
+
optional: false,
|
253
|
+
type: String),
|
254
|
+
FastlaneCore::ConfigItem.new(key: :oss_bucket,
|
255
|
+
env_name: "ANDROID_UNPACK_YOUR_OPTION",
|
256
|
+
description: "oss_bucket",
|
257
|
+
optional: false,
|
258
|
+
type: String),
|
259
|
+
]
|
260
|
+
end
|
261
|
+
|
262
|
+
def self.is_supported?(platform)
|
263
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
264
|
+
# See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
|
265
|
+
#
|
266
|
+
# [:ios, :mac, :android].include?(platform)
|
267
|
+
true
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require 'aliyun/oss'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module Actions
|
5
|
+
module SharedValues
|
6
|
+
UPLOAD_ANDROID_CUSTOM_VALUE = :UPLOAD_ANDROID_CUSTOM_VALUE
|
7
|
+
end
|
8
|
+
|
9
|
+
class UploadOssAction < Action
|
10
|
+
def self.run(params)
|
11
|
+
# fastlane will take care of reading in the parameter and fetching the environment variable:
|
12
|
+
client = Aliyun::OSS::Client.new(
|
13
|
+
endpoint: params[:endpoint],
|
14
|
+
access_key_id: params[:access_key_id],
|
15
|
+
access_key_secret: params[:access_key_secret]
|
16
|
+
)
|
17
|
+
bucket = client.get_bucket(params[:bucket])
|
18
|
+
bucket.put_object(params[:remote_path], file: params[:file_path])
|
19
|
+
UI.message("upload done!")
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.description
|
23
|
+
"A short description with <= 80 characters of what this action does"
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.details
|
27
|
+
# Optional:
|
28
|
+
# this is your chance to provide a more detailed description of this action
|
29
|
+
"You can use this action to do cool things..."
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.available_options
|
33
|
+
[
|
34
|
+
FastlaneCore::ConfigItem.new(key: :endpoint,
|
35
|
+
env_name: "UPLOAD_OSS_URL", # The name of the environment variable
|
36
|
+
description: "url", # a short description of this parameter
|
37
|
+
is_string: true,
|
38
|
+
default_value: 'http://oss-cn-hangzhou.aliyuncs.com'),
|
39
|
+
FastlaneCore::ConfigItem.new(key: :bucket,
|
40
|
+
env_name: "UPLOAD_OSS_URL", # The name of the environment variable
|
41
|
+
description: "bucket", # a short description of this parameter
|
42
|
+
is_string: true,
|
43
|
+
default_value: ''),
|
44
|
+
FastlaneCore::ConfigItem.new(key: :access_key_secret,
|
45
|
+
env_name: "UPLOAD_OSS_URL", # The name of the environment variable
|
46
|
+
description: "access_key_secret", # a short description of this parameter
|
47
|
+
is_string: true,
|
48
|
+
default_value: ''),
|
49
|
+
FastlaneCore::ConfigItem.new(key: :access_key_secret,
|
50
|
+
env_name: "UPLOAD_OSS_URL", # The name of the environment variable
|
51
|
+
description: "access_key_secret", # a short description of this parameter
|
52
|
+
is_string: true,
|
53
|
+
default_value: ''),
|
54
|
+
FastlaneCore::ConfigItem.new(key: :remote_path,
|
55
|
+
env_name: "UPLOAD_OSS_URL", # The name of the environment variable
|
56
|
+
escription: "url", # a short description of this parameter
|
57
|
+
is_string: true,
|
58
|
+
default_value: 'app.apk'),
|
59
|
+
FastlaneCore::ConfigItem.new(key: :file_path,
|
60
|
+
env_name: "UPLOAD_OSS_FILE",
|
61
|
+
description: "file",
|
62
|
+
is_string: true, # true: verifies the input is a string, false: every kind of value
|
63
|
+
default_value: 'app-release.apk'), # the default value if the user didn't provide one
|
64
|
+
]
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.output
|
68
|
+
# Define the shared values you are going to provide
|
69
|
+
# Example
|
70
|
+
[
|
71
|
+
['UPLOAD_ANDROID_CUSTOM_VALUE', 'A description of what this value contains']
|
72
|
+
]
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.return_value
|
76
|
+
# If you method provides a return value, you can describe here what it does
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.authors
|
80
|
+
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
81
|
+
["Your GitHub/Twitter Name"]
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.is_supported?(platform)
|
85
|
+
# you can do things like
|
86
|
+
#
|
87
|
+
# true
|
88
|
+
#
|
89
|
+
# platform == :ios
|
90
|
+
#
|
91
|
+
# [:ios, :mac].include?(platform)
|
92
|
+
#
|
93
|
+
true
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane_core/ui/ui'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
|
5
|
+
|
6
|
+
module Helper
|
7
|
+
class AndroidUnpackHelper
|
8
|
+
# class methods that you define here become available in your action
|
9
|
+
# as `Helper::AndroidUnpackHelper.your_method`
|
10
|
+
#
|
11
|
+
def self.show_message
|
12
|
+
UI.message("Hello from the android_unpack plugin helper!")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-android_unpack
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- yejinxin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-06-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pry
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec_junit_formatter
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.49.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.49.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-require_tools
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: fastlane
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 2.171.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 2.171.0
|
139
|
+
description:
|
140
|
+
email: 1028579616@qq.com
|
141
|
+
executables: []
|
142
|
+
extensions: []
|
143
|
+
extra_rdoc_files: []
|
144
|
+
files:
|
145
|
+
- LICENSE
|
146
|
+
- README.md
|
147
|
+
- lib/fastlane/plugin/android_unpack.rb
|
148
|
+
- lib/fastlane/plugin/android_unpack/actions/android_unpack_action.rb
|
149
|
+
- lib/fastlane/plugin/android_unpack/actions/upload_oss.rb
|
150
|
+
- lib/fastlane/plugin/android_unpack/helper/android_unpack_helper.rb
|
151
|
+
- lib/fastlane/plugin/android_unpack/version.rb
|
152
|
+
homepage:
|
153
|
+
licenses:
|
154
|
+
- MIT
|
155
|
+
metadata: {}
|
156
|
+
post_install_message:
|
157
|
+
rdoc_options: []
|
158
|
+
require_paths:
|
159
|
+
- lib
|
160
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0'
|
170
|
+
requirements: []
|
171
|
+
rubygems_version: 3.1.2
|
172
|
+
signing_key:
|
173
|
+
specification_version: 4
|
174
|
+
summary: Fastlane Android Unpack
|
175
|
+
test_files: []
|