Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 23 additions & 148 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,166 +1,41 @@
name: Build release APK (FOSS)
name: Build APK

on:
workflow_dispatch:
push:
branches:
- 'dev'
paths-ignore:
- 'README.md'
- 'fastlane/**'
- 'assets/**'
- '.github/**/*.md'
- '.github/FUNDING.yml'
- '.github/ISSUE_TEMPLATE/**'
pull_request:
branches: [ dev ]
paths-ignore:
- 'README.md'
- 'fastlane/**'
- 'assets/**'
- '.github/**/*.md'
- '.github/FUNDING.yml'
- '.github/ISSUE_TEMPLATE/**'
- dev
paths:
- '**'
- '.github/workflows/android.yml'

permissions:
contents: read

jobs:
build:
name: Build Android APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: 'recursive'

- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: "microsoft"
cache: 'gradle'

- name: Update build product flavor
run: |
echo "" >> ./gradle.properties
echo "isFullBuild=true" >> ./gradle.properties

- name: Update Sentry Secrets
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
echo 'SENTRY_DSN=${{ secrets.SENTRY_DSN }}' > ./local.properties
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> ./local.properties

- name: Update Last.fm secrets
env:
LASTFM_API_KEY: ${{ secrets.LASTFM_API_KEY }}
LASTFM_SECRET: ${{ secrets.LASTFM_SECRET }}
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
run: |
echo "LASTFM_API_KEY=${{ secrets.LASTFM_API_KEY }}" >> ./local.properties
echo "LASTFM_SECRET=${{ secrets.LASTFM_SECRET }}" >> ./local.properties
echo "DISCORD_CLIENT_ID=${{ secrets.DISCORD_CLIENT_ID }}" >> ./local.properties

- name: Generate aboutLibraries.json
run: ./gradlew exportLibraryDefinitions

- name: Build release APK
run: ./gradlew androidApp:assembleRelease

- name: Check build-tools version
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION

# A pull request from a fork gets no secrets, so it only checks that the APK builds.
- uses: kevin-david/zipalign-sign-android-release@v2
id: sign_app
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
with:
releaseDirectory: androidApp/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
zipAlign: true
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}

- name: Upload APK
if: steps.sign_app.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: app
path: androidApp/build/outputs/apk/release/*-signed.apk

# SimpMusic for vivo (vivoAndroidApp, com.spotify.music), same Full build as above.
build-vivo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Checkout source
uses: actions/checkout@v6
with:
submodules: 'recursive'
submodules: recursive

- name: set up JDK 21
- name: Set up Java 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: "microsoft"
cache: 'gradle'
distribution: microsoft
java-version: '21'
cache: gradle

- name: Update build product flavor
run: |
echo "" >> ./gradle.properties
echo "isFullBuild=true" >> ./gradle.properties

- name: Update Sentry Secrets
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
echo 'SENTRY_DSN=${{ secrets.SENTRY_DSN }}' > ./local.properties
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> ./local.properties

- name: Update Last.fm secrets
env:
LASTFM_API_KEY: ${{ secrets.LASTFM_API_KEY }}
LASTFM_SECRET: ${{ secrets.LASTFM_SECRET }}
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
run: |
echo "LASTFM_API_KEY=${{ secrets.LASTFM_API_KEY }}" >> ./local.properties
echo "LASTFM_SECRET=${{ secrets.LASTFM_SECRET }}" >> ./local.properties
echo "DISCORD_CLIENT_ID=${{ secrets.DISCORD_CLIENT_ID }}" >> ./local.properties

- name: Generate aboutLibraries.json
run: ./gradlew exportLibraryDefinitions

- name: Build vivo release APK
run: ./gradlew vivoAndroidApp:assembleRelease

- name: Check build-tools version
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION

# A pull request from a fork gets no secrets, so it only checks that the APK builds.
- uses: kevin-david/zipalign-sign-android-release@v2
id: sign_app
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
with:
releaseDirectory: vivoAndroidApp/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
zipAlign: true
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
- name: Build installable APK
run: ./gradlew --no-daemon androidApp:assembleDebug

- name: Upload APK
if: steps.sign_app.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: app-vivo
path: vivoAndroidApp/build/outputs/apk/release/*-signed.apk
name: SimpMusic-APK
path: androidApp/build/outputs/apk/debug/*.apk
if-no-files-found: error
retention-days: 7
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "core"]
path = core
url = https://github.com/maxrave-dev/core
url = https://github.com/vinithreddybanda/core.git
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fun App(
val intent by viewModel.intent.collectAsStateWithLifecycle()
val showNotificationPermissionDialog by viewModel.showNotificationPermissionDialog.collectAsStateWithLifecycle()

val isLiquidGlassEnabled by viewModel.getEnableLiquidGlass().collectAsStateWithLifecycle(DataStoreManager.FALSE)
val isLiquidGlassEnabled by viewModel.getEnableLiquidGlass().collectAsStateWithLifecycle(DataStoreManager.TRUE)
// Analytics only makes sense with local tracking on, so its tab follows that setting.
val isLocalTrackingEnabled by viewModel.getLocalTrackingEnabled().collectAsStateWithLifecycle(DataStoreManager.FALSE)
val showAnalyticsTab = isLocalTrackingEnabled == TRUE
Expand Down
Loading
Loading