@@ -2,35 +2,35 @@ apply plugin: 'com.android.application'
22apply plugin : ' kotlin-android'
33
44android {
5- compileSdk 32
5+ namespace " ktx.demo"
6+ compileSdk 34
67 sourceSets {
78 main {
89 manifest. srcFile ' AndroidManifest.xml'
9- java. srcDirs( ' src/main/java' , ' src/main/kotlin' )
10- aidl. srcDirs( ' src/main/java' , ' src/main/kotlin' )
11- renderscript. srcDirs( ' src/main/java' , ' src/main/kotlin' )
12- res. srcDirs( ' res' )
13- assets. srcDirs( ' ../assets' )
14- jniLibs. srcDirs( ' libs' )
10+ java. setSrcDirs([ ' src/main/java' , ' src/main/kotlin' ] )
11+ aidl. setSrcDirs([ ' src/main/java' , ' src/main/kotlin' ] )
12+ renderscript. setSrcDirs([ ' src/main/java' , ' src/main/kotlin' ] )
13+ res. setSrcDirs([ ' res' ] )
14+ assets. setSrcDirs([ ' ../assets' ] )
15+ jniLibs. setSrcDirs([ ' libs' ] )
1516 }
1617 }
1718 packagingOptions {
18- resources. with {
19- excludes + = [' META-INF/robovm/ios/robovm.xml' ,
20- ' META-INF/DEPENDENCIES.txt ' , ' META-INF/DEPENDENCIES ' , ' META-INF/dependencies.txt' , ' **/*.gwt.xml' ]
19+ resources {
20+ excludes + = [' META-INF/robovm/ios/robovm.xml' , ' META-INF/DEPENDENCIES.txt ' , ' META-INF/DEPENDENCIES ' ,
21+ ' META-INF/dependencies.txt' , ' **/*.gwt.xml' ]
2122 pickFirsts + = [' META-INF/LICENSE.txt' , ' META-INF/LICENSE' , ' META-INF/license.txt' , ' META-INF/LGPL2.1' ,
22- ' META-INF/NOTICE.txt' , ' META-INF/NOTICE' , ' META-INF/notice.txt' ]
23+ ' META-INF/NOTICE.txt' , ' META-INF/NOTICE' , ' META-INF/notice.txt' ]
2324 }
2425 }
2526 defaultConfig {
2627 applicationId ' ktx.demo'
2728 minSdkVersion 19
28- targetSdkVersion 32
29+ targetSdkVersion 34
2930 versionCode 1
3031 versionName " 1.0"
3132 multiDexEnabled true
3233 }
33- namespace " ktx.demo"
3434 compileOptions {
3535 sourceCompatibility " 11"
3636 targetCompatibility " 11"
@@ -43,9 +43,8 @@ android {
4343 }
4444 }
4545
46- kotlin {
47- jvmToolchain(11 )
48- }
46+ kotlin. compilerOptions. jvmTarget. set(org.jetbrains.kotlin.gradle.dsl.JvmTarget . JVM_11 )
47+
4948}
5049
5150repositories {
@@ -56,7 +55,7 @@ repositories {
5655configurations { natives }
5756
5857dependencies {
59- coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:2.0.3 '
58+ coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:2.0.4 '
6059 implementation " com.badlogicgames.gdx-controllers:gdx-controllers-android:$gdxControllersVersion "
6160 implementation " com.badlogicgames.gdx:gdx-backend-android:$gdxVersion "
6261 implementation project(' :core' )
@@ -90,7 +89,7 @@ tasks.register('copyAndroidNatives') {
9089 file(" libs/x86_64/" ). mkdirs()
9190 file(" libs/x86/" ). mkdirs()
9291
93- configurations. named( " natives" ) . orNull . copy(). files. each { jar ->
92+ configurations. natives. copy(). files. each { jar ->
9493 def outputDir = null
9594 if (jar. name. endsWith(" natives-armeabi-v7a.jar" )) outputDir = file(" libs/armeabi-v7a" )
9695 if (jar. name. endsWith(" natives-arm64-v8a.jar" )) outputDir = file(" libs/arm64-v8a" )
@@ -106,6 +105,7 @@ tasks.register('copyAndroidNatives') {
106105 }
107106 }
108107}
108+
109109tasks. matching { it. name. contains(" merge" ) && it. name. contains(" JniLibFolders" ) }. configureEach { packageTask ->
110110 packageTask. dependsOn ' copyAndroidNatives'
111111}
0 commit comments