blob: 621ff22690f43e15b5bb62b111466e511c619e65 [file] [log] [blame]
Jeff Gaston8c4ff1d2019-09-24 14:49:51 -04001#!/bin/bash
2set -e
3
Jeff Gaston868c5022020-06-16 17:32:18 -04004echo "Starting $0 at $(date)"
5
Jeff Gaston668fb362020-01-10 18:20:48 -05006cd "$(dirname $0)"
Jeff Gaston8c4ff1d2019-09-24 14:49:51 -04007
Jeff Gastona80a3f62022-05-10 14:35:53 -04008# 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 Gaston01b5fb02022-05-12 11:48:13 -040010if [ "$USE_ANDROIDX_REMOTE_BUILD_CACHE" == "" ]; then
Jeff Gastona80a3f62022-05-10 14:35:53 -040011 export USE_ANDROIDX_REMOTE_BUILD_CACHE=false
12fi
Jeff Gastonb609d632022-05-09 11:57:23 -040013
Jeff Gaston4dff6e1c2021-04-15 11:24:37 -040014EXIT_VALUE=0
Jeff Gaston46676e32020-01-15 16:28:34 -050015
Alan Viverettefc333552021-11-18 17:07:04 -050016# Validate translation exports, if present
17if ! impl/check_translations.sh; then
18 EXIT_VALUE=1
19else
20 # Run Gradle
Jeff Gaston4cef2b62023-02-03 11:56:24 -050021 if ! impl/build.sh buildOnServer createAllArchives checkExternalLicenses listTaskOutputs \
Alan Viverettefc333552021-11-18 17:07:04 -050022 -Pandroidx.enableComposeCompilerMetrics=true \
23 -Pandroidx.enableComposeCompilerReports=true \
Jeff Gastond8c70592023-02-02 16:40:51 -050024 -Pandroidx.constraints=true \
Aurimas Liutikasf06703b2022-07-08 16:28:11 +000025 --no-daemon \
Alan Viverettefc333552021-11-18 17:07:04 -050026 --profile "$@"; then
27 EXIT_VALUE=1
28 fi
29
30 # Parse performance profile reports (generated with the --profile option above) and re-export
31 # the metrics in an easily machine-readable format for tracking
Jeff Gaston5248e302022-11-18 15:14:21 -050032 impl/parse_profile_data.sh
Alan Viverettefc333552021-11-18 17:07:04 -050033fi
Jeff Gaston868c5022020-06-16 17:32:18 -040034
Jeff Gaston4dff6e1c2021-04-15 11:24:37 -040035echo "Completing $0 at $(date) with exit value $EXIT_VALUE"
36
37exit "$EXIT_VALUE"