From 64f937bd1421692693ecfdbb4c7873c75962f61c Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Fri, 7 Nov 2025 18:59:55 +0600 Subject: [PATCH] chore: remove useless appbundle build --- .github/workflows/spotube-publish-binary.yml | 46 +++++++++--------- .github/workflows/spotube-release-binary.yml | 1 - cli/commands/build/android.dart | 51 -------------------- pubspec.lock | 2 +- pubspec.yaml | 1 - 5 files changed, 24 insertions(+), 77 deletions(-) diff --git a/.github/workflows/spotube-publish-binary.yml b/.github/workflows/spotube-publish-binary.yml index f88e618c..e682dbdd 100644 --- a/.github/workflows/spotube-publish-binary.yml +++ b/.github/workflows/spotube-publish-binary.yml @@ -12,10 +12,10 @@ on: type: boolean default: true jobs: - description: Jobs to run (flathub,aur,winget,chocolatey,playstore) + description: Jobs to run (flathub,aur,winget,chocolatey) required: true type: string - default: "flathub,aur,winget,chocolatey,playstore" + default: "flathub,aur,winget,chocolatey" jobs: flathub: @@ -112,26 +112,26 @@ jobs: - name: Tagname (workflow dispatch) run: echo 'TAG_NAME=${{inputs.version}}' >> $GITHUB_ENV - - uses: robinraju/release-downloader@main - with: - repository: KRTirtho/spotube - tag: v${{ env.TAG_NAME }} - tarBall: false - zipBall: false - out-file-path: dist - fileName: "Spotube-playstore-all-arch.aab" + # - uses: robinraju/release-downloader@main + # with: + # repository: KRTirtho/spotube + # tag: v${{ env.TAG_NAME }} + # tarBall: false + # zipBall: false + # out-file-path: dist + # fileName: "Spotube-playstore-all-arch.aab" - - name: Create service-account.json - run: | - echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > service-account.json + # - name: Create service-account.json + # run: | + # echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > service-account.json - - name: Upload Android Release to Play Store - if: ${{!inputs.dry_run}} - uses: r0adkll/upload-google-play@v1 - with: - serviceAccountJson: ./service-account.json - releaseFiles: ./dist/Spotube-playstore-all-arch.aab - packageName: oss.krtirtho.spotube - track: production - status: draft - releaseName: ${{ env.TAG_NAME }} + # - name: Upload Android Release to Play Store + # if: ${{!inputs.dry_run}} + # uses: r0adkll/upload-google-play@v1 + # with: + # serviceAccountJson: ./service-account.json + # releaseFiles: ./dist/Spotube-playstore-all-arch.aab + # packageName: oss.krtirtho.spotube + # track: production + # status: draft + # releaseName: ${{ env.TAG_NAME }} diff --git a/.github/workflows/spotube-release-binary.yml b/.github/workflows/spotube-release-binary.yml index 4f2cff34..2ddd7a6a 100644 --- a/.github/workflows/spotube-release-binary.yml +++ b/.github/workflows/spotube-release-binary.yml @@ -49,7 +49,6 @@ jobs: arch: all files: | build/Spotube-android-all-arch.apk - build/Spotube-playstore-all-arch.aab - os: windows-latest platform: windows arch: x86 diff --git a/cli/commands/build/android.dart b/cli/commands/build/android.dart index 4216553a..b9edeb84 100644 --- a/cli/commands/build/android.dart +++ b/cli/commands/build/android.dart @@ -2,9 +2,7 @@ import 'dart:async'; import 'dart:io'; import 'package:args/command_runner.dart'; -import 'package:collection/collection.dart'; import 'package:path/path.dart'; -import 'package:xml/xml.dart'; import '../../core/env.dart'; import 'common.dart'; @@ -24,39 +22,6 @@ class AndroidBuildCommand extends Command with BuildCommandCommonSteps { "flutter build apk --flavor ${CliEnv.channel.name}", ); - await dotEnvFile.writeAsString( - "\nENABLE_UPDATE_CHECK=0" - "\nHIDE_DONATIONS=1", - mode: FileMode.append, - ); - - final androidManifestFile = File( - join(cwd.path, "android", "app", "src", "main", "AndroidManifest.xml")); - - final androidManifestXml = - XmlDocument.parse(await androidManifestFile.readAsString()); - - final deletingElement = - androidManifestXml.findAllElements("meta-data").firstWhereOrNull( - (el) => - el.getAttribute("android:name") == - "com.google.android.gms.car.application", - ); - - deletingElement?.parent?.children.remove(deletingElement); - - await androidManifestFile.writeAsString( - androidManifestXml.toXmlString(pretty: true), - ); - - await shell.run( - """ - dart run build_runner clean - dart run build_runner build --delete-conflicting-outputs - flutter build appbundle --flavor ${CliEnv.channel.name} - """, - ); - final ogApkFile = File( join( "build", @@ -71,22 +36,6 @@ class AndroidBuildCommand extends Command with BuildCommandCommonSteps { join(cwd.path, "build", "Spotube-android-all-arch.apk"), ); - final ogAppbundleFile = File( - join( - cwd.path, - "build", - "app", - "outputs", - "bundle", - "${CliEnv.channel.name}Release", - "app-${CliEnv.channel.name}-release.aab", - ), - ); - - await ogAppbundleFile.copy( - join(cwd.path, "build", "Spotube-playstore-all-arch.aab"), - ); - stdout.writeln("✅ Built Android Apk and Appbundle"); } } diff --git a/pubspec.lock b/pubspec.lock index 4e98e422..91f1c2eb 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -2821,7 +2821,7 @@ packages: source: hosted version: "1.1.0" xml: - dependency: "direct dev" + dependency: transitive description: name: xml sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 diff --git a/pubspec.yaml b/pubspec.yaml index 9780e0fe..0c31a0cb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -177,7 +177,6 @@ dev_dependencies: process_run: ^0.14.2 pubspec_parse: ^1.3.0 pub_api_client: ^3.0.0 - xml: ^6.5.0 io: ^1.0.4 drift_dev: ^2.21.0 auto_route_generator: ^9.0.0