Jeff Gaston | 8c4ff1d | 2019-09-24 14:49:51 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -e |
| 3 | |
Jeff Gaston | 868c502 | 2020-06-16 17:32:18 -0400 | [diff] [blame] | 4 | echo "Starting $0 at $(date)" |
| 5 | |
Jeff Gaston | 668fb36 | 2020-01-10 18:20:48 -0500 | [diff] [blame] | 6 | cd "$(dirname $0)" |
Jeff Gaston | 8c4ff1d | 2019-09-24 14:49:51 -0400 | [diff] [blame] | 7 | |
Jeff Gaston | a80a3f6 | 2022-05-10 14:35:53 -0400 | [diff] [blame] | 8 | # This target is for testing that clean builds work correctly |
| 9 | # We disable the remote cache for this target unless it was already enabled |
Jeff Gaston | 01b5fb0 | 2022-05-12 11:48:13 -0400 | [diff] [blame] | 10 | if [ "$USE_ANDROIDX_REMOTE_BUILD_CACHE" == "" ]; then |
Jeff Gaston | a80a3f6 | 2022-05-10 14:35:53 -0400 | [diff] [blame] | 11 | export USE_ANDROIDX_REMOTE_BUILD_CACHE=false |
| 12 | fi |
Jeff Gaston | b609d63 | 2022-05-09 11:57:23 -0400 | [diff] [blame] | 13 | |
Jeff Gaston | 4dff6e1c | 2021-04-15 11:24:37 -0400 | [diff] [blame] | 14 | EXIT_VALUE=0 |
Jeff Gaston | 46676e3 | 2020-01-15 16:28:34 -0500 | [diff] [blame] | 15 | |
Alan Viverette | fc33355 | 2021-11-18 17:07:04 -0500 | [diff] [blame] | 16 | # Validate translation exports, if present |
| 17 | if ! impl/check_translations.sh; then |
| 18 | EXIT_VALUE=1 |
| 19 | else |
| 20 | # Run Gradle |
Jeff Gaston | e92d4d3 | 2022-09-19 12:35:15 -0400 | [diff] [blame] | 21 | if ! impl/build.sh buildOnServer checkExternalLicenses listTaskOutputs \ |
Alan Viverette | fc33355 | 2021-11-18 17:07:04 -0500 | [diff] [blame] | 22 | -Pandroidx.enableComposeCompilerMetrics=true \ |
| 23 | -Pandroidx.enableComposeCompilerReports=true \ |
Aurimas Liutikas | f06703b | 2022-07-08 16:28:11 +0000 | [diff] [blame] | 24 | --no-daemon \ |
Alan Viverette | fc33355 | 2021-11-18 17:07:04 -0500 | [diff] [blame] | 25 | --profile "$@"; then |
| 26 | EXIT_VALUE=1 |
| 27 | fi |
| 28 | |
| 29 | # Parse performance profile reports (generated with the --profile option above) and re-export |
| 30 | # the metrics in an easily machine-readable format for tracking |
| 31 | impl/parse_profile_htmls.sh |
| 32 | fi |
Jeff Gaston | 868c502 | 2020-06-16 17:32:18 -0400 | [diff] [blame] | 33 | |
Jeff Gaston | 4dff6e1c | 2021-04-15 11:24:37 -0400 | [diff] [blame] | 34 | echo "Completing $0 at $(date) with exit value $EXIT_VALUE" |
| 35 | |
| 36 | exit "$EXIT_VALUE" |