From 062dfd9990ed389280f50abc4ffb54a9832cb26b Mon Sep 17 00:00:00 2001 From: dyhkwong <50692134+dyhkwong@users.noreply.github.com> Date: Sun, 12 Apr 2026 00:01:12 +0800 Subject: [PATCH] Update plugin submodules and fix plugin version code [skip ci] --- .github/workflows/release_naive.yml | 79 +++++++++++++--------------- buildSrc/src/main/kotlin/Helpers.kt | 6 --- plugin/naive/src/main/jni/naiveproxy | 2 +- version.properties | 6 +-- 4 files changed, 42 insertions(+), 51 deletions(-) diff --git a/.github/workflows/release_naive.yml b/.github/workflows/release_naive.yml index a82e2816..f4d89669 100644 --- a/.github/workflows/release_naive.yml +++ b/.github/workflows/release_naive.yml @@ -2,18 +2,12 @@ name: NaïveProxy Plugin Release Build on: workflow_dispatch: inputs: - COMMIT_HASH: - required: true - VERSION_NAME: - required: true - VERSION_CODE: - required: true -# release: -# description: 'Release (y/n)' -# required: false -# tag: -# description: 'Release Tag' -# required: false + release: + description: 'Release (y/n)' + required: false + tag: + description: 'Release Tag' + required: false jobs: native: runs-on: ubuntu-latest @@ -28,17 +22,15 @@ jobs: - name: Checkout Submodule run: | git submodule update --init plugin/naive/src/main/jni/naiveproxy - pushd plugin/naive/src/main/jni/naiveproxy - git fetch origin ${{ github.event.inputs.COMMIT_HASH }} - git checkout ${{ github.event.inputs.COMMIT_HASH }} - popd + - name: Fetch Status + run: git submodule status 'plugin/naive/*' > naive_status - name: Native Cache id: cache uses: actions/cache@v5 with: path: | plugin/naive/src/main/jniLibs/${{ matrix.arch }} - key: naive-${{ matrix.arch }}-${{ github.event.inputs.COMMIT_HASH }}-${{ hashFiles('bin/plugin/naive/*') }} + key: naive-${{ matrix.arch }}-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }} - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: | @@ -53,30 +45,35 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + - name: Checkout Submodule + run: | + git submodule update --init plugin/naive/src/main/jni/naiveproxy + - name: Fetch Status + run: git submodule status 'plugin/naive/*' > naive_status - name: Native Cache (armeabi-v7a) uses: actions/cache@v5 with: path: | plugin/naive/src/main/jniLibs/armeabi-v7a - key: naive-armeabi-v7a-${{ github.event.inputs.COMMIT_HASH }}-${{ hashFiles('bin/plugin/naive/*') }} + key: naive-armeabi-v7a-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }} - name: Native Cache (arm64-v8a) uses: actions/cache@v5 with: path: | plugin/naive/src/main/jniLibs/arm64-v8a - key: naive-arm64-v8a-${{ github.event.inputs.COMMIT_HASH }}-${{ hashFiles('bin/plugin/naive/*') }} + key: naive-arm64-v8a-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }} - name: Native Cache (x86) uses: actions/cache@v5 with: path: | plugin/naive/src/main/jniLibs/x86 - key: naive-x86-${{ github.event.inputs.COMMIT_HASH }}-${{ hashFiles('bin/plugin/naive/*') }} + key: naive-x86-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }} - name: Native Cache (x86_64) uses: actions/cache@v5 with: path: | plugin/naive/src/main/jniLibs/x86_64 - key: naive-x86_64-${{ github.event.inputs.COMMIT_HASH }}-${{ hashFiles('bin/plugin/naive/*') }} + key: naive-x86_64-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }} - name: Gradle cache uses: actions/cache@v5 with: @@ -100,23 +97,23 @@ jobs: with: name: APKs path: ${{ env.APK }} -# publish: -# name: Publish Release -# if: github.event.inputs.release == 'y' && github.event.inputs.tag != '' -# runs-on: ubuntu-latest -# needs: build -# env: -# GH_TOKEN: ${{ github.token }} -# steps: -# - name: Checkout -# uses: actions/checkout@v6 -# - name: Download Artifacts -# uses: actions/download-artifact@v8 -# with: -# name: APKs -# path: artifacts -# - name: Publish Release -# run: | -# mkdir apks -# find artifacts -name "*.apk" -exec cp {} apks \; -# gh release create --latest=false ${{ github.event.inputs.tag }} --notes="" --title=${{ github.event.inputs.tag }} ./apks/* + publish: + name: Publish Release + if: github.event.inputs.release == 'y' && github.event.inputs.tag != '' + runs-on: ubuntu-latest + needs: build + env: + GH_TOKEN: ${{ github.token }} + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Download Artifacts + uses: actions/download-artifact@v8 + with: + name: APKs + path: artifacts + - name: Publish Release + run: | + mkdir apks + find artifacts -name "*.apk" -exec cp {} apks \; + gh release create --latest=false ${{ github.event.inputs.tag }} --notes="" --title=${{ github.event.inputs.tag }} ./apks/* diff --git a/buildSrc/src/main/kotlin/Helpers.kt b/buildSrc/src/main/kotlin/Helpers.kt index 176c76c8..f9a5bf7f 100644 --- a/buildSrc/src/main/kotlin/Helpers.kt +++ b/buildSrc/src/main/kotlin/Helpers.kt @@ -170,12 +170,6 @@ fun Project.setupPlugin(projectName: String) { androidComponents.apply { onVariants { variant -> variant.outputs.forEach { output -> - when (output.filters.find { it.filterType == FilterConfiguration.FilterType.ABI }?.identifier) { - "arm64-v8a" -> output.versionCode.set(verCode + 4) - "x86_64" -> output.versionCode.set(verCode + 3) - "armeabi-v7a" -> output.versionCode.set(verCode + 2) - "x86" -> output.versionCode.set(verCode + 1) - } (output as? VariantOutputImpl)?.let { variantOutputImpl -> val versionName = variantOutputImpl.versionName.orNull.orEmpty() variantOutputImpl.outputFileName.set(variantOutputImpl.outputFileName.get() diff --git a/plugin/naive/src/main/jni/naiveproxy b/plugin/naive/src/main/jni/naiveproxy index bcb5bd8a..6315863d 160000 --- a/plugin/naive/src/main/jni/naiveproxy +++ b/plugin/naive/src/main/jni/naiveproxy @@ -1 +1 @@ -Subproject commit bcb5bd8ac352bf597a73b1bff4328c09dc7f073a +Subproject commit 6315863d2d8d1fad80d2b2afd46162c301f973e2 diff --git a/version.properties b/version.properties index 4410e7db..bbd77961 100644 --- a/version.properties +++ b/version.properties @@ -2,8 +2,8 @@ PACKAGE_NAME=com.github.dyhkwong.sagernet VERSION_NAME=0.17.30 VERSION_CODE=338 -NAIVE_VERSION_NAME=143.0.7499.109-2 -NAIVE_VERSION=55 +NAIVE_VERSION_NAME=147.0.7727.49-1 +NAIVE_VERSION=275 SHADOWQUIC_VERSION_NAME=0.3.3 -SHADOWQUIC_VERSION=5 \ No newline at end of file +SHADOWQUIC_VERSION=10 \ No newline at end of file