chore: remove useless appbundle build

This commit is contained in:
Kingkor Roy Tirtho 2025-11-07 18:59:55 +06:00
parent d1b73dbb1c
commit 64f937bd14
5 changed files with 24 additions and 77 deletions

View File

@ -12,10 +12,10 @@ on:
type: boolean type: boolean
default: true default: true
jobs: jobs:
description: Jobs to run (flathub,aur,winget,chocolatey,playstore) description: Jobs to run (flathub,aur,winget,chocolatey)
required: true required: true
type: string type: string
default: "flathub,aur,winget,chocolatey,playstore" default: "flathub,aur,winget,chocolatey"
jobs: jobs:
flathub: flathub:
@ -112,26 +112,26 @@ jobs:
- name: Tagname (workflow dispatch) - name: Tagname (workflow dispatch)
run: echo 'TAG_NAME=${{inputs.version}}' >> $GITHUB_ENV run: echo 'TAG_NAME=${{inputs.version}}' >> $GITHUB_ENV
- uses: robinraju/release-downloader@main # - uses: robinraju/release-downloader@main
with: # with:
repository: KRTirtho/spotube # repository: KRTirtho/spotube
tag: v${{ env.TAG_NAME }} # tag: v${{ env.TAG_NAME }}
tarBall: false # tarBall: false
zipBall: false # zipBall: false
out-file-path: dist # out-file-path: dist
fileName: "Spotube-playstore-all-arch.aab" # fileName: "Spotube-playstore-all-arch.aab"
- name: Create service-account.json # - name: Create service-account.json
run: | # run: |
echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > service-account.json # echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_BASE64 }}" | base64 -d > service-account.json
- name: Upload Android Release to Play Store # - name: Upload Android Release to Play Store
if: ${{!inputs.dry_run}} # if: ${{!inputs.dry_run}}
uses: r0adkll/upload-google-play@v1 # uses: r0adkll/upload-google-play@v1
with: # with:
serviceAccountJson: ./service-account.json # serviceAccountJson: ./service-account.json
releaseFiles: ./dist/Spotube-playstore-all-arch.aab # releaseFiles: ./dist/Spotube-playstore-all-arch.aab
packageName: oss.krtirtho.spotube # packageName: oss.krtirtho.spotube
track: production # track: production
status: draft # status: draft
releaseName: ${{ env.TAG_NAME }} # releaseName: ${{ env.TAG_NAME }}

View File

@ -49,7 +49,6 @@ jobs:
arch: all arch: all
files: | files: |
build/Spotube-android-all-arch.apk build/Spotube-android-all-arch.apk
build/Spotube-playstore-all-arch.aab
- os: windows-latest - os: windows-latest
platform: windows platform: windows
arch: x86 arch: x86

View File

@ -2,9 +2,7 @@ import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'package:args/command_runner.dart'; import 'package:args/command_runner.dart';
import 'package:collection/collection.dart';
import 'package:path/path.dart'; import 'package:path/path.dart';
import 'package:xml/xml.dart';
import '../../core/env.dart'; import '../../core/env.dart';
import 'common.dart'; import 'common.dart';
@ -24,39 +22,6 @@ class AndroidBuildCommand extends Command with BuildCommandCommonSteps {
"flutter build apk --flavor ${CliEnv.channel.name}", "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( final ogApkFile = File(
join( join(
"build", "build",
@ -71,22 +36,6 @@ class AndroidBuildCommand extends Command with BuildCommandCommonSteps {
join(cwd.path, "build", "Spotube-android-all-arch.apk"), 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"); stdout.writeln("✅ Built Android Apk and Appbundle");
} }
} }

View File

@ -2821,7 +2821,7 @@ packages:
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
xml: xml:
dependency: "direct dev" dependency: transitive
description: description:
name: xml name: xml
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226

View File

@ -177,7 +177,6 @@ dev_dependencies:
process_run: ^0.14.2 process_run: ^0.14.2
pubspec_parse: ^1.3.0 pubspec_parse: ^1.3.0
pub_api_client: ^3.0.0 pub_api_client: ^3.0.0
xml: ^6.5.0
io: ^1.0.4 io: ^1.0.4
drift_dev: ^2.21.0 drift_dev: ^2.21.0
auto_route_generator: ^9.0.0 auto_route_generator: ^9.0.0