diff --git a/CHANGES b/CHANGES index 657b8e9b78c..a3c2472ac50 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,5 @@ [1.13.1] +- [BREAKING CHANGE] Android: Since 1.13.0 libGDX requires setting `android.useAndroidX=true` in your gradle.properties file. In 1.13.1 it is NO longer needed to define the `androidx.core:core` dependency in your Android module. - iOS: Update to MobiVM 2.3.22 - iOS: Fixes Gdx.openURI() not working on iOS 18.1 Simulator. - Change visibility of PolygonSpriteBatch.switchTexture() to protected diff --git a/backends/gdx-backend-android/build.gradle b/backends/gdx-backend-android/build.gradle index f25fab765d3..1d95aec1ed5 100644 --- a/backends/gdx-backend-android/build.gradle +++ b/backends/gdx-backend-android/build.gradle @@ -25,7 +25,6 @@ apply plugin: 'com.android.library' android { namespace "com.badlogic.gdx.backends.android" compileSdkVersion versions.androidCompileSdk - buildToolsVersion versions.androidBuildTools defaultConfig { minSdkVersion versions.androidMinSdk @@ -52,5 +51,6 @@ android { dependencies { implementation project(":gdx") + implementation libraries.android compileOnly libraries.compileOnly.android } diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index aa37766d1a6..af3da53df00 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -36,11 +36,12 @@ versions.jorbis = "0.0.17" versions.junit = "4.13.2" versions.androidPlugin = "8.1.2" versions.multiDex = "2.0.1" -versions.androidCompileSdk = 33 -versions.androidTargetSdk = 33 +versions.androidCompileSdk = 34 +versions.androidTargetSdk = 34 versions.androidMinSdk = 19 -versions.androidBuildTools = "33.0.2" -versions.androidFragment = "1.5.7" +versions.androidxFragment = "1.5.7" +versions.androidxCore = "1.13.1" +versions.kotlinBomTests = "2.0.21" versions.javaparser = "2.3.0" versions.spotless = "6.7.1" @@ -130,8 +131,12 @@ libraries.robovm = [ "com.mobidevelop.robovm:robovm-cocoatouch:${versions.robovm}" ] +libraries.android = [ + "androidx.core:core:${versions.androidxCore}", +] + libraries.compileOnly.android = [ - "androidx.fragment:fragment:${versions.androidFragment}" + "androidx.fragment:fragment:${versions.androidxFragment}" ] libraries.gwt = [ diff --git a/tests/gdx-tests-android/build.gradle b/tests/gdx-tests-android/build.gradle index 0359ee08da0..c76494c73f2 100644 --- a/tests/gdx-tests-android/build.gradle +++ b/tests/gdx-tests-android/build.gradle @@ -56,11 +56,12 @@ dependencies { implementation project(":backends:gdx-backend-android") implementation libraries.compileOnly.android implementation "androidx.multidex:multidex:${versions.multiDex}" + // Fix Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-X.X.X.jar + implementation(platform("org.jetbrains.kotlin:kotlin-bom:${versions.kotlinBomTests}")) } android { namespace "com.badlogic.gdx.tests.android" - buildToolsVersion versions.androidBuildTools compileSdkVersion versions.androidCompileSdk sourceSets { main {