@@ -49,6 +49,7 @@ def enableKotlin = (project.hasProperty("useKotlin") && project.useKotlin == "tr
4949if (enableKotlin) {
5050 apply plugin : ' kotlin-android'
5151 apply plugin : ' kotlin-parcelize'
52+ apply plugin : " org.jetbrains.kotlin.android"
5253}
5354
5455def onlyX86 = project. hasProperty(" onlyX86" )
@@ -195,8 +196,8 @@ android {
195196 namespace " __PACKAGE__"
196197
197198 if (enableKotlin) {
198- kotlinOptions {
199- jvmTarget = ' 1.8 '
199+ kotlin {
200+ jvmToolchain( 17 )
200201 }
201202 }
202203
@@ -218,8 +219,8 @@ android {
218219 }
219220
220221 compileOptions {
221- sourceCompatibility JavaVersion . VERSION_1_8
222- targetCompatibility JavaVersion . VERSION_1_8
222+ sourceCompatibility JavaVersion . VERSION_17
223+ targetCompatibility JavaVersion . VERSION_17
223224 }
224225
225226 sourceSets. main {
@@ -1012,8 +1013,12 @@ project.tasks.configureEach {
10121013 it. finalizedBy(buildMetadata)
10131014 }
10141015 // 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+ )) {
10171022 cleanupAllJars. dependsOn(it)
10181023 }
10191024}
0 commit comments