From 5f23c6e625cd510d6bb66f5f58da369b63ac1b71 Mon Sep 17 00:00:00 2001 From: HapeLee <1321903405@qq.com> Date: Thu, 25 Sep 2025 19:05:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96=E4=B8=8E?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/stale.yml | 2 +- .github/workflows/test.yml | 36 ++++++++++++------------------------ gradle/libs.versions.toml | 16 ++++++++-------- 3 files changed, 21 insertions(+), 33 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index bfa2c0d0c..7374755e2 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,7 +15,7 @@ jobs: stale: runs-on: ubuntu-latest - if: ${{ github.repository == 'gedoor/legado' }} + if: ${{ github.repository == 'HapeLee/legado-with-MD3' }} permissions: issues: write diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 24d5eef7e..76ebf2e28 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: Test Build on: push: branches: - - master + - main paths: - '**' # - '!**/assets/**' @@ -53,7 +53,7 @@ jobs: strategy: matrix: product: [ app ] - type: [ release, releaseA ] + type: [ release ] fail-fast: false runs-on: ubuntu-latest env: @@ -76,12 +76,11 @@ jobs: echo "">$GITHUB_WORKSPACE/app/src/main/assets/18PlusList.txt - name: Release Apk Sign run: | - echo "给apk增加签名" - cp $GITHUB_WORKSPACE/.github/workflows/legado.jks $GITHUB_WORKSPACE/app/legado.jks - sed '$a\RELEASE_STORE_FILE=./legado.jks' $GITHUB_WORKSPACE/gradle.properties -i - sed '$a\RELEASE_KEY_ALIAS=legado' $GITHUB_WORKSPACE/gradle.properties -i - sed '$a\RELEASE_STORE_PASSWORD=gedoor_legado' $GITHUB_WORKSPACE/gradle.properties -i - sed '$a\RELEASE_KEY_PASSWORD=gedoor_legado' $GITHUB_WORKSPACE/gradle.properties -i + echo "${{ secrets.SIGNING_KEY }}" | base64 -d > $GITHUB_WORKSPACE/app/my-release-key.jks + echo "RELEASE_STORE_FILE=my-release-key.jks" >> $GITHUB_WORKSPACE/gradle.properties + echo "RELEASE_STORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}" >> $GITHUB_WORKSPACE/gradle.properties + echo "RELEASE_KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> $GITHUB_WORKSPACE/gradle.properties + echo "RELEASE_KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> $GITHUB_WORKSPACE/gradle.properties - name: Set up Gradle uses: gradle/actions/setup-gradle@v4 @@ -89,22 +88,15 @@ jobs: - name: Build With Gradle continue-on-error: true run: | - if [ ${{ env.type }} == 'release' ]; then - typeName="原包名" - else - typeName="共存" - sed "s/'.release'/'.releaseA'/" $GITHUB_WORKSPACE/app/build.gradle -i - sed 's/.release/.releaseA/' $GITHUB_WORKSPACE/app/google-services.json -i - fi echo "统一版本号" sed "/def version/c def version = \"${{ env.VERSION }}\"" $GITHUB_WORKSPACE/app/build.gradle -i - echo "开始${{ env.product }}$typeName构建" + echo "开始${{ env.product }}${{ env.type }}构建" chmod +x gradlew ./gradlew assemble${{ env.product }}release --build-cache --parallel --daemon --warning-mode all echo "修改APK文件名" mkdir -p ${{ github.workspace }}/apk/ for file in `ls ${{ github.workspace }}/app/build/outputs/apk/*/*/*.apk`; do - mv "$file" ${{ github.workspace }}/apk/legado_${{ env.product }}_${{ env.VERSIONL }}_$typeName.apk + mv "$file" ${{ github.workspace }}/apk/legado_${{ env.product }}_${{ env.VERSIONL }}_${{ env.type }}.apk done echo "移动mapping文件" mkdir -p ${{ github.workspace }}/mapping/ @@ -155,7 +147,7 @@ jobs: prerelease: needs: [ prepare, build ] - if: github.event_name != 'pull_request' && github.repository == 'gedoor/legado' + if: github.event_name != 'pull_request' && github.repository == 'HapeLee/legado-with-MD3' runs-on: ubuntu-latest env: VERSION: ${{ needs.prepare.outputs.version }} @@ -170,12 +162,8 @@ jobs: mv */*.apk . rm -rf */ - for file in `ls *.apk`; do - if [[ "$file" == *原包名* ]]; then - mv "$file" $(echo $file | sed s/原包名/release/) - else - mv "$file" $(echo $file | sed s/共存/releaseA/) - fi + for file in *.apk; do + mv "$file" "$(echo $file | sed 's/legado_/legado_release_/')" done - name: Delete Pre-Release diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3220ff0f6..934c480ba 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,15 +1,15 @@ [versions] datastorePreferences = "1.1.7" -kotlin = "2.2.10" +kotlin = "2.2.20" ksp = "2.2.10-2.0.2" -agp = "8.12.3" +agp = "8.13.0" appcompat = "1.7.1" colorpicker = "1.1.0" commonsText = "1.14.0" constraintlayout = "2.2.1" core = "1.17.0" -firebaseBom = "34.1.0" +firebaseBom = "34.3.0" flexbox = "3.0.0" fragment = "1.8.9" @@ -17,9 +17,9 @@ fragment = "1.8.9" hutool = "5.8.22" libarchive = "1.1.6" -lifecycle = "2.9.3" -glide = "4.16.0" -gson = "2.13.1" +lifecycle = "2.9.4" +glide = "5.0.5" +gson = "2.13.2" jsonPath = "2.9.0" # issue #3811,不要更新版本,新版引入了一个破坏性变更(详见https://github.com/jhy/jsoup/pull/2017) # 若要升级请确保相关代码不会受此变更影响(如AnalyzeByJSoup.kt、JsoupXpath库等) @@ -37,12 +37,12 @@ palette = "1.0.0" preference = "1.2.1" protobufJavalite = "4.26.1" quickChineseTransfer = "0.2.16" -room = "2.7.2" +room = "2.8.1" splitties = "3.0.0" rhino = "1.8.0" desugar = "2.1.5" -activity = "1.10.1" +activity = "1.11.0" #kotlinxSerialization = "1.8.0" swiperefreshlayout = "1.1.0" #noinspection GradleDependency