扫描并识别二维码
JAVA_HOME
ANDROID_SDK_ROOT
JAVA_TOOL_OPTIONS
# 设置 JAVA 版本为 JDK17
JAVA_HOME=\path\to\jdk17
# 设置 Android SDK 的环境变量
ANDROID_SDK_ROOT=\path\to\sdkroot
# 设置 JAVA 工具的环境变量
JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
安装命令行工具
scoop install main/android-clt
安装 Android SDK
sdkmanager --sdk_root="\path\to\sdkroot" "platforms;android-28"
- 如果未设置Android SDK的环境变量, 则需要新增
local.properties
文件, 在文件中指定sdk.dir=\path\to\sdkroot
- 如果未设置JAVA版本为JDK17, 则修改
gradle.properties
文件, 在文件中指定org.gradle.java.home=\path\to\jdk17
# powershell
gradle assembleRelease -P RELEASE_STORE_PASSWORD=${ENV:RELEASE_KEY_PASSWORD} -P RELEASE_KEY_ALIAS=${ENV:RELEASE_KEY_ALIAS} -P RELEASE_KEY_PASSWORD=${ENV:RELEASE_KEY_PASSWORD}
# bash
gradle assembleRelease -P RELEASE_STORE_PASSWORD=${RELEASE_KEY_PASSWORD} -P RELEASE_KEY_ALIAS=${RELEASE_KEY_ALIAS} -P RELEASE_KEY_PASSWORD=${RELEASE_KEY_PASSWORD}
jarsigner -verbose -keystore \path\to\keystore\release.keystore -signedjar .\app\build\outputs\apk\release\app-release-signed.apk .\app\build\outputs\apk\release\app-release-unsigned.apk keystorealias
keytool -list -v -keystore .\app\keystore\release.keystore
gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/thesixonenine/ScanQRCode/actions/runs --paginate --jq '.workflow_runs[] | select(.conclusion != "") | .id'