fastlane-plugin-cordova 2.1.0 → 3.1.1
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 +5 -5
- data/README.md +12 -0
- data/lib/fastlane/plugin/cordova/actions/cordova_action.rb +41 -12
- data/lib/fastlane/plugin/cordova/version.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a311aa07c88c18c9d77615dfada62ad35ff1062d523d7d44c848e4397926b2e9
|
4
|
+
data.tar.gz: fafa72d094004a5e162c91d063e02b5dbc0c3a08d2ffc1980e95b4c56916c348
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4b03580c3d6e272f207f32a8bdefa771858adbe724dc7573b0424ab91bc6d8c43006b7c406cc8b183cc9211759e2cafdc997bb762d8638d9342978503af5ce6
|
7
|
+
data.tar.gz: d2f6761bf1c57cc2b514beed26ba88649963836c98979a4d39860c50eff390a1980da0cd9c5d060d467daa4db2c965393a64421d037bca2989469a921b9d7469
|
data/README.md
CHANGED
@@ -41,6 +41,16 @@ platform :android do
|
|
41
41
|
keystore_password: 'password'
|
42
42
|
)
|
43
43
|
supply(apk: ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'])
|
44
|
+
|
45
|
+
# Alternatively, deploy an Android Application Bundle
|
46
|
+
# cordova(
|
47
|
+
# package_type: 'bundle',
|
48
|
+
# platform: 'android',
|
49
|
+
# keystore_path: './prod.keystore',
|
50
|
+
# keystore_alias: 'prod',
|
51
|
+
# keystore_password: 'password'
|
52
|
+
# )
|
53
|
+
# supply(aab: ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'])
|
44
54
|
end
|
45
55
|
end
|
46
56
|
```
|
@@ -81,6 +91,7 @@ Which will produce:
|
|
81
91
|
| **team_id** | The development team (Team ID) to use for code signing | CORDOVA_IOS_TEAM_ID | *28323HT* |
|
82
92
|
| **build_flag** | An array of Xcode buildFlag. Will be appended on compile command. | CORDOVA_IOS_BUILD_FLAG | [] |
|
83
93
|
| **provisioning_profile** | GUID of the provisioning profile to be used for signing | CORDOVA_IOS_PROVISIONING_PROFILE | |
|
94
|
+
| **package_type** | This will determine what type of Android build is generated. <br>Valid options are apk and bundle | CORDOVA_ANDROID_PACKAGE_TYPE | apk |
|
84
95
|
| **keystore_path** | Path to the Keystore for Android | CORDOVA_ANDROID_KEYSTORE_PATH | |
|
85
96
|
| **keystore_password** | Android Keystore password | CORDOVA_ANDROID_KEYSTORE_PASSWORD | |
|
86
97
|
| **key_password** | Android Key password (default is keystore password) | CORDOVA_ANDROID_KEY_PASSWORD | |
|
@@ -90,6 +101,7 @@ Which will produce:
|
|
90
101
|
| **browserify** | Specifies whether to browserify build or not | CORDOVA_BROWSERIFY | *false* |
|
91
102
|
| **cordova_prepare** | Specifies whether to run `cordova prepare` before building | CORDOVA_PREPARE | *true* |
|
92
103
|
| **cordova_no_fetch** | Specifies whether to run `cordova platform add` with `--nofetch` parameter | CORDOVA_NO_FETCH | *false* |
|
104
|
+
| **cordova_build_config_file** | Call `cordova compile` with `--buildConfig=<ConfigFile>` to specify build config file path | CORDOVA_BUILD_CONFIG_FILE | |
|
93
105
|
|
94
106
|
## Run tests for this plugin
|
95
107
|
|
@@ -13,7 +13,8 @@ module Fastlane
|
|
13
13
|
keystore_alias: 'alias',
|
14
14
|
build_number: 'versionCode',
|
15
15
|
min_sdk_version: 'gradleArg=-PcdvMinSdkVersion',
|
16
|
-
cordova_no_fetch: 'cordovaNoFetch'
|
16
|
+
cordova_no_fetch: 'cordovaNoFetch',
|
17
|
+
package_type: 'packageType'
|
17
18
|
}
|
18
19
|
|
19
20
|
IOS_ARGS_MAP = {
|
@@ -73,9 +74,9 @@ module Fastlane
|
|
73
74
|
platform = params[:platform]
|
74
75
|
if platform && !File.directory?("./platforms/#{platform}")
|
75
76
|
if params[:cordova_no_fetch]
|
76
|
-
sh "cordova platform add #{platform} --nofetch"
|
77
|
+
sh "npx --no-install cordova platform add #{platform} --nofetch"
|
77
78
|
else
|
78
|
-
sh "cordova platform add #{platform}"
|
79
|
+
sh "npx --no-install cordova platform add #{platform}"
|
79
80
|
end
|
80
81
|
end
|
81
82
|
end
|
@@ -89,11 +90,16 @@ module Fastlane
|
|
89
90
|
args = [params[:release] ? '--release' : '--debug']
|
90
91
|
args << '--device' if params[:device]
|
91
92
|
args << '--browserify' if params[:browserify]
|
93
|
+
|
94
|
+
if !params[:cordova_build_config_file].to_s.empty?
|
95
|
+
args << "--buildConfig=#{Shellwords.escape(params[:cordova_build_config_file])}"
|
96
|
+
end
|
97
|
+
|
92
98
|
android_args = self.get_android_args(params) if params[:platform].to_s == 'android'
|
93
99
|
ios_args = self.get_ios_args(params) if params[:platform].to_s == 'ios'
|
94
100
|
|
95
101
|
if params[:cordova_prepare]
|
96
|
-
sh "cordova prepare #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
|
102
|
+
sh "npx --no-install cordova prepare #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
|
97
103
|
end
|
98
104
|
|
99
105
|
if params[:platform].to_s == 'ios' && !params[:build_number].to_s.empty?
|
@@ -107,21 +113,26 @@ module Fastlane
|
|
107
113
|
)
|
108
114
|
end
|
109
115
|
|
110
|
-
sh "cordova compile #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
|
116
|
+
sh "npx --no-install cordova compile #{params[:platform]} #{args.join(' ')} #{ios_args} -- #{android_args}"
|
111
117
|
end
|
112
118
|
|
113
|
-
def self.set_build_paths(
|
119
|
+
def self.set_build_paths(params)
|
114
120
|
app_name = self.get_app_name()
|
115
|
-
build_type =
|
121
|
+
build_type = params[:release] ? 'release' : 'debug'
|
122
|
+
|
123
|
+
# Update the build path accordingly if Android is being
|
124
|
+
# built as an Android Application Bundle.
|
125
|
+
android_package_type = params[:package_type] || 'apk'
|
126
|
+
android_package_extension = android_package_type == 'bundle' ? '.aab' : '.apk'
|
116
127
|
|
117
|
-
ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'] = "./platforms/android/app/build/outputs/
|
128
|
+
ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'] = "./platforms/android/app/build/outputs/#{android_package_type}/#{build_type}/app-#{build_type}#{android_package_extension}"
|
118
129
|
ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'] = "./platforms/ios/build/device/#{app_name}.ipa"
|
119
130
|
end
|
120
131
|
|
121
132
|
def self.run(params)
|
122
133
|
self.check_platform(params)
|
123
134
|
self.build(params)
|
124
|
-
self.set_build_paths(params
|
135
|
+
self.set_build_paths(params)
|
125
136
|
end
|
126
137
|
|
127
138
|
#####################################################
|
@@ -192,6 +203,16 @@ module Fastlane
|
|
192
203
|
is_string: true,
|
193
204
|
default_value: ''
|
194
205
|
),
|
206
|
+
FastlaneCore::ConfigItem.new(
|
207
|
+
key: :package_type,
|
208
|
+
env_name: "CORDOVA_ANDROID_PACKAGE_TYPE",
|
209
|
+
description: "This will determine what type of Android build is generated. Valid options are apk or bundle",
|
210
|
+
is_string: true,
|
211
|
+
default_value: 'apk',
|
212
|
+
verify_block: proc do |value|
|
213
|
+
UI.user_error!("Valid options are apk or bundle.") unless ['apk', 'bundle'].include? value
|
214
|
+
end
|
215
|
+
),
|
195
216
|
FastlaneCore::ConfigItem.new(
|
196
217
|
key: :keystore_path,
|
197
218
|
env_name: "CORDOVA_ANDROID_KEYSTORE_PATH",
|
@@ -237,7 +258,7 @@ module Fastlane
|
|
237
258
|
FastlaneCore::ConfigItem.new(
|
238
259
|
key: :cordova_prepare,
|
239
260
|
env_name: "CORDOVA_PREPARE",
|
240
|
-
description: "Specifies whether to run `cordova prepare` before building",
|
261
|
+
description: "Specifies whether to run `npx cordova prepare` before building",
|
241
262
|
default_value: true,
|
242
263
|
is_string: false
|
243
264
|
),
|
@@ -251,7 +272,7 @@ module Fastlane
|
|
251
272
|
FastlaneCore::ConfigItem.new(
|
252
273
|
key: :cordova_no_fetch,
|
253
274
|
env_name: "CORDOVA_NO_FETCH",
|
254
|
-
description: "Call `cordova platform add` with `--nofetch` parameter",
|
275
|
+
description: "Call `npx cordova platform add` with `--nofetch` parameter",
|
255
276
|
default_value: false,
|
256
277
|
is_string: false
|
257
278
|
),
|
@@ -262,13 +283,21 @@ module Fastlane
|
|
262
283
|
is_string: false,
|
263
284
|
optional: true,
|
264
285
|
default_value: []
|
286
|
+
),
|
287
|
+
FastlaneCore::ConfigItem.new(
|
288
|
+
key: :cordova_build_config_file,
|
289
|
+
env_name: "CORDOVA_BUILD_CONFIG_FILE",
|
290
|
+
description: "Call `npx cordova compile` with `--buildConfig=<ConfigFile>` to specify build config file path",
|
291
|
+
is_string: true,
|
292
|
+
optional: true,
|
293
|
+
default_value: ''
|
265
294
|
)
|
266
295
|
]
|
267
296
|
end
|
268
297
|
|
269
298
|
def self.output
|
270
299
|
[
|
271
|
-
['CORDOVA_ANDROID_RELEASE_BUILD_PATH', 'Path to the signed release APK if it was generated'],
|
300
|
+
['CORDOVA_ANDROID_RELEASE_BUILD_PATH', 'Path to the signed release APK or AAB if it was generated'],
|
272
301
|
['CORDOVA_IOS_RELEASE_BUILD_PATH', 'Path to the signed release IPA if it was generated']
|
273
302
|
]
|
274
303
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-cordova
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Almouro
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 1.111.0
|
97
|
-
description:
|
97
|
+
description:
|
98
98
|
email: contact@almouro.com
|
99
99
|
executables: []
|
100
100
|
extensions: []
|
@@ -110,7 +110,7 @@ homepage: https://github.com/almouro/fastlane-plugin-cordova
|
|
110
110
|
licenses:
|
111
111
|
- MIT
|
112
112
|
metadata: {}
|
113
|
-
post_install_message:
|
113
|
+
post_install_message:
|
114
114
|
rdoc_options: []
|
115
115
|
require_paths:
|
116
116
|
- lib
|
@@ -125,9 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
|
-
|
129
|
-
|
130
|
-
signing_key:
|
128
|
+
rubygems_version: 3.1.2
|
129
|
+
signing_key:
|
131
130
|
specification_version: 4
|
132
131
|
summary: Build your Cordova app
|
133
132
|
test_files: []
|