From 5129ad6838601bcd4188ec2d60970233c0ad2aaa Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Tue, 2 Aug 2022 08:53:03 +0800 Subject: [PATCH] Cancel split abi --- .github/workflows/build.yml | 36 ++++-------------------------------- app/build.gradle | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8be783c..7ac418a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,40 +80,12 @@ jobs: tag_name: ${{ steps.config.outputs.version_name }} name: FYReader_${{ steps.config.outputs.version_name }} files: | - ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}-arm64-v8a.apk - ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}-armeabi-v7a.apk - ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}-x86_64.apk - ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}-x86.apk - ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}-universal.apk + ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}.apk env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 上传Artifact - - name: Upload Artifact arm64-v8a + - name: Upload Artifact uses: actions/upload-artifact@v3 with: - name: app-arm64-v8a - path: ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}-arm64-v8a.apk - - - name: Upload Artifact armeabi-v7a - uses: actions/upload-artifact@v3 - with: - name: app-armeabi-v7a - path: ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}-armeabi-v7a.apk - - - name: Upload Artifact universal - uses: actions/upload-artifact@v3 - with: - name: app-universal - path: ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}-universal.apk - - - name: Upload Artifact x86_64 - uses: actions/upload-artifact@v3 - with: - name: app-x86_64 - path: ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}-x86_64.apk - - - name: Upload Artifact x86 - uses: actions/upload-artifact@v3 - with: - name: app-x86 - path: ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}-x86.apk \ No newline at end of file + name: app + path: ${{ steps.get_path.outputs.file_path }}/风月读书${{ steps.config.outputs.version_name }}.apk \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 8f76bdc..b34d0c1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -78,14 +78,14 @@ android { viewBinding true } - splits { + /*splits { abi { reset() enable true universalApk true // If true, also generate a universal APK include "armeabi-v7a", "arm64-v8a", "x86", "x86_64" } - } + }*/ buildTypes { release { @@ -94,6 +94,9 @@ android { if (keyPropsFile.exists()) { signingConfig signingConfigs.myConifg } + ndk { + abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" + } } debug { minifyEnabled false @@ -103,16 +106,22 @@ android { } applicationIdSuffix ".debug" versionNameSuffix "-" + commitId + ndk { + abiFilters "arm64-v8a" + } } android.applicationVariants.all { variant -> - variant.outputs.each { output -> + variant.outputs.all { + outputFileName = "${name}v${defaultConfig.versionName}.apk" + } + /*variant.outputs.each { output -> def abi = output.getFilter(OutputFile.ABI) if (abi == null) { abi = "universal" } def fileName = "${name}v${defaultConfig.versionName}-${abi}.apk" output.outputFileName = fileName - } + }*/ } } sourceSets.main {