build.sh 575 B

123456789101112131415161718192021222324
  1. #!/bin/bash -ex
  2. # SPDX-FileCopyrightText: 2023 yuzu Emulator Project
  3. # SPDX-License-Identifier: GPL-3.0-or-later
  4. export NDK_CCACHE="$(which ccache)"
  5. ccache -s
  6. BUILD_FLAVOR=mainline
  7. if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
  8. export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks"
  9. base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}"
  10. fi
  11. cd src/android
  12. chmod +x ./gradlew
  13. ./gradlew "assemble${BUILD_FLAVOR}Release" "bundle${BUILD_FLAVOR}Release"
  14. ccache -s
  15. if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
  16. rm "${ANDROID_KEYSTORE_FILE}"
  17. fi