@@ -49,6 +49,7 @@ def enableKotlin = (project.hasProperty("useKotlin") && project.useKotlin == "tr
49
49
if (enableKotlin) {
50
50
apply plugin : ' kotlin-android'
51
51
apply plugin : ' kotlin-parcelize'
52
+ apply plugin : " org.jetbrains.kotlin.android"
52
53
}
53
54
54
55
def onlyX86 = project. hasProperty(" onlyX86" )
@@ -195,8 +196,8 @@ android {
195
196
namespace " __PACKAGE__"
196
197
197
198
if (enableKotlin) {
198
- kotlinOptions {
199
- jvmTarget = ' 1.8 '
199
+ kotlin {
200
+ jvmToolchain( 17 )
200
201
}
201
202
}
202
203
@@ -218,8 +219,8 @@ android {
218
219
}
219
220
220
221
compileOptions {
221
- sourceCompatibility JavaVersion . VERSION_1_8
222
- targetCompatibility JavaVersion . VERSION_1_8
222
+ sourceCompatibility JavaVersion . VERSION_17
223
+ targetCompatibility JavaVersion . VERSION_17
223
224
}
224
225
225
226
sourceSets. main {
@@ -1012,8 +1013,12 @@ project.tasks.configureEach {
1012
1013
it. finalizedBy(buildMetadata)
1013
1014
}
1014
1015
// added because of a error with gradle 8 telling us to add this
1015
- // could we do it another way?
1016
- if (! (name =~ / AndroidTest/ ) && (name =~ / process(Debug|Release)Resources/ )) {
1016
+ // because buildMetadata uses the output of those
1017
+ // TODO: there must be a way to make it simpler
1018
+ if (! (name =~ / AndroidTest/ ) && (
1019
+ name =~ / process(Debug|Release)Resources/ ||
1020
+ name =~ / compile(Debug|Release)Kotlin/
1021
+ )) {
1017
1022
cleanupAllJars. dependsOn(it)
1018
1023
}
1019
1024
}
0 commit comments