Fastfile 969 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # This is the minimum version number required.
  2. fastlane_version "2.58.0"
  3. lane :screenshotsPhone do
  4. build_for_screengrab()
  5. screengrab(
  6. device_type: "phone",
  7. app_apk_path: APK_LOCATION,
  8. tests_apk_path: TEST_APK_LOCATION
  9. )
  10. end
  11. lane :screenshotsTablet do
  12. build_for_screengrab()
  13. screengrab(
  14. device_type: "sevenInch",
  15. app_apk_path: APK_LOCATION,
  16. tests_apk_path: TEST_APK_LOCATION
  17. )
  18. end
  19. desc "Build debug and test APK for screenshots"
  20. private_lane :build_for_screengrab do
  21. build_android_app(
  22. task: 'assemble',
  23. flavor: 'Generic',
  24. build_type: 'Debug'
  25. )
  26. APK_LOCATION = lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS].select{ |i| i[/00/] }[0]
  27. build_android_app(
  28. task: 'assemble',
  29. flavor: 'Generic',
  30. build_type: 'DebugAndroidTest'
  31. )
  32. TEST_APK_LOCATION = lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS].select{ |i| i[/androidTest/] }[0]
  33. end