Sha256: 82a1c7cc8c319ec7c75a490074712964d1276e6589e475090f9054f689a1a397

Contents?: true

Size: 1.76 KB

Versions: 322

Compression:

Stored size: 1.76 KB

Contents

module Fastlane
  module Actions
    module SharedValues
      SCREENGRAB_OUTPUT_DIRECTORY = :SCREENGRAB_OUTPUT_DIRECTORY
    end

    class CaptureAndroidScreenshotsAction < Action
      def self.run(params)
        require 'screengrab'

        Screengrab.config = params
        Screengrab.android_environment = Screengrab::AndroidEnvironment.new(params[:android_home],
                                                                            params[:build_tools_version])
        Screengrab::DependencyChecker.check(Screengrab.android_environment)
        Screengrab::Runner.new.run

        Actions.lane_context[SharedValues::SCREENGRAB_OUTPUT_DIRECTORY] = File.expand_path(params[:output_directory])

        true
      end

      def self.description
        'Automated localized screenshots of your Android app (via _screengrab_)'
      end

      def self.available_options
        require 'screengrab'
        Screengrab::Options.available_options
      end

      def self.output
        [
          ['SCREENGRAB_OUTPUT_DIRECTORY', 'The path to the output directory']
        ]
      end

      def self.author
        ['asfalcone', 'i2amsam', 'mfurtak']
      end

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

      def self.example_code
        [
          'capture_android_screenshots',
          'screengrab # alias for "capture_android_screenshots"',
          'capture_android_screenshots(
            locales: ["en-US", "fr-FR", "ja-JP"],
            clear_previous_screenshots: true,
            app_apk_path: "build/outputs/apk/example-debug.apk",
            tests_apk_path: "build/outputs/apk/example-debug-androidTest-unaligned.apk"
          )'
        ]
      end

      def self.category
        :screenshots
      end
    end
  end
end

Version data entries

322 entries across 322 versions & 5 rubygems

Version Path
fastlane-2.129.0.beta.20190813200016 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190811200106 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190810200059 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190809200051 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190808200013 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190807200122 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190806200055 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190805200019 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190804200053 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190803200103 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190802200057 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190731200035 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190730200040 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190729200106 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190728200052 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190727200032 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190726200041 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.128.1 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190725200033 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.129.0.beta.20190723200012 fastlane/lib/fastlane/actions/capture_android_screenshots.rb