Class: Fastlane::Actions::AndroidLaunchEmulatorAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



54
55
56
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb', line 54

def self.authors
  ['Automattic']
end

.available_optionsObject



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb', line 27

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :avd_name,
                                 env_name: 'FL_ANDROID_LAUNCH_EMULATOR_AVD_NAME',
                                 description: 'The name of the AVD to boot',
                                 type: String,
                                 optional: false),
    FastlaneCore::ConfigItem.new(key: :cold_boot,
                                 env_name: 'FL_ANDROID_LAUNCH_EMULATOR_COLD_BOOT',
                                 description: 'Indicate if we want a cold boot (true) of if we prefer booting from a snapshot (false)',
                                 type: Fastlane::Boolean,
                                 default_value: true),
    FastlaneCore::ConfigItem.new(key: :wipe_data,
                                 env_name: 'FL_ANDROID_LAUNCH_EMULATOR_WIPE_DATA',
                                 description: 'Indicate if we want to wipe the device data before booting the AVD, so it is like it were a brand new device',
                                 type: Fastlane::Boolean,
                                 default_value: true),
  ]
end

.descriptionObject



19
20
21
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb', line 19

def self.description
  'Boots an Android emulator using the given AVD name'
end

.detailsObject



23
24
25
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb', line 23

def self.details
  description
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb', line 58

def self.is_supported?(platform)
  platform == :android
end

.outputObject



47
48
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb', line 47

def self.output
end

.return_valueObject



50
51
52
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb', line 50

def self.return_value
  'The serial of the emulator that was created after booting the AVD (e.g. `emulator-5554`)'
end

.run(params) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_launch_emulator_action.rb', line 6

def self.run(params)
  helper = Fastlane::Helper::Android::EmulatorHelper.new
  helper.launch_avd(
    name: params[:avd_name],
    cold_boot: params[:cold_boot],
    wipe_data: params[:wipe_data]
  )
end