2 Star 1 Fork 0

STZ/mirror-androidx

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cleanBuild.sh 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
Jeff Gaston 提交于 2021-04-30 00:53 +08:00 . assembleDebug -> assembleRelease
#!/bin/bash
set -e
DO_PROMPT=true
if [ "$1" == "-y" ]; then
DO_PROMPT=false
shift
fi
goals="$@"
function usage() {
echo
echo "Usage: $0 [-y] <tasks>"
echo "Runs a clean build of <tasks>"
echo
echo
echo "For example:"
echo
echo " $0 assembleRelease # or any other arguments you would normally give to ./gradlew"
echo
echo
echo "-y"
echo " Don't prompt the user to confirm that they want to run a clean build"
exit 1
}
if [ "$goals" == "" ]; then
usage
fi
if [ ! -e "./gradlew" ]; then
echo "Error; ./gradlew does not exist. Must cd to a dir containing a ./gradlew first"
# so that this script knows which gradlew to use (in frameworks/support or frameworks/support/ui)
exit 1
fi
function confirm() {
# Confirm whether the user wants to run this script instead of diagnose-build-failure.sh
# Recall that we already mentioned the existence of diagnose-build-failure.sh above
echo
echo "Press <Enter> to run a clean build (./gradlew --clean $goals) or Ctrl-C to cancel"
if [ "$DO_PROMPT" == "true" ]; then
read response
fi
}
confirm
scriptDir="$(cd $(dirname $0) && pwd)"
checkoutDir="$(cd $scriptDir/../.. && pwd)"
export OUT_DIR="$checkoutDir/out"
./gradlew --clean $goals
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/papermosquito/androidx.git
git@gitee.com:papermosquito/androidx.git
papermosquito
androidx
mirror-androidx
androidx-main-release

搜索帮助