Move to using impl/build.sh for androidx-studio-integration

To ensure that we have identical set up use impl/build.sh for building
androidx. This makes sure that we set up konan, track build logs, etc
in the same way as androidx main builds.

Test: ./frameworks/support/busytown/androidx-studio-integration-vitals.sh in
      androidx-studio-integration checkout
Bug: 306789429
Change-Id: I9d6111e151e3466bf621043e826c4ae4d3f26061
diff --git a/busytown/androidx-studio-integration-vitals.sh b/busytown/androidx-studio-integration-vitals.sh
index be6112ff..470d697 100755
--- a/busytown/androidx-studio-integration-vitals.sh
+++ b/busytown/androidx-studio-integration-vitals.sh
@@ -3,7 +3,6 @@
 
 "$SCRIPT_PATH"/impl/build-studio-and-androidx.sh \
     -Pandroidx.summarizeStderr \
-    tasks \
     listTaskOutputs \
     :navigation:navigation-safe-args-gradle-plugin:test \
     --stacktrace \
diff --git a/busytown/impl/build-studio-and-androidx.sh b/busytown/impl/build-studio-and-androidx.sh
index eff5aa5..d37dd88 100755
--- a/busytown/impl/build-studio-and-androidx.sh
+++ b/busytown/impl/build-studio-and-androidx.sh
@@ -26,14 +26,6 @@
 fi
 mkdir -p "$DIST_DIR"
 
-export DIST_DIR="$DIST_DIR"
-if [ "$CHANGE_INFO" != "" ]; then
-  cp "$CHANGE_INFO" "$DIST_DIR/"
-fi
-if [ "$MANIFEST" == "" ]; then
-  export MANIFEST="$DIST_DIR/manifest_${BUILD_NUMBER}.xml"
-fi
-
 # resolve GRADLE_USER_HOME
 export GRADLE_USER_HOME="$OUT_DIR/gradle"
 mkdir -p "$GRADLE_USER_HOME"
@@ -103,32 +95,9 @@
 export LINT_VERSION=$(perl -nle'print $& while m{(?<=baseVersion=).*}g' "$versionProperties")
 echo "LINT_VERSION=$LINT_VERSION"
 export GRADLE_PLUGIN_REPO="$STUDIO_DIR/out/repo:$STUDIO_DIR/prebuilts/tools/common/m2/repository"
-export JAVA_HOME="$(pwd)/prebuilts/jdk/jdk17/$PREBUILT_JDK/"
-export LINT_PRINT_STACKTRACE=true
 if [ "$USE_ANDROIDX_REMOTE_BUILD_CACHE" == "" ]; then
   export USE_ANDROIDX_REMOTE_BUILD_CACHE=gcp
 fi
 
-function buildAndroidx() {
-  RETURN_CODE=0
-  # Remove -Pandroid.overrideVersionCheck=true once we upgrade to Gradle 8.1
-  if frameworks/support/gradlew -p frameworks/support $androidxArguments --profile \
-    -Pandroidx.summarizeStderr\
-    --dependency-verification=off -Pandroid.overrideVersionCheck=true -Pandroidx.highMemory; then
-    echo build passed
-  else
-    RETURN_CODE=1
-  fi
-  $SCRIPTS_DIR/impl/parse_profile_data.sh
-
-  # zip build scan
-  scanZip="$DIST_DIR/scan.zip"
-  rm -f "$scanZip"
-  cd "$OUT_DIR/.gradle/build-scan-data"
-  zip -q -r "$scanZip" .
-  cd -
-  return $RETURN_CODE
-}
-
-buildAndroidx
+$SCRIPTS_DIR/impl/build.sh $androidxArguments --profile --dependency-verification=off -Pandroidx.validateNoUnrecognizedMessages=false
 echo "Completing $0 at $(date)"