@@ -184,20 +184,15 @@ android {
184184
185185 compileOptions {
186186 isCoreLibraryDesugaringEnabled = true
187- sourceCompatibility = JavaVersion .VERSION_17
188- targetCompatibility = JavaVersion .VERSION_17
187+ sourceCompatibility = JavaVersion .VERSION_21
188+ targetCompatibility = JavaVersion .VERSION_21
189189 }
190190
191191 buildFeatures {
192192 buildConfig = true
193193 viewBinding = true
194194 }
195195
196- kotlinOptions {
197- jvmTarget = JavaVersion .VERSION_17 .toString()
198- freeCompilerArgs + = listOf (" -opt-in=kotlin.RequiresOptIn" )
199- }
200-
201196 packaging {
202197 resources.excludes + = setOf (
203198 " META-INF/DEPENDENCIES" ,
@@ -328,6 +323,20 @@ easylauncher {
328323 }
329324}
330325
326+ java {
327+ toolchain {
328+ languageVersion.set(JavaLanguageVersion .of(21 ))
329+ }
330+ }
331+
332+
333+ kotlin {
334+ compilerOptions {
335+ jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget .JVM_21 )
336+ freeCompilerArgs.add(" -opt-in=kotlin.RequiresOptIn" )
337+ }
338+ }
339+
331340tasks.register(" checkCorrectBranch" ) {
332341 if (! grgit.branch.current().name.equals(" master" )) {
333342 throw GradleException (" Please use 'master' branch to generate a release build" )
@@ -436,7 +445,7 @@ dependencies {
436445 testImplementation(" com.squareup.okhttp3:mockwebserver:5.1.0" )
437446 testImplementation(" com.flextrade.jfixture:jfixture:2.7.2" )
438447 testImplementation(" com.shazam:shazamcrest:0.11" )
439- testImplementation(" org.robolectric:robolectric:4.14.1 " )
448+ testImplementation(" org.robolectric:robolectric:4.16 " )
440449 // we need it to test Parcelable implementation
441450 testImplementation(" org.jetbrains.kotlin:kotlin-reflect:2.2.10" )
442451 testImplementation(" junit:junit:4.13.2" )
0 commit comments