From b793c74e814e3f2840e084023339cd90606712be Mon Sep 17 00:00:00 2001 From: ZhanGSKen Date: Tue, 3 Jun 2025 12:04:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=94=E7=94=A8=E7=A7=98?= =?UTF-8?q?=E9=92=A5=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 3 ++ .winboll/bashChangeToBetaKeyStore.sh | 3 -- .winboll/bashChangeToStageMGKeyStore.sh | 3 -- GenKeyStore/gen_debug_keystore.sh | 49 +++++++++++++++++++++++++ appbase/build.properties | 4 +- build.gradle | 2 +- current.keystore-demo | 4 -- keystore | 1 + libappbase/build.properties | 4 +- 9 files changed, 58 insertions(+), 15 deletions(-) delete mode 100644 .winboll/bashChangeToBetaKeyStore.sh delete mode 100644 .winboll/bashChangeToStageMGKeyStore.sh create mode 100644 GenKeyStore/gen_debug_keystore.sh delete mode 100644 current.keystore-demo create mode 160000 keystore diff --git a/.gitmodules b/.gitmodules index c97416e..cdf070e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "libjc/jcc/libs"] path = libjc/jcc/libs url = https://gitea.winboll.cc/Studio/APP_libjc_jcc_libs.git +[submodule "keystore"] + path = keystore + url = https://gitea.winboll.cc/Studio/keystore.git diff --git a/.winboll/bashChangeToBetaKeyStore.sh b/.winboll/bashChangeToBetaKeyStore.sh deleted file mode 100644 index 28f86f6..0000000 --- a/.winboll/bashChangeToBetaKeyStore.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/usr/bash -## Change Back To Beta KeyStore in keystore module. -cd keystore;git reset --hard f5bc75ff45fcb8894b5bd3f49b91bdd8fe3c317e;cd .. diff --git a/.winboll/bashChangeToStageMGKeyStore.sh b/.winboll/bashChangeToStageMGKeyStore.sh deleted file mode 100644 index 8b4bd2a..0000000 --- a/.winboll/bashChangeToStageMGKeyStore.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/usr/bash -## Change Back To StageMG KeyStore in keystore module. -cd keystore;git reset --hard d22519b11253f85f495400b01b6373e9657defb4;cd .. diff --git a/GenKeyStore/gen_debug_keystore.sh b/GenKeyStore/gen_debug_keystore.sh new file mode 100644 index 0000000..6ecd6ac --- /dev/null +++ b/GenKeyStore/gen_debug_keystore.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# 应用秘钥创建脚本 +# Linux 命令行创建JKS秘钥,alias和keyAlias可配置,文件名含时间戳 + +# 可配置参数(按需修改) +ALIAS="WinBoLL.CC_Debug" # 别名(与keyAlias一致) +STORE_PASS="androiddebugkey" +KEY_PASS="androiddebugkey" +COUNTRY="CN" # 国家代码 + +# 获取当前时间戳 +TIMESTAMP=$(date +%Y%m%d%H%M%S) +FILENAME="${ALIAS}_${TIMESTAMP}.jks" +STORENAME="${ALIAS}_${TIMESTAMP}.keystore" + +# 生成JKS文件(alias与keyAlias同步) +keytool -genkeypair \ + -alias "${ALIAS}" \ + -keyalg RSA \ + -keysize 2048 \ + -validity 1 \ + -keystore "${FILENAME}" \ + -dname "CN=WBFans, OU=Studio, O=WinBoLL, L=Shanwei, ST=Guangdong, C=${COUNTRY}" \ + -storepass "${STORE_PASS}" \ + -keypass "${KEY_PASS}" + +# 写入配置文件 +cat < ${STORENAME} +keyAlias=${ALIAS} +keyPassword=${KEY_PASS} +storeFile=../appkey.jks +storePassword=${STORE_PASS} +EOF + +echo "已生成秘钥:${FILENAME}" +echo "配置已写入 ${STORENAME}(keyAlias=${ALIAS})" + +# 询问是否复制文件 +read -p "是否需要将文件复制为 appkey.jks 和 appkey.keystore?(y/n): " CONFIRM + +if [[ $CONFIRM =~ ^[Yy]$ ]]; then + # 复制 jks 文件为 appkey.jks + cp -v ${FILENAME} ../appkey.jks + # 复制 keystore 文件为 appkey.keystore + cp -v ${STORENAME} ../appkey.keystore + echo "文件复制完成" +else + echo "已取消文件复制" +fi diff --git a/appbase/build.properties b/appbase/build.properties index 0853ecc..8d6cc90 100644 --- a/appbase/build.properties +++ b/appbase/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Sun Jun 01 15:41:55 HKT 2025 +#Tue Jun 03 04:01:04 GMT 2025 stageCount=3 libraryProject=libappbase baseVersion=15.8 publishVersion=15.8.2 -buildCount=0 +buildCount=2 baseBetaVersion=15.8.3 diff --git a/build.gradle b/build.gradle index 5b577c8..6799486 100644 --- a/build.gradle +++ b/build.gradle @@ -72,7 +72,7 @@ allprojects { bashCommitAppPublishBuildFlagInfoFilePath = ".winboll/bashCommitAppPublishBuildFlagInfo.sh" winbollFilePath = "winboll.properties" - keyPropsFilePath = "current.keystore" + keyPropsFilePath = "appkey.keystore" // 定义 lint 输出文件 lintXmlReportFilePath = "build/reports/lint-results.xml" lintHTMLReportFilePath = "build/reports/lint-results.html" diff --git a/current.keystore-demo b/current.keystore-demo deleted file mode 100644 index 2152608..0000000 --- a/current.keystore-demo +++ /dev/null @@ -1,4 +0,0 @@ -keyAlias=WinBoLL.CC -keyPassword=androiddebugkey -storeFile=../WinBoLL.CC.jks -storePassword=androiddebugkey diff --git a/keystore b/keystore new file mode 160000 index 0000000..254da25 --- /dev/null +++ b/keystore @@ -0,0 +1 @@ +Subproject commit 254da259c83c876d0295ad08f88ce5fd25a1a2a6 diff --git a/libappbase/build.properties b/libappbase/build.properties index 0352bde..8d6cc90 100644 --- a/libappbase/build.properties +++ b/libappbase/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Sun Jun 01 15:41:38 HKT 2025 +#Tue Jun 03 04:01:04 GMT 2025 stageCount=3 libraryProject=libappbase baseVersion=15.8 publishVersion=15.8.2 -buildCount=0 +buildCount=2 baseBetaVersion=15.8.3