fastlane-plugin-ionic_capacitor 0.1.0
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +52 -0
- data/lib/fastlane/plugin/ionic_capacitor/actions/ionic_capacitor_action.rb +399 -0
- data/lib/fastlane/plugin/ionic_capacitor/helper/ionic_capacitor_helper.rb +16 -0
- data/lib/fastlane/plugin/ionic_capacitor/version.rb +5 -0
- data/lib/fastlane/plugin/ionic_capacitor.rb +16 -0
- metadata +49 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 369c777d2a7e9ff337db29966bd4230e6d1a394e81de3121552b6f7631f95273
|
4
|
+
data.tar.gz: 2e45132fc722bd51b38d2eef689076f1282e42b58cf9b1bca35eca2296cc91d6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 014fd5ee7fe4131da068f1d718f7621a01daa8a69da399af62419edacf9f7abe610904c88e4e68ed7d329814a412bd72bbb95a967f6c3928f73ab862588bd40d
|
7
|
+
data.tar.gz: b588a15afcd6c56773989d7f14b0d9b72c03d640c69cc15a78b1b40bb23576fa5f85a010f2e575d6ae7f2f059dd812effdcf262b91d3cd3bf60c151fe25a0a04
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2024 ThatzOkay <noduhgamingxd@gmail.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
|
+
# ionic_capacitor plugin
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/fastlane-plugin-ionic_capacitor)
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-ionic_capacitor`, add it to your project by running:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
fastlane add_plugin ionic_capacitor
|
11
|
+
```
|
12
|
+
|
13
|
+
## About ionic_capacitor
|
14
|
+
|
15
|
+
Build ionic capacitor apps
|
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,399 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require_relative '../helper/ionic_capacitor_helper'
|
3
|
+
|
4
|
+
module Fastlane
|
5
|
+
module Actions
|
6
|
+
class IonicCapacitorAction < Action
|
7
|
+
# valid action params
|
8
|
+
|
9
|
+
ANDROID_ARGS_MAP = {
|
10
|
+
keystore_path: 'keystore',
|
11
|
+
keystore_password: 'storePassword',
|
12
|
+
key_password: 'password',
|
13
|
+
keystore_alias: 'alias',
|
14
|
+
build_number: 'versionCode',
|
15
|
+
min_sdk_version: 'gradleArg=-PcdvMinSdkVersion',
|
16
|
+
capacitor_no_fetch: 'capacitorNoFetch',
|
17
|
+
android_package_type: 'packageType'
|
18
|
+
}
|
19
|
+
|
20
|
+
IOS_ARGS_MAP = {
|
21
|
+
scheme: 'scheme',
|
22
|
+
type: 'packageType',
|
23
|
+
team_id: 'developmentTeam',
|
24
|
+
provisioning_profile: 'provisioningProfile',
|
25
|
+
build_flag: 'buildFlag'
|
26
|
+
}
|
27
|
+
|
28
|
+
# extract arguments only valid for the platform from all arguments
|
29
|
+
# + map action params to the cli param they will be used for
|
30
|
+
def self.get_platform_args(params, platform_args_map)
|
31
|
+
platform_args = []
|
32
|
+
platform_args_map.each do |action_key, cli_param|
|
33
|
+
param_value = params[action_key]
|
34
|
+
|
35
|
+
# handle `build_flag` being an Array
|
36
|
+
if action_key.to_s == 'build_flag' && param_value.kind_of?(Array)
|
37
|
+
unless param_value.empty?
|
38
|
+
param_value.each do |flag|
|
39
|
+
platform_args << "--#{cli_param}=#{flag.shellescape}"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
# handle all other cases
|
43
|
+
else
|
44
|
+
if !param_value.to_s.empty? && param_value.kind_of?(String)
|
45
|
+
platform_args << "--#{cli_param}=#{param_value.shellescape}"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
return platform_args.join(' ')
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.get_android_args(params)
|
54
|
+
if params[:key_password].empty?
|
55
|
+
params[:key_password] = params[:keystore_password]
|
56
|
+
end
|
57
|
+
|
58
|
+
return self.get_platform_args(params, ANDROID_ARGS_MAP)
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.get_ios_args(params)
|
62
|
+
app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
|
63
|
+
|
64
|
+
if params[:provisioning_profile].empty?
|
65
|
+
# If `match` or `sigh` were used before this, use the certificates returned from there
|
66
|
+
params[:provisioning_profile] = ENV['SIGH_UUID'] || ENV["sigh_#{app_identifier}_#{params[:type].sub('-', '')}"]
|
67
|
+
end
|
68
|
+
|
69
|
+
if params[:type] == 'adhoc'
|
70
|
+
params[:type] = 'ad-hoc'
|
71
|
+
end
|
72
|
+
if params[:type] == 'appstore'
|
73
|
+
params[:type] = 'app-store'
|
74
|
+
end
|
75
|
+
|
76
|
+
return self.get_platform_args(params, IOS_ARGS_MAP)
|
77
|
+
end
|
78
|
+
|
79
|
+
# add platform if missing (run step #1)
|
80
|
+
def self.check_platform(params)
|
81
|
+
platform = params[:platform]
|
82
|
+
args = []
|
83
|
+
args << '--nofetch' if params[:capacitor_no_fetch]
|
84
|
+
args << '--no-resources' if params[:capacitor_no_resources]
|
85
|
+
if platform && !File.directory?("./#{platform}")
|
86
|
+
sh "ionic capacitor platform add #{platform} --no-interactive #{args.join(' ')}"
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# app_name
|
91
|
+
def self.get_app_name
|
92
|
+
config = JSON.parse(File.read('ionic.config.json'))
|
93
|
+
return config['name']
|
94
|
+
end
|
95
|
+
|
96
|
+
# actual building! (run step #2)
|
97
|
+
def self.build(params)
|
98
|
+
args = [params[:release] ? '--prod' : '--debug']
|
99
|
+
args << '--device' if params[:device]
|
100
|
+
args << '--prod' if params[:prod]
|
101
|
+
args << '--browserify' if params[:browserify]
|
102
|
+
args << '--verbose' if params[:verbose]
|
103
|
+
|
104
|
+
if !params[:capacitor_build_config_file].to_s.empty?
|
105
|
+
args << "--buildConfig=#{Shellwords.escape(params[:capacitor_build_config_file])}"
|
106
|
+
end
|
107
|
+
|
108
|
+
android_args = self.get_android_args(params) if params[:platform].to_s == 'android'
|
109
|
+
ios_args = self.get_ios_args(params) if params[:platform].to_s == 'ios'
|
110
|
+
|
111
|
+
# special handling for `build_number` param
|
112
|
+
if params[:platform].to_s == 'ios' && !params[:build_number].to_s.empty?
|
113
|
+
cf_bundle_version = params[:build_number].to_s
|
114
|
+
Actions::UpdateInfoPlistAction.run(
|
115
|
+
xcodeproj: "./ios/#{self.get_app_name}.xcodeproj",
|
116
|
+
plist_path: "#{self.get_app_name}/#{self.get_app_name}-Info.plist",
|
117
|
+
block: lambda { |plist|
|
118
|
+
plist['CFBundleVersion'] = cf_bundle_version
|
119
|
+
}
|
120
|
+
)
|
121
|
+
end
|
122
|
+
|
123
|
+
is_windows = (ENV['OS'] == 'Windows_NT')
|
124
|
+
if is_windows
|
125
|
+
output = `powershell -Command "(gcm bunx).Path"`
|
126
|
+
if !output.empty?
|
127
|
+
if `bun pm ls`.include?('@capacitor/assets')
|
128
|
+
sh "bunx capacitor-assets generate"
|
129
|
+
end
|
130
|
+
else
|
131
|
+
if `npm list @capacitor/assets`.include?('@capacitor/assets')
|
132
|
+
sh "npx capacitor-assets generate"
|
133
|
+
end
|
134
|
+
end
|
135
|
+
else
|
136
|
+
if !`which bunx`.empty?
|
137
|
+
if `bun pm ls`.include?('@capacitor/assets')
|
138
|
+
sh "bunx capacitor-assets generate"
|
139
|
+
end
|
140
|
+
else
|
141
|
+
if `npm list @capacitor/assets`.include?('@capacitor/assets')
|
142
|
+
sh "npx capacitor-assets generate"
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
if params[:platform].to_s == 'ios'
|
148
|
+
sh "ionic capacitor build #{params[:platform]} --no-open --no-interactive #{args.join(' ')} -- #{ios_args}"
|
149
|
+
sh "xcodebuild -configuration debug -workspace ios/*.xcworkspace -scheme #{params[:scheme]} build"
|
150
|
+
elsif params[:platform].to_s == 'android'
|
151
|
+
sh "ionic capacitor build #{params[:platform]} --no-open --no-interactive #{args.join(' ')} -- -- #{android_args}"
|
152
|
+
if params[:android_package_type] == 'bundle'
|
153
|
+
if !params[:keystore_path].empty?
|
154
|
+
sh "./android/gradlew --project-dir android app:bundleRelease -Pandroid.injected.signing.store.file=#{params[:keystore_path]} -Pandroid.injected.signing.store.password=#{params[:keystore_password]} -Pandroid.injected.signing.key.alias=#{params[:keystore_alias]} -Pandroid.injected.signing.key.password=#{params[:key_password]}"
|
155
|
+
else
|
156
|
+
sh "./android/gradlew --project-dir android app:bundleRelease"
|
157
|
+
end
|
158
|
+
else
|
159
|
+
if !params[:keystore_path].empty?
|
160
|
+
sh "./android/gradlew --project-dir android app:assembleRelease -Pandroid.injected.signing.store.file=#{params[:keystore_path]} -Pandroid.injected.signing.store.password=#{params[:keystore_password]} -Pandroid.injected.signing.key.alias=#{params[:keystore_alias]} -Pandroid.injected.signing.key.password=#{params[:key_password]}"
|
161
|
+
else
|
162
|
+
sh "./android/gradlew --project-dir android app:assembleRelease"
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
# export build paths (run step #3)
|
169
|
+
def self.set_build_paths(params, is_release)
|
170
|
+
app_name = self.get_app_name
|
171
|
+
build_type = is_release ? 'release' : 'debug'
|
172
|
+
|
173
|
+
# Update the build path accordingly if Android is being
|
174
|
+
# built as an Android Application Bundle.
|
175
|
+
|
176
|
+
android_package_type = params[:android_package_type] || 'apk'
|
177
|
+
android_package_extension = android_package_type == 'bundle' ? '.aab' : '.apk'
|
178
|
+
|
179
|
+
is_signed = !params[:keystore_path].empty?
|
180
|
+
signed = is_signed ? '' : '-unsigned'
|
181
|
+
|
182
|
+
ENV['CAPACITOR_ANDROID_RELEASE_BUILD_PATH'] = "./android/app/build/outputs/#{android_package_type}/#{build_type}/app-#{build_type}#{signed}#{android_package_extension}"
|
183
|
+
ENV['CAPACITOR_IOS_RELEASE_BUILD_PATH'] = "./ios/build/device/app.ipa"
|
184
|
+
end
|
185
|
+
|
186
|
+
def self.run(params)
|
187
|
+
self.check_platform(params)
|
188
|
+
self.build(params)
|
189
|
+
self.set_build_paths(params, params[:release])
|
190
|
+
end
|
191
|
+
|
192
|
+
def self.description
|
193
|
+
"Build your Ionic Capacitor apps"
|
194
|
+
end
|
195
|
+
|
196
|
+
def self.authors
|
197
|
+
["ThatzOkay"]
|
198
|
+
end
|
199
|
+
|
200
|
+
def self.return_value
|
201
|
+
# If your method provides a return value, you can describe here what it does
|
202
|
+
end
|
203
|
+
|
204
|
+
def self.details
|
205
|
+
# Optional:
|
206
|
+
"Easily build Ionic Capacitor apps using this plugin. Cordova not supported"
|
207
|
+
end
|
208
|
+
|
209
|
+
def self.available_options
|
210
|
+
[
|
211
|
+
FastlaneCore::ConfigItem.new(
|
212
|
+
key: :platform,
|
213
|
+
env_name: "CAPACITOR_PLATFORM",
|
214
|
+
description: "Platform to build on. Should be either android or ios",
|
215
|
+
is_string: true,
|
216
|
+
default_value: '',
|
217
|
+
verify_block: proc do |value|
|
218
|
+
UI.user_error!("Platform should be either android or ios") unless ['', 'android', 'ios'].include? value
|
219
|
+
end
|
220
|
+
),
|
221
|
+
FastlaneCore::ConfigItem.new(
|
222
|
+
key: :release,
|
223
|
+
env_name: "CAPACITOR_RELEASE",
|
224
|
+
description: "Build for release if true, or for debug if false",
|
225
|
+
is_string: false,
|
226
|
+
default_value: true,
|
227
|
+
verify_block: proc do |value|
|
228
|
+
UI.user_error!("Release should be boolean") unless [false, true].include? value
|
229
|
+
end
|
230
|
+
),
|
231
|
+
FastlaneCore::ConfigItem.new(
|
232
|
+
key: :device,
|
233
|
+
env_name: "CAPACITOR_DEVICE",
|
234
|
+
description: "Build for device",
|
235
|
+
is_string: false,
|
236
|
+
default_value: true,
|
237
|
+
verify_block: proc do |value|
|
238
|
+
UI.user_error!("Device should be boolean") unless [false, true].include? value
|
239
|
+
end
|
240
|
+
),
|
241
|
+
FastlaneCore::ConfigItem.new(
|
242
|
+
key: :prod,
|
243
|
+
env_name: "IONIC_PROD",
|
244
|
+
description: "Build for production",
|
245
|
+
is_string: false,
|
246
|
+
default_value: false,
|
247
|
+
verify_block: proc do |value|
|
248
|
+
UI.user_error!("Prod should be boolean") unless [false, true].include? value
|
249
|
+
end
|
250
|
+
),
|
251
|
+
FastlaneCore::ConfigItem.new(
|
252
|
+
key: :scheme,
|
253
|
+
env_name: "CAPACITOR_IOS_SCHEME",
|
254
|
+
description: "The scheme to use when building the app",
|
255
|
+
is_string: true,
|
256
|
+
default_value: 'App'
|
257
|
+
),
|
258
|
+
FastlaneCore::ConfigItem.new(
|
259
|
+
key: :type,
|
260
|
+
env_name: "CAPACITOR_IOS_PACKAGE_TYPE",
|
261
|
+
description: "This will determine what type of build is generated by Xcode. Valid options are development, enterprise, adhoc, and appstore",
|
262
|
+
is_string: true,
|
263
|
+
default_value: 'appstore',
|
264
|
+
verify_block: proc do |value|
|
265
|
+
UI.user_error!("Valid options are development, enterprise, adhoc, and appstore.") unless ['development', 'enterprise', 'adhoc', 'appstore', 'ad-hoc', 'app-store'].include? value
|
266
|
+
end
|
267
|
+
),
|
268
|
+
FastlaneCore::ConfigItem.new(
|
269
|
+
key: :verbose,
|
270
|
+
env_name: "CAPACITOR_VERBOSE",
|
271
|
+
description: "Pipe out more verbose output to the shell",
|
272
|
+
default_value: false,
|
273
|
+
is_string: false,
|
274
|
+
verify_block: proc do |value|
|
275
|
+
UI.user_error!("Verbose should be boolean") unless [false, true].include? value
|
276
|
+
end
|
277
|
+
),
|
278
|
+
FastlaneCore::ConfigItem.new(
|
279
|
+
key: :team_id,
|
280
|
+
env_name: "CAPACITOR_IOS_TEAM_ID",
|
281
|
+
description: "The development team (Team ID) to use for code signing",
|
282
|
+
is_string: true,
|
283
|
+
default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
|
284
|
+
),
|
285
|
+
FastlaneCore::ConfigItem.new(
|
286
|
+
key: :provisioning_profile,
|
287
|
+
env_name: "CAPACITOR_IOS_PROVISIONING_PROFILE",
|
288
|
+
description: "GUID of the provisioning profile to be used for signing",
|
289
|
+
is_string: true,
|
290
|
+
default_value: ''
|
291
|
+
),
|
292
|
+
FastlaneCore::ConfigItem.new(
|
293
|
+
key: :android_package_type,
|
294
|
+
env_name: "CAPACITOR_ANDROID_PACKAGE_TYPE",
|
295
|
+
description: "This will determine what type of Android build is generated. Valid options are apk or bundle",
|
296
|
+
default_value: 'apk',
|
297
|
+
verify_block: proc do |value|
|
298
|
+
UI.user_error!("Valid options are apk or bundle.") unless ['apk', 'bundle'].include? value
|
299
|
+
end
|
300
|
+
),
|
301
|
+
FastlaneCore::ConfigItem.new(
|
302
|
+
key: :keystore_path,
|
303
|
+
env_name: "CAPACITOR_ANDROID_KEYSTORE_PATH",
|
304
|
+
description: "Path to the Keystore for Android",
|
305
|
+
is_string: true,
|
306
|
+
default_value: ''
|
307
|
+
),
|
308
|
+
FastlaneCore::ConfigItem.new(
|
309
|
+
key: :keystore_password,
|
310
|
+
env_name: "CAPACITOR_ANDROID_KEYSTORE_PASSWORD",
|
311
|
+
description: "Android Keystore password",
|
312
|
+
is_string: true,
|
313
|
+
default_value: ''
|
314
|
+
),
|
315
|
+
FastlaneCore::ConfigItem.new(
|
316
|
+
key: :key_password,
|
317
|
+
env_name: "CAPACITOR_ANDROID_KEY_PASSWORD",
|
318
|
+
description: "Android Key password (default is keystore password)",
|
319
|
+
is_string: true,
|
320
|
+
default_value: ''
|
321
|
+
),
|
322
|
+
FastlaneCore::ConfigItem.new(
|
323
|
+
key: :keystore_alias,
|
324
|
+
env_name: "CAPACITOR_ANDROID_KEYSTORE_ALIAS",
|
325
|
+
description: "Android Keystore alias",
|
326
|
+
is_string: true,
|
327
|
+
default_value: ''
|
328
|
+
),
|
329
|
+
FastlaneCore::ConfigItem.new(
|
330
|
+
key: :build_number,
|
331
|
+
env_name: "CAPACITOR_BUILD_NUMBER",
|
332
|
+
description: "Sets the build number for iOS and version code for Android",
|
333
|
+
optional: true,
|
334
|
+
is_string: false
|
335
|
+
),
|
336
|
+
FastlaneCore::ConfigItem.new(
|
337
|
+
key: :browserify,
|
338
|
+
env_name: "CAPACITOR_BROWSERIFY",
|
339
|
+
description: "Specifies whether to browserify build or not",
|
340
|
+
default_value: false,
|
341
|
+
is_string: false
|
342
|
+
),
|
343
|
+
FastlaneCore::ConfigItem.new(
|
344
|
+
key: :capacitor_prepare,
|
345
|
+
env_name: "CAPACITOR_PREPARE",
|
346
|
+
description: "Specifies whether to run `ionic capacitor prepare` before building",
|
347
|
+
default_value: true,
|
348
|
+
is_string: false
|
349
|
+
),
|
350
|
+
FastlaneCore::ConfigItem.new(
|
351
|
+
key: :min_sdk_version,
|
352
|
+
env_name: "CAPACITOR_ANDROID_MIN_SDK_VERSION",
|
353
|
+
description: "Overrides the value of minSdkVersion set in AndroidManifest.xml",
|
354
|
+
default_value: '',
|
355
|
+
is_string: false
|
356
|
+
),
|
357
|
+
FastlaneCore::ConfigItem.new(
|
358
|
+
key: :capacitor_no_fetch,
|
359
|
+
env_name: "CAPACITOR_NO_FETCH",
|
360
|
+
description: "Call `capacitor platform add` with `--nofetch` parameter",
|
361
|
+
default_value: false,
|
362
|
+
is_string: false
|
363
|
+
),
|
364
|
+
FastlaneCore::ConfigItem.new(
|
365
|
+
key: :capacitor_no_resources,
|
366
|
+
env_name: "CAPACITOR_NO_RESOURCES",
|
367
|
+
description: "Call `capacitor platform add` with `--no-resources` parameter",
|
368
|
+
default_value: false,
|
369
|
+
is_string: false
|
370
|
+
),
|
371
|
+
FastlaneCore::ConfigItem.new(
|
372
|
+
key: :build_flag,
|
373
|
+
env_name: "CAPACITOR_IOS_BUILD_FLAG",
|
374
|
+
description: "An array of Xcode buildFlag. Will be appended on compile command",
|
375
|
+
is_string: false,
|
376
|
+
optional: true,
|
377
|
+
default_value: []
|
378
|
+
),
|
379
|
+
FastlaneCore::ConfigItem.new(
|
380
|
+
key: :capacitor_build_config_file,
|
381
|
+
env_name: "CAPACITOR_BUILD_CONFIG_FILE",
|
382
|
+
description: "Call `ionic capacitor compile` with `--buildConfig=<ConfigFile>` to specify build config file path",
|
383
|
+
is_string: true,
|
384
|
+
optional: true,
|
385
|
+
default_value: ''
|
386
|
+
)
|
387
|
+
]
|
388
|
+
end
|
389
|
+
|
390
|
+
def self.is_supported?(platform)
|
391
|
+
# Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
|
392
|
+
# See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
|
393
|
+
#
|
394
|
+
# [:ios, :mac, :android].include?(platform)
|
395
|
+
true
|
396
|
+
end
|
397
|
+
end
|
398
|
+
end
|
399
|
+
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 IonicCapacitorHelper
|
8
|
+
# class methods that you define here become available in your action
|
9
|
+
# as `Helper::IonicCapacitorHelper.your_method`
|
10
|
+
#
|
11
|
+
def self.show_message
|
12
|
+
UI.message("Hello from the ionic_capacitor plugin helper!")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'fastlane/plugin/ionic_capacitor/version'
|
2
|
+
|
3
|
+
module Fastlane
|
4
|
+
module IonicCapacitor
|
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::IonicCapacitor.all_classes.each do |current|
|
15
|
+
require current
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fastlane-plugin-ionic_capacitor
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ThatzOkay
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-06-27 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description:
|
14
|
+
email: noduhgamingxd@gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- LICENSE
|
20
|
+
- README.md
|
21
|
+
- lib/fastlane/plugin/ionic_capacitor.rb
|
22
|
+
- lib/fastlane/plugin/ionic_capacitor/actions/ionic_capacitor_action.rb
|
23
|
+
- lib/fastlane/plugin/ionic_capacitor/helper/ionic_capacitor_helper.rb
|
24
|
+
- lib/fastlane/plugin/ionic_capacitor/version.rb
|
25
|
+
homepage: https://github.com/ThatzOkay/fastlane-plugin-ionic_capacitor
|
26
|
+
licenses:
|
27
|
+
- MIT
|
28
|
+
metadata:
|
29
|
+
rubygems_mfa_required: 'true'
|
30
|
+
post_install_message:
|
31
|
+
rdoc_options: []
|
32
|
+
require_paths:
|
33
|
+
- lib
|
34
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - ">="
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '2.6'
|
39
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
requirements: []
|
45
|
+
rubygems_version: 3.5.11
|
46
|
+
signing_key:
|
47
|
+
specification_version: 4
|
48
|
+
summary: Build ionic capacitor apps
|
49
|
+
test_files: []
|