fastlane-plugin-apadmi_grout 2.2.3 → 2.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eec6506d82fe1a4d31c040fc4166d16859199b862110ea7e97756f423c0ce25b
|
4
|
+
data.tar.gz: faec2cc204d4e058a9344edbf6a2ee26e6eae5c811cc78eeade7dbb5a8f863ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24930c1d4a2c7f796e15a0db8a41b016edd99692bba9ff15a64ffb3c912a9c80d9afbd75a7fc956b8d14ca063047ad8b247e48fc949457b609ea06ad4c229138
|
7
|
+
data.tar.gz: 5e202e3b6ccfa898fe6fbd0cbae271723356b37aac4eb2ec30c645013e1ca19228cae4e3644b87ae05f19362ae9d36cea27db5885319461d478cc75112bbb252
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,172 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "fastlane/action"
|
4
|
+
require "fastlane/actions/gradle"
|
5
|
+
require "apadmi_grout"
|
6
|
+
require_relative "../utils/fastlane_logger"
|
7
|
+
|
8
|
+
# WARNING: Since this is calling out to Gradle, this isn't covered at all by tests
|
9
|
+
# Be very very careful before making any changes.
|
10
|
+
module Fastlane
|
11
|
+
module Actions
|
12
|
+
# Build an IPA binary
|
13
|
+
class BuildApkOrAabAction < Action
|
14
|
+
def self.run(params)
|
15
|
+
logger = FastLane::FastlaneLogger.new
|
16
|
+
|
17
|
+
build_type = Apadmi::Grout::CommandParsingUtils.determining_build_type(params[:gradle_command])
|
18
|
+
output_name = params[:output_name] || Apadmi::Grout::FilenameUtils.binary_output_filename(
|
19
|
+
client_name: params[:client_name],
|
20
|
+
product_name: params[:product_name],
|
21
|
+
platform: "Android",
|
22
|
+
version: params[:version],
|
23
|
+
build_number: params[:build_number]
|
24
|
+
) + ".#{build_type}"
|
25
|
+
|
26
|
+
logger.message("Generating #{build_type}: #{output_name}")
|
27
|
+
|
28
|
+
new_params = params
|
29
|
+
new_params[:task] = params[:gradle_command]
|
30
|
+
new_params[:properties] = signing_properties(params) if params[:inject_signing_creds]
|
31
|
+
new_params[:system_properties] = config_properties(params)
|
32
|
+
|
33
|
+
Fastlane::Actions::GradleAction.run(new_params)
|
34
|
+
|
35
|
+
artifact = case build_type
|
36
|
+
when AndroidBuildType::APK
|
37
|
+
lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
|
38
|
+
when AndroidBuildType::AAB
|
39
|
+
lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH]
|
40
|
+
else
|
41
|
+
raise "Something terrible has happened, could not find artifact path"
|
42
|
+
end
|
43
|
+
|
44
|
+
File.rename(artifact, "#{params[:output_directory]}/#{output_name}")
|
45
|
+
logger.success("Generated #{output_name} in #{params[:output_directory]}")
|
46
|
+
|
47
|
+
artifact
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.config_properties(options)
|
51
|
+
{
|
52
|
+
"versionCode" => options[:build_number],
|
53
|
+
"versionName" => options[:version],
|
54
|
+
"commitHash" => ENV["BITRISE_GIT_COMMIT"] || Apadmi::Grout::GitUtils.commit_hash
|
55
|
+
}.merge(options[:additional_config_properties])
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.signing_properties(params)
|
59
|
+
{
|
60
|
+
"android.injected.signing.store.file" => params[:keystore_path],
|
61
|
+
"android.injected.signing.store.password" => params[:keystore_password],
|
62
|
+
"android.injected.signing.key.alias" => params[:keystore_alias],
|
63
|
+
"android.injected.signing.key.password" => params[:key_password]
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.description
|
68
|
+
"Builds an APK or AAB depeding on the command"
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.authors
|
72
|
+
["samdc@apadmi.com"]
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.fastlane_signing_properties
|
76
|
+
[
|
77
|
+
FastlaneCore::ConfigItem.new(key: :keystore_path,
|
78
|
+
description: "Path to the keystore file",
|
79
|
+
env_name: "BITRISE_SIGNING_KEY_DOWNLOAD_PATH",
|
80
|
+
type: String,
|
81
|
+
optional: true),
|
82
|
+
FastlaneCore::ConfigItem.new(key: :keystore_password,
|
83
|
+
description: "Keystore password",
|
84
|
+
env_name: "BITRISEIO_ANDROID_KEYSTORE_PASSWORD",
|
85
|
+
type: String,
|
86
|
+
optional: true),
|
87
|
+
FastlaneCore::ConfigItem.new(key: :keystore_alias,
|
88
|
+
description: "Keystore alias",
|
89
|
+
env_name: "BITRISEIO_ANDROID_KEYSTORE_ALIAS",
|
90
|
+
type: String,
|
91
|
+
optional: true),
|
92
|
+
FastlaneCore::ConfigItem.new(key: :key_password,
|
93
|
+
description: "Private key password",
|
94
|
+
env_name: "BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD",
|
95
|
+
type: String,
|
96
|
+
optional: true)
|
97
|
+
]
|
98
|
+
end
|
99
|
+
|
100
|
+
def self.available_options
|
101
|
+
[
|
102
|
+
FastlaneCore::ConfigItem.new(key: :client_name,
|
103
|
+
description: "The name of the client",
|
104
|
+
env_name: "CLIENT_NAME",
|
105
|
+
type: String,
|
106
|
+
verify_block: proc do |value|
|
107
|
+
UI.user_error!("Didn't pass a valid client name") unless value
|
108
|
+
end,
|
109
|
+
optional: false),
|
110
|
+
FastlaneCore::ConfigItem.new(key: :product_name,
|
111
|
+
description: "The name of the product",
|
112
|
+
env_name: "PRODUCT_NAME",
|
113
|
+
type: String,
|
114
|
+
verify_block: proc do |value|
|
115
|
+
UI.user_error!("Didn't pass a valid product name") unless value
|
116
|
+
end,
|
117
|
+
optional: false),
|
118
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
119
|
+
description: "The app version e.g. 0.1.0",
|
120
|
+
type: String,
|
121
|
+
verify_block: proc do |value|
|
122
|
+
UI.user_error!("Didn't pass a valid version name") unless value
|
123
|
+
end,
|
124
|
+
optional: false),
|
125
|
+
FastlaneCore::ConfigItem.new(key: :build_number,
|
126
|
+
description: "The app build number e.g. 3948",
|
127
|
+
default_value: Apadmi::Grout::GitUtils.number_of_commits,
|
128
|
+
type: String,
|
129
|
+
verify_block: proc do |value|
|
130
|
+
UI.user_error!("Didn't pass a valid build number") unless value
|
131
|
+
end,
|
132
|
+
optional: false),
|
133
|
+
FastlaneCore::ConfigItem.new(key: :output_name,
|
134
|
+
description: "The desired name of the output file",
|
135
|
+
default_value: nil,
|
136
|
+
type: String,
|
137
|
+
optional: true),
|
138
|
+
FastlaneCore::ConfigItem.new(key: :output_directory,
|
139
|
+
description: "The desired output location",
|
140
|
+
env_name: "BITRISE_DEPLOY_DIR",
|
141
|
+
type: String,
|
142
|
+
default_value: "#{Apadmi::Grout::GitUtils.git_root}/build",
|
143
|
+
verify_block: proc do |value|
|
144
|
+
UI.user_error!("Didn't pass a valid output directory") unless value
|
145
|
+
end,
|
146
|
+
optional: false),
|
147
|
+
FastlaneCore::ConfigItem.new(key: :gradle_command,
|
148
|
+
description: "The gradle command e.g assembleRelease",
|
149
|
+
type: String,
|
150
|
+
verify_block: proc do |value|
|
151
|
+
UI.user_error!("Didn't pass a valid gradle command") unless value
|
152
|
+
end,
|
153
|
+
optional: false),
|
154
|
+
FastlaneCore::ConfigItem.new(key: :inject_signing_creds,
|
155
|
+
description: "Whether or not to inject the signing credentials",
|
156
|
+
type: Boolean,
|
157
|
+
default_value: true,
|
158
|
+
optional: true),
|
159
|
+
FastlaneCore::ConfigItem.new(key: :additional_config_properties,
|
160
|
+
description: "Config properties to be passed through to gradle",
|
161
|
+
type: Hash,
|
162
|
+
default_value: {},
|
163
|
+
optional: true)
|
164
|
+
] + Fastlane::Actions::GradleAction.available_options + fastlane_signing_properties
|
165
|
+
end
|
166
|
+
|
167
|
+
def self.is_supported?(platform)
|
168
|
+
platform == :android
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-apadmi_grout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apadmi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apadmi_grout
|
@@ -160,6 +160,7 @@ files:
|
|
160
160
|
- CHANGELOG.md
|
161
161
|
- LICENSE
|
162
162
|
- lib/fastlane/plugin/apadmi_grout.rb
|
163
|
+
- lib/fastlane/plugin/apadmi_grout/actions/build_apk_or_aab_action.rb
|
163
164
|
- lib/fastlane/plugin/apadmi_grout/actions/build_ipa_action.rb
|
164
165
|
- lib/fastlane/plugin/apadmi_grout/actions/find_tickets_to_move_action.rb
|
165
166
|
- lib/fastlane/plugin/apadmi_grout/actions/generate_release_notes_action.rb
|