diff --git a/.github/workflows/spotube-release-binary.yml b/.github/workflows/spotube-release-binary.yml index 6df4bf5a..bfd66bb2 100644 --- a/.github/workflows/spotube-release-binary.yml +++ b/.github/workflows/spotube-release-binary.yml @@ -141,11 +141,16 @@ jobs: EOF - name: Assemble Release - run: ./gradlew :composeApp:assembleRelease + run: | + if [ "${{ inputs.release_type }}" = "nightly" ]; then + ./gradlew :composeApp:assembleNightlyRelease -Pnightly=true -PbuildNumber=${{ github.run_number }} + else + ./gradlew :composeApp:assembleStableRelease + fi - name: Rename APK run: | - APK_FILE=$(find composeApp/build/outputs/apk/release -name "*.apk" -type f | head -1) + APK_FILE=$(find composeApp/build/outputs/apk -path "*elease*" -name "*.apk" -type f | head -1) cp "$APK_FILE" Spotube-android-all-arch.apk - name: Upload APK @@ -194,7 +199,7 @@ jobs: run: chmod +x gradlew - name: Package Linux - run: ./gradlew :composeApp:packageReleaseDeb :composeApp:packageReleaseRpm + run: ./gradlew :composeApp:packageReleaseDeb :composeApp:packageReleaseRpm -Pnightly=${{ inputs.release_type == 'nightly' }} -PbuildNumber=${{ github.run_number }} - name: Rename Linux artifacts run: | @@ -255,7 +260,7 @@ jobs: run: chmod +x gradlew - name: Package Linux - run: ./gradlew :composeApp:packageReleaseDeb :composeApp:packageReleaseRpm + run: ./gradlew :composeApp:packageReleaseDeb :composeApp:packageReleaseRpm -Pnightly=${{ inputs.release_type == 'nightly' }} -PbuildNumber=${{ github.run_number }} - name: Rename Linux artifacts run: | @@ -308,7 +313,7 @@ jobs: uses: gradle/actions/setup-gradle@v4 - name: Package EXE - run: ./gradlew :composeApp:packageReleaseExe + run: ./gradlew :composeApp:packageReleaseExe -Pnightly=${{ inputs.release_type == 'nightly' }} -PbuildNumber=${{ github.run_number }} - name: Rename Windows artifacts shell: pwsh @@ -357,7 +362,7 @@ jobs: run: chmod +x gradlew - name: Package DMG - run: ./gradlew :composeApp:packageReleaseDmg + run: ./gradlew :composeApp:packageReleaseDmg -Pnightly=${{ inputs.release_type == 'nightly' }} -PbuildNumber=${{ github.run_number }} - name: Rename macOS artifact run: | @@ -389,18 +394,35 @@ jobs: steps: - uses: actions/checkout@v4 + # The build resolves its plugins from mavenLocal, so Gradle needs the same setup as the build jobs + - name: Download maven local + uses: actions/download-artifact@v4 + with: + name: maven-local + path: ~/.m2/repository/ + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Set release variables id: vars run: | if [ "${{ inputs.release_type }}" = "stable" ]; then - VERSION=$(grep 'versionName' composeApp/build.gradle.kts | head -1 | sed 's/.*"\(.*\)".*/\1/') + chmod +x gradlew + VERSION=$(./gradlew -q :composeApp:printVersion) TAG="v${VERSION}" echo "is_prerelease=false" >> "$GITHUB_OUTPUT" echo "is_draft=true" >> "$GITHUB_OUTPUT" echo "release_name=Spotube ${TAG}" >> "$GITHUB_OUTPUT" else TAG="nightly" - VERSION="$(date +%Y-%m-%d)" + VERSION="$(date +%Y-%m-%d)-${{ github.run_number }}" echo "is_prerelease=true" >> "$GITHUB_OUTPUT" echo "is_draft=false" >> "$GITHUB_OUTPUT" echo "release_name=Nightly ${VERSION}" >> "$GITHUB_OUTPUT" diff --git a/AGENTS.md b/AGENTS.md index ba88dadf..44b1662f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,7 +12,7 @@ ## High-value commands - Use Gradle wrapper (`./gradlew` or `./gradlew.bat`) only. - Run desktop: `:composeApp:run` -- Build Android debug: `:composeApp:assembleDebug` +- Build Android debug: `:composeApp:assembleStableDebug` (or `assembleNightlyDebug`). Android has `stable`/`nightly` product flavors (nightly = beta channel: `.nightly` applicationId suffix, own icons/name in `composeApp/src/nightly/res`). Desktop icons come from `composeApp/icons/{stable,nightly}`, chosen with `-Pnightly=true`. - Module checks: `:composeApp:check`, `:plugin_interfaces:check`, `:js_plugin_example:check` - Focused tests: `:composeApp:jvmTest`, `:composeApp:iosSimulatorArm64Test`, `:plugin_interfaces:jvmTest`, `:plugin_interfaces:jsTest`, `:js_plugin_example:jsTest` - No lint/typecheck/formatter tasks are configured; `:composeApp:check` is the only aggregated check. @@ -70,6 +70,6 @@ - **Adaptive Components:** Use `AdaptiveDropdownBottomSheet` or `AdaptiveDialogBottomSheet` inside `commonMain` for adaptive layouts[cite: 2]. Do NOT create platform-specific `expect/actual` variants unless platform-native APIs (like windowing or native scrollbars) are explicitly required[cite: 2]. ### 3. Verification & Diagnostic Loops -- **Post-Edit Verification:** After editing Kotlin code, validate compilation by running `./gradlew :composeApp:check` or `./gradlew :composeApp:assembleDebug` via MCP[cite: 2]. +- **Post-Edit Verification:** After editing Kotlin code, validate compilation by running `./gradlew :composeApp:check` or `./gradlew :composeApp:assembleStableDebug` via MCP[cite: 2]. - **Dispatcher Integrity:** Never remove or bypass `SwingMainDispatcherFactory` in `composeApp/src/jvmMain/.../core/coroutines/`[cite: 2]. It is required to prevent `compose-webview` from hijacking `Dispatchers.Main` away from the Swing EDT[cite: 2]. - **Live Preview Iteration:** Use `compose-hot-reload` to evaluate UI layout changes headlessly without forcing full Gradle rebuilds. diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index cab6974a..3a242623 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -43,12 +43,24 @@ plugins { val bundleId = "org.spotube.spotube" val version = "6.0.0" val buildNumber = 46 +// Desktop icon channel; Android picks its icons via the stable/nightly product flavor. Use -Pnightly=true. +val isNightly = providers.gradleProperty("nightly").map { it.toBoolean() }.getOrElse(false) +val desktopIconDir = if (isNightly) "icons/nightly" else "icons/stable" +// Nightlies are numbered by the CI run (-PbuildNumber=, or GITHUB_RUN_NUMBER) so every build is traceable to its run. +val nightlyBuildNumber = providers.gradleProperty("buildNumber").orNull?.toIntOrNull() + ?: System.getenv("GITHUB_RUN_NUMBER")?.toIntOrNull() + ?: buildNumber val targetName = "Spotube" val homePageUrl = "https://spotube.org" val repositoryUrl = "https://github.com/team-spotube/spotube" val appVersionName = version -val appBuildNumber = buildNumber +val appBuildNumber = if (isNightly) nightlyBuildNumber else buildNumber val appRepositoryUrl = repositoryUrl +// CI reads the release version from here instead of scraping this file. +tasks.register("printVersion") { + val appVersion = appVersionName + doLast { println(appVersion) } +} val githubRepositoryPath = repositoryUrl.removePrefix("https://github.com/") val latestReleaseApiUrl = "https://api.github.com/repos/$githubRepositoryPath/releases/latest" val generatedAppInfoDir = layout.buildDirectory.dir("generated/appBuildInfo/commonMain/kotlin") @@ -297,6 +309,19 @@ android { versionCode = buildNumber versionName = version } + // stable = production channel, nightly = beta channel (own icon, name and installable side by side) + flavorDimensions += "channel" + productFlavors { + create("stable") { + dimension = "channel" + } + create("nightly") { + dimension = "channel" + applicationIdSuffix = ".nightly" + versionCode = nightlyBuildNumber + versionNameSuffix = "-nightly.$nightlyBuildNumber" + } + } packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" @@ -382,11 +407,13 @@ nucleus.application { homepage = homePageUrl linux { + iconFile.set(project.file("$desktopIconDir/icon.png")) modules("jdk.security.auth") debMaintainer = "Team Spotube " rpmLicenseType = "AGPL-3.0-or-later" } windows { + iconFile.set(project.file("$desktopIconDir/icon.ico")) shortcut = true menu = true dirChooser = true @@ -394,6 +421,7 @@ nucleus.application { } macOS { + iconFile.set(project.file("$desktopIconDir/icon.icns")) notarization { } diff --git a/composeApp/icons/nightly/icon.icns b/composeApp/icons/nightly/icon.icns new file mode 100644 index 00000000..15e7c52a Binary files /dev/null and b/composeApp/icons/nightly/icon.icns differ diff --git a/composeApp/icons/nightly/icon.ico b/composeApp/icons/nightly/icon.ico new file mode 100644 index 00000000..aaee01a3 Binary files /dev/null and b/composeApp/icons/nightly/icon.ico differ diff --git a/composeApp/icons/nightly/icon.png b/composeApp/icons/nightly/icon.png new file mode 100644 index 00000000..33774b89 Binary files /dev/null and b/composeApp/icons/nightly/icon.png differ diff --git a/composeApp/icons/stable/icon.icns b/composeApp/icons/stable/icon.icns new file mode 100644 index 00000000..7110d55f Binary files /dev/null and b/composeApp/icons/stable/icon.icns differ diff --git a/composeApp/icons/stable/icon.ico b/composeApp/icons/stable/icon.ico new file mode 100644 index 00000000..0448c504 Binary files /dev/null and b/composeApp/icons/stable/icon.ico differ diff --git a/composeApp/icons/stable/icon.png b/composeApp/icons/stable/icon.png new file mode 100644 index 00000000..3a59c7aa Binary files /dev/null and b/composeApp/icons/stable/icon.png differ diff --git a/composeApp/src/androidMain/ic_launcher-playstore.png b/composeApp/src/androidMain/ic_launcher-playstore.png new file mode 100644 index 00000000..5fd7f2f3 Binary files /dev/null and b/composeApp/src/androidMain/ic_launcher-playstore.png differ diff --git a/composeApp/src/androidMain/kotlin/org/spotube/spotube/media/PlaybackService.kt b/composeApp/src/androidMain/kotlin/org/spotube/spotube/media/PlaybackService.kt index 4a6cd6f7..49b55ac4 100644 --- a/composeApp/src/androidMain/kotlin/org/spotube/spotube/media/PlaybackService.kt +++ b/composeApp/src/androidMain/kotlin/org/spotube/spotube/media/PlaybackService.kt @@ -29,6 +29,7 @@ import androidx.core.app.NotificationCompat import androidx.media3.common.MediaItem as Media3MediaItem import androidx.media3.common.Player import androidx.media3.common.util.UnstableApi +import androidx.media3.session.DefaultMediaNotificationProvider import androidx.media3.session.LibraryResult import androidx.media3.session.MediaLibraryService import androidx.media3.session.MediaLibraryService.LibraryParams @@ -41,6 +42,7 @@ import com.google.common.util.concurrent.Futures import com.google.common.util.concurrent.ListenableFuture import com.google.common.util.concurrent.SettableFuture import org.spotube.spotube.MainActivity +import org.spotube.spotube.R import org.spotube.spotube.core.audioplayer.AudioPlayer import org.spotube.spotube.core.audioplayer.AudioPlayerInterface import org.spotube.spotube.core.audioplayer.AudioPlayerQueue @@ -75,6 +77,16 @@ class PlaybackService : MediaLibraryService(), KoinComponent { createNotificationChannel() + // Media3 posts the real playback notification; point it at our channel, + // ID and monochrome icon so it replaces the placeholder below in place. + setMediaNotificationProvider( + DefaultMediaNotificationProvider.Builder(this) + .setChannelId(CHANNEL_ID) + .setNotificationId(NOTIFICATION_ID) + .build() + .apply { setSmallIcon(R.drawable.ic_stat_spotube) } + ) + val sessionActivity = PendingIntent.getActivity( this, 0, @@ -87,7 +99,7 @@ class PlaybackService : MediaLibraryService(), KoinComponent { val notification = NotificationCompat.Builder(this, CHANNEL_ID) .setContentTitle("Spotube") .setContentText(runBlocking { getString(Res.string.notification_playback_service_text) }) - .setSmallIcon(android.R.drawable.ic_media_play) + .setSmallIcon(R.drawable.ic_stat_spotube) .setContentIntent(sessionActivity) .setOngoing(true) .build() diff --git a/composeApp/src/androidMain/res/drawable-hdpi/ic_stat_spotube.png b/composeApp/src/androidMain/res/drawable-hdpi/ic_stat_spotube.png new file mode 100644 index 00000000..3366b209 Binary files /dev/null and b/composeApp/src/androidMain/res/drawable-hdpi/ic_stat_spotube.png differ diff --git a/composeApp/src/androidMain/res/drawable-mdpi/ic_stat_spotube.png b/composeApp/src/androidMain/res/drawable-mdpi/ic_stat_spotube.png new file mode 100644 index 00000000..34ece2c6 Binary files /dev/null and b/composeApp/src/androidMain/res/drawable-mdpi/ic_stat_spotube.png differ diff --git a/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml b/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index 5c58c8bf..00000000 --- a/composeApp/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/composeApp/src/androidMain/res/drawable-xhdpi/ic_stat_spotube.png b/composeApp/src/androidMain/res/drawable-xhdpi/ic_stat_spotube.png new file mode 100644 index 00000000..c6c20ea4 Binary files /dev/null and b/composeApp/src/androidMain/res/drawable-xhdpi/ic_stat_spotube.png differ diff --git a/composeApp/src/androidMain/res/drawable-xxhdpi/ic_stat_spotube.png b/composeApp/src/androidMain/res/drawable-xxhdpi/ic_stat_spotube.png new file mode 100644 index 00000000..c1e5e263 Binary files /dev/null and b/composeApp/src/androidMain/res/drawable-xxhdpi/ic_stat_spotube.png differ diff --git a/composeApp/src/androidMain/res/drawable-xxxhdpi/ic_stat_spotube.png b/composeApp/src/androidMain/res/drawable-xxxhdpi/ic_stat_spotube.png new file mode 100644 index 00000000..65dff9e5 Binary files /dev/null and b/composeApp/src/androidMain/res/drawable-xxxhdpi/ic_stat_spotube.png differ diff --git a/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml b/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 9faa29bb..00000000 --- a/composeApp/src/androidMain/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml b/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml index 2ad9808b..8fe69f1a 100644 --- a/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml @@ -17,6 +17,7 @@ --> - - - \ No newline at end of file + + + + diff --git a/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml b/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml index 2ad9808b..8fe69f1a 100644 --- a/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -17,6 +17,7 @@ --> - - - \ No newline at end of file + + + + diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png index a571e600..a5172fdf 100644 Binary files a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png and b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png differ diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_foreground.png b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..c179cb79 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_monochrome.png b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..66caafd4 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_monochrome.png differ diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png index 61da551c..f454ac1a 100644 Binary files a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png and b/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png index c41dd285..11b63a79 100644 Binary files a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png and b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png differ diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_foreground.png b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..f096f291 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_monochrome.png b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..108f8d41 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_monochrome.png differ diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png index db5080a7..4d1c0d9d 100644 Binary files a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png and b/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png index 6dba46da..25ce076f 100644 Binary files a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png and b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_foreground.png b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..50fa2ecc Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_monochrome.png b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..c74596a5 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_monochrome.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png index da31a871..c4e0a2f1 100644 Binary files a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png and b/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png index 15ac6817..f7f2f2ff 100644 Binary files a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png and b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_foreground.png b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..57bc7641 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..9814b717 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_monochrome.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png index b216f2d3..08078439 100644 Binary files a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png and b/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png index f25a4197..dd0287fc 100644 Binary files a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png and b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..92478998 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..2b749b28 Binary files /dev/null and b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_monochrome.png differ diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png index e96783cc..f49af5e3 100644 Binary files a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png and b/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/composeApp/src/androidMain/res/values/colors.xml b/composeApp/src/androidMain/res/values/colors.xml new file mode 100644 index 00000000..19670936 --- /dev/null +++ b/composeApp/src/androidMain/res/values/colors.xml @@ -0,0 +1,21 @@ + + + + + #000000 + diff --git a/composeApp/src/commonMain/composeResources/values/strings.xml b/composeApp/src/commonMain/composeResources/values/strings.xml index 66531e38..e4d68e93 100644 --- a/composeApp/src/commonMain/composeResources/values/strings.xml +++ b/composeApp/src/commonMain/composeResources/values/strings.xml @@ -907,6 +907,7 @@ Verified GitHub stars GitHub repository URL + github.com No releases found diff --git a/composeApp/src/commonMain/kotlin/org/spotube/spotube/modules/plugin/PluginScreen.kt b/composeApp/src/commonMain/kotlin/org/spotube/spotube/modules/plugin/PluginScreen.kt index 0c969bfe..d5542e1f 100644 --- a/composeApp/src/commonMain/kotlin/org/spotube/spotube/modules/plugin/PluginScreen.kt +++ b/composeApp/src/commonMain/kotlin/org/spotube/spotube/modules/plugin/PluginScreen.kt @@ -40,6 +40,8 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.ExperimentalLayoutApi +import androidx.compose.foundation.layout.FlowRow import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -134,6 +136,7 @@ import spotube.composeapp.generated.resources.Res import spotube.composeapp.generated.resources.plugin_discover_badge_official import spotube.composeapp.generated.resources.plugin_discover_badge_verified import spotube.composeapp.generated.resources.plugin_discover_repository_content_description +import spotube.composeapp.generated.resources.plugin_discover_repository_host import spotube.composeapp.generated.resources.plugin_discover_stars_content_description import spotube.composeapp.generated.resources.plugin_info_abilities import spotube.composeapp.generated.resources.plugin_info_api_version @@ -848,6 +851,7 @@ private fun SupportDialog( } } +@OptIn(ExperimentalLayoutApi::class) @Composable private fun DiscoverRepoCard( repo: GitHubRepo, @@ -952,9 +956,10 @@ private fun DiscoverRepoCard( overflow = TextOverflow.Ellipsis ) } - Row( - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.spacedBy(8.dp) + FlowRow( + horizontalArrangement = Arrangement.spacedBy(8.dp), + verticalArrangement = Arrangement.spacedBy(4.dp), + itemVerticalAlignment = Alignment.CenterVertically ) { Text( repo.owner.login, @@ -997,9 +1002,10 @@ private fun DiscoverRepoCard( tint = AppTheme.colors.onSurfaceVariant ) Text( - "github.com", + stringResource(Res.string.plugin_discover_repository_host), style = AppTheme.typography.labelSmall, - color = AppTheme.colors.onSurfaceVariant + color = AppTheme.colors.onSurfaceVariant, + singleLine = true ) } } diff --git a/composeApp/src/jvmMain/kotlin/org/spotube/spotube/main.kt b/composeApp/src/jvmMain/kotlin/org/spotube/spotube/main.kt index 4a3148cd..e754c8d3 100644 --- a/composeApp/src/jvmMain/kotlin/org/spotube/spotube/main.kt +++ b/composeApp/src/jvmMain/kotlin/org/spotube/spotube/main.kt @@ -32,6 +32,9 @@ import androidx.compose.ui.unit.isSpecified import androidx.compose.ui.window.WindowPlacement import androidx.compose.ui.unit.dp import androidx.compose.ui.window.rememberWindowState +import org.jetbrains.compose.resources.painterResource +import spotube.composeapp.generated.resources.Res +import spotube.composeapp.generated.resources.spotube_logo import dev.nucleusframework.application.DecoratedWindow import dev.nucleusframework.application.NucleusBackend import dev.nucleusframework.application.nucleusApplication @@ -200,6 +203,7 @@ fun main() { } }, title = "Spotube", + icon = painterResource(Res.drawable.spotube_logo), visible = isWindowVisible ) { CompositionLocalProvider( diff --git a/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher.png b/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..0c944468 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher.png differ diff --git a/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher_foreground.png b/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..cc0dfc4e Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher_monochrome.png b/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..aeac4559 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher_monochrome.png differ diff --git a/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher_round.png b/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..aef4bb59 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher.png b/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..b293b0c7 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher.png differ diff --git a/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher_foreground.png b/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..5af74804 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher_monochrome.png b/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..092f0ad8 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher_monochrome.png differ diff --git a/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher_round.png b/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..bc1f2887 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher.png b/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..3c50965a Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher_foreground.png b/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..41ff3ec9 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher_monochrome.png b/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..9214b754 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher_monochrome.png differ diff --git a/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher_round.png b/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..b5a3aaf9 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher.png b/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..6230862c Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher_foreground.png b/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..e828dd07 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..52bad80d Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher_monochrome.png differ diff --git a/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher_round.png b/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..2383e45a Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher.png b/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..6542cf1d Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..47b16fcb Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher_monochrome.png new file mode 100644 index 00000000..9e132a08 Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher_monochrome.png differ diff --git a/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher_round.png b/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..d67288fb Binary files /dev/null and b/composeApp/src/nightly/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/composeApp/src/nightly/res/values/strings.xml b/composeApp/src/nightly/res/values/strings.xml new file mode 100644 index 00000000..18731555 --- /dev/null +++ b/composeApp/src/nightly/res/values/strings.xml @@ -0,0 +1,21 @@ + + + + + Spotube Nightly + diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json index 4e8d485b..5a38d341 100644 --- a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -15,7 +15,8 @@ ], "idiom" : "universal", "platform" : "ios", - "size" : "1024x1024" + "size" : "1024x1024", + "filename" : "app-icon-1024-dark.png" }, { "appearances" : [ @@ -26,7 +27,8 @@ ], "idiom" : "universal", "platform" : "ios", - "size" : "1024x1024" + "size" : "1024x1024", + "filename" : "app-icon-1024-tinted.png" } ], "info" : { diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024-dark.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024-dark.png new file mode 100644 index 00000000..dbf53a46 Binary files /dev/null and b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024-dark.png differ diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024-tinted.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024-tinted.png new file mode 100644 index 00000000..eb3721eb Binary files /dev/null and b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024-tinted.png differ diff --git a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png index 53fc536f..dbf53a46 100644 Binary files a/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png and b/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png differ