diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 329b0e52..e46c7038 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -38,7 +38,7 @@ require(rustAndroidAbis.all { it in supportedRustAndroidAbis }) { android { namespace = "com.zarz.spotiflac" compileSdk = 37 - ndkVersion = flutter.ndkVersion + ndkVersion = "30.0.16248370" buildFeatures { buildConfig = true @@ -50,7 +50,7 @@ android { externalNativeBuild { cmake { path = file("src/main/cpp/CMakeLists.txt") - version = "3.22.1" + version = "4.1.2" } } @@ -98,7 +98,13 @@ android { versionName = flutter.versionName multiDexEnabled = true externalNativeBuild { - cmake { arguments += "-DANDROID_STL=c++_static" } + cmake { + arguments += listOf( + "-DANDROID_STL=c++_static", + // Oboe's minimum predates the policies removed in CMake 4. + "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", + ) + } } ndk { @@ -160,7 +166,7 @@ val buildRustBackend = tasks.register("buildRustBackend") { environment( "ANDROID_NDK_HOME", System.getenv("ANDROID_NDK_HOME") - ?: android.sdkDirectory.resolve("ndk/29.0.14206865").absolutePath, + ?: android.sdkDirectory.resolve("ndk/30.0.16248370").absolutePath, ) inputs.files(fileTree(rustBackendDir) { include("**/*.rs", "**/*.toml", "**/*.lock", "**/*.js", "**/*.tsv", "**/*.pem") @@ -202,7 +208,7 @@ dependencies { implementation("androidx.activity:activity-ktx:1.13.0") // NativeDownloadFinalizer imports FFmpegKit APIs directly. The Flutter // plugin owns the runtime AAR; compileOnly avoids packaging it twice here. - compileOnly("com.antonkarpenko:ffmpeg-kit-audio:2.2.2") + compileOnly("com.antonkarpenko:ffmpeg-kit-audio:2.2.3") testImplementation("junit:junit:4.13.2") testImplementation("org.json:json:20260814") diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index dad02418..0ce8225a 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-all.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index 58795859..5d927abb 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -20,7 +20,7 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "9.4.1" apply false - id("org.jetbrains.kotlin.android") version "2.4.20" apply false + id("org.jetbrains.kotlin.android") version "2.4.21" apply false } include(":app") diff --git a/scripts/build_rust_backend.sh b/scripts/build_rust_backend.sh index fd84cc7a..6b7be744 100644 --- a/scripts/build_rust_backend.sh +++ b/scripts/build_rust_backend.sh @@ -54,7 +54,7 @@ done if [[ "$PLATFORM" == "android" ]]; then if [[ -z "${ANDROID_NDK_HOME:-}" ]]; then - echo "Error: set ANDROID_NDK_HOME to Android NDK 29.0.14206865." >&2 + echo "Error: set ANDROID_NDK_HOME to Android NDK 30.0.16248370." >&2 exit 1 fi case "$(uname -s)" in diff --git a/third_party/audio_service/android/gradle/wrapper/gradle-wrapper.properties b/third_party/audio_service/android/gradle/wrapper/gradle-wrapper.properties index 79f34141..566107b4 100644 --- a/third_party/audio_service/android/gradle/wrapper/gradle-wrapper.properties +++ b/third_party/audio_service/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/third_party/audioplayers_android/android/build.gradle b/third_party/audioplayers_android/android/build.gradle index 8b3902bf..bb799511 100644 --- a/third_party/audioplayers_android/android/build.gradle +++ b/third_party/audioplayers_android/android/build.gradle @@ -2,8 +2,8 @@ group 'xyz.luan.audioplayers' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.7.10' - ext.coroutines_version = '1.6.4' + ext.kotlin_version = '2.4.21' + ext.coroutines_version = '1.11.0' repositories { google() @@ -11,9 +11,9 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' + classpath 'com.android.tools.build:gradle:9.4.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1" + classpath "de.mannodermaus.gradle.plugins:android-junit5:2.0.1" } } @@ -28,7 +28,7 @@ apply plugin: 'com.android.library' apply plugin: 'de.mannodermaus.android-junit5' android { - compileSdk 36 + compileSdk 37 // Conditional for compatibility with AGP <4.2. if (project.android.hasProperty('namespace')) { @@ -69,12 +69,12 @@ allprojects { } dependencies { - implementation "androidx.core:core-ktx:1.9.0" // Do not pump unless dropping support for AGP7 - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "androidx.core:core-ktx:1.19.1" + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" - testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0' - testImplementation 'org.assertj:assertj-core:3.23.1' + testImplementation 'org.junit.jupiter:junit-jupiter:6.1.3' + testImplementation 'org.assertj:assertj-core:3.27.7' } repositories { mavenCentral() diff --git a/third_party/spotiflac_discord/android/build.gradle b/third_party/spotiflac_discord/android/build.gradle index 93631f41..c88c27ca 100644 --- a/third_party/spotiflac_discord/android/build.gradle +++ b/third_party/spotiflac_discord/android/build.gradle @@ -9,6 +9,7 @@ def discordSdkEnabled = System.getenv('SPOTIFLAC_DISCORD_SDK') != '0' android { namespace 'com.zarz.spotiflac.discord' compileSdk 37 + ndkVersion '30.0.16248370' defaultConfig { minSdk 24 externalNativeBuild { @@ -25,6 +26,6 @@ android { kotlinOptions { jvmTarget = '25' } if (discordSdkEnabled) sourceSets.main.assets.srcDir('../sdk/notices') externalNativeBuild { - cmake { path 'CMakeLists.txt'; version '3.22.1' } + cmake { path 'CMakeLists.txt'; version '4.1.2' } } }