Skip to content

Commit

Permalink
feat: add test build type for android_build
Browse files Browse the repository at this point in the history
  • Loading branch information
matinzd authored and fotos committed Feb 3, 2024
1 parent c5eca06 commit dc60eab
Show file tree
Hide file tree
Showing 2 changed files with 10 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 @@ -9,6 +9,10 @@ parameters:
description: The build type to build. This is normally either "debug" or "release" but you may have custom build types configured for your app.
type: string
default: "debug"
test_build_type:
description: The test build type to build. This is normally either "debug" or "release" but you may have custom build types configured for your app.
type: string
default: "debug"
cache:
description: Save and restore the caches? Defaults to true
type: boolean
Expand Down Expand Up @@ -73,7 +77,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>> <<parameters.assemble_android_test>> -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.test_build_type>> --stacktrace"

- when:
condition: <<parameters.cache>>
Expand Down
5 changes: 5 additions & 0 deletions src/jobs/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ parameters:
description: The build type to build. This is normally either "debug" or "release" but you may have custom build types configured for your app.
type: string
default: "debug"
test_build_type:
description: The test build type to build. This is normally either "debug" or "release" but you may have custom build types configured for your app.
type: string
default: "debug"
build_cache:
description: Should we cache after Gradle build? Defaults to true
type: boolean
Expand Down Expand Up @@ -92,6 +96,7 @@ steps:
- android_build:
project_path: <<parameters.project_path>>
build_type: <<parameters.build_type>>
test_build_type: <<parameters.test_build_type>>
cache: <<parameters.build_cache>>
assemble_android_test: <<parameters.assemble_android_test>>
- when:
Expand Down

0 comments on commit dc60eab

Please sign in to comment.