Class: Fastlane::Actions::AdbAction

Inherits:
Fastlane::Action show all
Defined in:
lib/fastlane/actions/adb.rb

Documentation collapse

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, author, sh, step_text

Class Method Details

.authorsObject



56
57
58
# File 'lib/fastlane/actions/adb.rb', line 56

def self.authors
  ["hjanuschka"]
end

.available_optionsObject



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

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :serial,
                                 env_name: "FL_ANDROID_SERIAL",
                                 description: "Android serial, which device should be used for this command",
                                 is_string: true,
                                 default_value: ""),
    FastlaneCore::ConfigItem.new(key: :command,
                                 env_name: "FL_ADB_COMMAND",
                                 description: "All commands you want to pass to the adb command, e.g. `kill-server`",
                                 optional: true,
                                 is_string: true),
    FastlaneCore::ConfigItem.new(key: :adb_path,
                                 env_name: "FL_ADB_PATH",
                                 optional: true,
                                 description: "The path to your `adb` binary",
                                 is_string: true,
                                 default_value: "adb"
                                )
  ]
end

.descriptionObject



17
18
19
# File 'lib/fastlane/actions/adb.rb', line 17

def self.description
  "Run ADB Actions"
end

.detailsObject



21
22
23
24
25
# File 'lib/fastlane/actions/adb.rb', line 21

def self.details
  [
    "see adb --help for more details"
  ].join("\n")
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/fastlane/actions/adb.rb', line 60

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

.outputObject



49
50
# File 'lib/fastlane/actions/adb.rb', line 49

def self.output
end

.return_valueObject



52
53
54
# File 'lib/fastlane/actions/adb.rb', line 52

def self.return_value
  "The output of the adb command"
end

.run(params) ⇒ Object



7
8
9
10
11
# File 'lib/fastlane/actions/adb.rb', line 7

def self.run(params)
  adb = Helper::AdbHelper.new(adb_path: params[:adb_path])
  result = adb.trigger(command: params[:command], serial: params[:serial])
  return result
end