Skip to content

Commit

Permalink
feat: add parameter to allow configuring the android tests on build
Browse files Browse the repository at this point in the history
  • Loading branch information
kieran-osgood authored and matt-oakes committed Jun 2, 2021
1 parent f0d6525 commit 0569d66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/commands/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ parameters:
description: Save and restore the caches? Defaults to true
type: boolean
default: true
assemble_android_test:
description: Configure the android tests to run. Defaults to assembleAndroidTest but you might want to set to app:assembleAndroidTest if that works for your project
type: string
default: assembleAndroidTest

steps:
- when:
Expand Down Expand Up @@ -69,7 +73,7 @@ steps:

- run:
name: Build Android APK
command: "cd <<parameters.project_path>> && chmod +x gradlew && ./gradlew --build-cache --max-workers 2 --continue assemble<<parameters.build_type>> assembleAndroidTest -DtestBuildType=<<parameters.build_type>> --stacktrace"
command: "cd <<parameters.project_path>> && chmod +x gradlew && ./gradlew --build-cache --max-workers 2 --continue assemble<<parameters.build_type>> <<parameters.assemble_android_test>> -DtestBuildType=<<parameters.build_type>> --stacktrace"

- when:
condition: <<parameters.cache>>
Expand Down

0 comments on commit 0569d66

Please sign in to comment.