Class: Fastlane::Actions::AndroidBuildPreflightAction

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

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



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

def self.authors
  ['Automattic']
end

.available_optionsObject



38
39
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 38

def self.available_options
end

.descriptionObject



30
31
32
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 30

def self.description
  'Clean the environment to ensure a safe build'
end

.detailsObject



34
35
36
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 34

def self.details
  'Clean the environment to ensure a safe build'
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


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

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

.outputObject



41
42
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 41

def self.output
end

.return_valueObject



44
45
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 44

def self.return_value
end

.run(params) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb', line 6

def self.run(params)
  # Validate mobile configuration secrets
  other_action.configure_apply

  # Check gems and pods are up to date. This will exit if it fails
  begin
    Action.sh('bundle check')
  rescue StandardError
    UI.user_error!("You should run 'bundle install' to make sure gems are up to date")
    raise
  end

  begin
    Action.sh('command -v bundletool > /dev/null')
  rescue StandardError
    UI.user_error!("bundletool is required to build the APKs. Install it with 'brew install bundletool'")
    raise
  end
end