Sha256: 5ebb8c630b5cf2404ce1fd0405bfcda3b3344e2e49c97a48df62d862234eb6c4

Contents?: true

Size: 1.63 KB

Versions: 388

Compression:

Stored size: 1.63 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.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

388 entries across 388 versions & 1 rubygems

Version Path
fastlane-2.120.0.beta.20190407200059 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190406200021 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190405200012 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190404200009 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190403200039 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190402200013 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190401200056 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190331200023 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190330200100 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190329200012 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190328200010 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190327200117 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190326200014 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.120.0.beta.20190325200020 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.119.0 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.119.0.beta.20190324200014 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.119.0.beta.20190323200019 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.119.0.beta.20190322200024 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.119.0.beta.20190321200022 fastlane/lib/fastlane/actions/capture_android_screenshots.rb
fastlane-2.119.0.beta.20190320200107 fastlane/lib/fastlane/actions/capture_android_screenshots.rb