Skip to content

Commit

Permalink
improve fastlane screenshots script
Browse files Browse the repository at this point in the history
  • Loading branch information
c99koder committed Mar 29, 2019
1 parent 0e50274 commit 29de37a
Show file tree
Hide file tree
Showing 6 changed files with 424 additions and 156 deletions.
43 changes: 25 additions & 18 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ platform :android do
lane :screenshots do
json_key = "./key.json"

gradle(task: "clean")
build_android_app(
task: 'assemble',
build_type: 'Mockdata'
)
build_android_app(
task: 'assemble',
build_type: 'AndroidTest'
)
# gradle(task: "clean")
# build_android_app(
# task: 'assemble',
# build_type: 'Mockdata'
# )
# build_android_app(
# task: 'assemble',
# build_type: 'AndroidTest'
# )

sh("../start-emulators.sh")
sh("../start-emulator.sh Nexus_S_API_O")

capture_android_screenshots(
clear_previous_screenshots: true,
Expand Down Expand Up @@ -86,7 +86,11 @@ platform :android do
device_type: "phone",
specific_device: "emulator-5580"
)

sh("../start-emulator.sh Nexus_7_API_O")

capture_android_screenshots(
clear_previous_screenshots: true,
skip_open_summary: true,
app_apk_path: "build/outputs/apk/mockdata/irccloud-android-mockdata.apk",
tests_apk_path: "build/outputs/apk/androidTest/mockdata/irccloud-android-mockdata-androidTest.apk",
Expand All @@ -96,7 +100,7 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme dawn"],
device_type: "sevenInch",
specific_device: "emulator-5582"
specific_device: "emulator-5580"
)
capture_android_screenshots(
skip_open_summary: true,
Expand All @@ -108,7 +112,7 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme dusk"],
device_type: "sevenInch",
specific_device: "emulator-5582"
specific_device: "emulator-5580"
)
capture_android_screenshots(
skip_open_summary: true,
Expand All @@ -120,9 +124,13 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme midnight"],
device_type: "sevenInch",
specific_device: "emulator-5582"
specific_device: "emulator-5580"
)

sh("../start-emulator.sh Nexus_10_API_O")

capture_android_screenshots(
clear_previous_screenshots: true,
skip_open_summary: true,
app_apk_path: "build/outputs/apk/mockdata/irccloud-android-mockdata.apk",
tests_apk_path: "build/outputs/apk/androidTest/mockdata/irccloud-android-mockdata-androidTest.apk",
Expand All @@ -132,7 +140,7 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme dawn"],
device_type: "tenInch",
specific_device: "emulator-5584"
specific_device: "emulator-5580"
)
capture_android_screenshots(
skip_open_summary: true,
Expand All @@ -144,7 +152,7 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme dusk"],
device_type: "tenInch",
specific_device: "emulator-5584"
specific_device: "emulator-5580"
)
capture_android_screenshots(
app_apk_path: "build/outputs/apk/mockdata/irccloud-android-mockdata.apk",
Expand All @@ -155,10 +163,9 @@ platform :android do
use_tests_in_classes: ["com.irccloud.android.test.Screenshots"],
launch_arguments: ["theme midnight"],
device_type: "tenInch",
specific_device: "emulator-5584"
specific_device: "emulator-5580"
)

sh("adb -s emulator-5580 emu kill")
sh("adb -s emulator-5582 emu kill")
sh("adb -s emulator-5584 emu kill")
end
end
Loading

0 comments on commit 29de37a

Please sign in to comment.