Class: Fastlane::Actions::AndroidGetValueFromBuildAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::AndroidGetValueFromBuildAction
- Defined in:
- lib/fastlane/plugin/android_version_manager/actions/android_get_value_from_build_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
31 32 33 |
# File 'lib/fastlane/plugin/android_version_manager/actions/android_get_value_from_build_action.rb', line 31 def self. ["Jonathan Cardoso", "@_jonathancardos", "JCMais"] end |
.available_options ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fastlane/plugin/android_version_manager/actions/android_get_value_from_build_action.rb', line 14 def self. [ FastlaneCore::ConfigItem.new(key: :app_project_dir, description: "The path to the application source folder in the Android project, the one that contains the build.gradle file (default: android/app)", optional: true, type: String, default_value: "android/app", verify_block: proc do |value| # Not using File.exist?("#{value}/build.gradle") because it does not handle globs UI.user_error!("Couldn't find build.gradle file at path '#{value}'") unless Dir["#{value}/build.gradle"].any? end), FastlaneCore::ConfigItem.new(key: :key, description: "The property key to retrieve the value from", type: String), ] end |
.is_supported?(platform) ⇒ Boolean
35 36 37 |
# File 'lib/fastlane/plugin/android_version_manager/actions/android_get_value_from_build_action.rb', line 35 def self.is_supported?(platform) platform == :android end |
.run(params) ⇒ Object
8 9 10 11 12 |
# File 'lib/fastlane/plugin/android_version_manager/actions/android_get_value_from_build_action.rb', line 8 def self.run(params) app_project_dir ||= params[:app_project_dir] value, _line, _line_index = Helper::AndroidVersionManagerHelper.get_key_from_gradle_file("#{app_project_dir}/build.gradle", params[:key]) return value end |