Class: Fastlane::Actions::GetVersionNameAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/android_versioning_kts/actions/get_version_name.rb

Documentation collapse

Class Method Summary collapse

Class Method Details

.authorsObject



57
58
59
# File 'lib/fastlane/plugin/android_versioning_kts/actions/get_version_name.rb', line 57

def self.authors
  ['zmunm']
end

.available_optionsObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/fastlane/plugin/android_versioning_kts/actions/get_version_name.rb', line 20

def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :app_project_dir,
      env_name: 'ANDROID_VERSIONING_APP_PROJECT_DIR',
      description: 'The path to the application source folder in the Android project (default: android/app)',
      optional: true,
      type: String,
      default_value: 'android/app'
    ),
    FastlaneCore::ConfigItem.new(
      key: :flavor,
      env_name: 'ANDROID_VERSIONING_FLAVOR',
      description: 'The product flavor name (optional)',
      optional: true,
      type: String
    )
  ]
end

.descriptionObject



40
41
42
# File 'lib/fastlane/plugin/android_versioning_kts/actions/get_version_name.rb', line 40

def self.description
  'Get the version name of your project'
end

.detailsObject



44
45
46
47
48
49
# File 'lib/fastlane/plugin/android_versioning_kts/actions/get_version_name.rb', line 44

def self.details
  [
    "This action will return the current version name set
      on your project's build.gradle.kts."
  ].join(' ')
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/fastlane/plugin/android_versioning_kts/actions/get_version_name.rb', line 61

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

.outputObject



51
52
53
54
55
# File 'lib/fastlane/plugin/android_versioning_kts/actions/get_version_name.rb', line 51

def self.output
  [
    ['VERSION_NAME', 'The version name']
  ]
end

.run(params) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/fastlane/plugin/android_versioning_kts/actions/get_version_name.rb', line 8

def self.run(params)
  GetValueFromBuildAction.run(
    app_project_dir: params[:app_project_dir],
    flavor: params[:flavor],
    key: 'versionName',
    type: 'param'
  )
end