fastlane-plugin-automated_test_emulator_run_next 1.0.1 → 1.0.4

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: 27b646d002da322ae2a1b3b78901c8c1bcd37ce1034101c6ee7d48a90c7f4d7e
4
- data.tar.gz: a1ca615cb563af564f750ec0248c5e8b48700f62035758f7b6899e487eeed826
3
+ metadata.gz: b1e9eacda79bae565a45ee9e440dec3f49c993ab122d4a07b4ddb2c87437cae7
4
+ data.tar.gz: a056936c9221780c2f71045fbcfad1fda05ab66a1ff858f8f21ef145fe95b7b8
5
5
  SHA512:
6
- metadata.gz: c4a7e1d9ec62d6dc7e29a87711f99354d65b6f35ab12529e8c71cc6d9679b28265224f34aeb5abc6280c9f30788062f44ae507bd69a18993b98d1fc1ea3374fa
7
- data.tar.gz: 33af3bd42137dc73fc7ffbb550efacbdbe4fd1b7e8b7823ab31784f74182d09a1435845c04369fb3ad3f3037f4d2d8fe472ce7a64baf699c6df486665677e32a
6
+ metadata.gz: ad053301fd5b2a935891536b782bd286d0cff55a24c1a02f512360c406ed439acfe0c8d23460bf33873a092b0d7afa0e3ae52041f872ac0c0b0be6eaf5f2e2e1
7
+ data.tar.gz: 2cdca4bb524bb4ce180dc21155ac7417b8dba5d4307882a7d91fe3f53cd57900514116300afea2baa60dd777da4572ffba8f35f9e600d26cf4240c6eb2d49c90
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # automated_test_emulator_run plugin
1
+ # automated_test_emulator_run_next plugin
2
2
 
3
- [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-automated_test_emulator_run)
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-automated_test_emulator_run_next)
4
4
 
5
5
  ## About this fork
6
6
 
@@ -14,10 +14,10 @@ Starts any number of AVDs. AVDs are created and configured automatically accordi
14
14
 
15
15
  This project is a [fastlane](https://github.com/fastlane/fastlane) plugin.
16
16
 
17
- 1. To get started with `fastlane-plugin-automated_test_emulator_run`, add it to your project by running:
17
+ 1. To get started with `fastlane-plugin-automated_test_emulator_run_next`, add it to your project by running:
18
18
 
19
19
  ```bash
20
- fastlane add_plugin automated_test_emulator_run
20
+ fastlane add_plugin automated_test_emulator_run_next
21
21
  ```
22
22
  2. Create your \*.JSON config file to create AVD launch plan according to schema below/provided example.
23
23
 
@@ -67,7 +67,16 @@ module Fastlane
67
67
  else
68
68
  # Create AVD
69
69
  UI.message(["AVD with name '", avd_schemes[i].avd_name, "' does not exist. Creating new AVD."].join("").yellow)
70
- Action.sh(avd_controllers[i].command_create_avd)
70
+ Action.sh(avd_controllers[i].command_create_avd, error_callback: lambda { |result|
71
+ if params[:install_missing_image] && result.include?("Error: Package path is not valid.")
72
+ UI.message("System image not found: attempting to install #{avd_schemes[i].create_avd_package}".yellow)
73
+ Action.sh(avd_controllers[i].command_install_image)
74
+ UI.success("System image successfully installed! creating new AVD #{avd_schemes[i].avd_name}")
75
+ Action.sh(avd_controllers[i].command_create_avd)
76
+ else
77
+ UI.user_error!(result)
78
+ end
79
+ })
71
80
  end
72
81
  end
73
82
 
@@ -392,10 +401,16 @@ module Fastlane
392
401
  optional: false),
393
402
  FastlaneCore::ConfigItem.new(key: :SDK_path,
394
403
  env_name: "SDK_PATH",
395
- description: "The path to your android sdk directory (root). ANDROID_SDK_HOME by default",
396
- default_value: ENV['ANDROID_SDK_HOME'] || ENV['ANDROID_HOME'],
404
+ description: "The path to your android sdk directory (root). ANDROID_SDK_ROOT by default",
405
+ default_value: ENV['ANDROID_SDK_ROOT'] || ENV['ANDROID_HOME'],
397
406
  is_string: true,
398
407
  optional: true),
408
+ FastlaneCore::ConfigItem.new(key: :install_missing_image,
409
+ env_name: "AVD_INSTALL_MISSING_IMAGE",
410
+ description: "Enable to allow plugin to attempt to install any missing system images configured in the json setup",
411
+ default_value: false,
412
+ is_string: false,
413
+ optional: true),
399
414
 
400
415
 
401
416
  #launch config params
@@ -477,6 +492,7 @@ module Fastlane
477
492
  env_name: "LANE_PLATFORM",
478
493
  description: "The platform of the lane you want to execute",
479
494
  conflicting_options: [:shell_command, :gradle_task],
495
+ default_value: 'android',
480
496
  is_string: true,
481
497
  optional: true),
482
498
  FastlaneCore::ConfigItem.new(key: :lane_options,
@@ -59,4 +59,4 @@ module Fastlane
59
59
  end
60
60
  end
61
61
  end
62
- end
62
+ end
@@ -5,7 +5,7 @@ module Fastlane
5
5
 
6
6
  class AVD_Controller
7
7
  attr_accessor :command_create_avd, :command_start_avd, :command_delete_avd, :command_apply_config_avd, :command_get_property, :command_kill_device,
8
- :output_file
8
+ :command_install_image, :output_file
9
9
 
10
10
  def self.create_output_file(params)
11
11
  output_file = Tempfile.new('emulator_output', '#{params[:AVD_path]}')
@@ -122,8 +122,14 @@ module Fastlane
122
122
  sh_kill_device,
123
123
  "&>/dev/null"].join(" ")
124
124
 
125
+ avd_controller.command_install_image = [
126
+ 'yes |', # accept any license prompts
127
+ sdk_helper.sdk_manager,
128
+ "'#{avd_scheme.create_avd_package}'"
129
+ ].join(" ")
130
+
125
131
  return avd_controller
126
132
  end
127
133
  end
128
134
  end
129
- end
135
+ end
@@ -30,6 +30,10 @@ module Fastlane
30
30
  def avd_manager
31
31
  return "#{command_line_tools_dir}/avdmanager"
32
32
  end
33
+
34
+ def sdk_manager
35
+ return "#{command_line_tools_dir}/sdkmanager"
36
+ end
33
37
  end
34
38
  end
35
39
  end
@@ -169,4 +169,4 @@ module Fastlane
169
169
  end
170
170
  end
171
171
  end
172
- end
172
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- module AutomatedTestEmulatorRun
3
- VERSION = "1.0.1"
2
+ module AutomatedTestEmulatorRunNext
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-automated_test_emulator_run_next
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroto Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-01 00:00:00.000000000 Z
11
+ date: 2022-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  requirements: []
131
- rubygems_version: 3.1.6
131
+ rubygems_version: 3.0.3.1
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Starts multiple AVDs based on JSON file config. AVDs are created and configured