From a53177675349cc5d51f97da93948ffca32b39049 Mon Sep 17 00:00:00 2001 From: Abrynos <6608231+Abrynos@users.noreply.github.com> Date: Sat, 18 Feb 2023 12:09:49 +0100 Subject: [PATCH] Upgrade Java to 11 --- app/build.gradle | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f6a9545..edd7dff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -46,7 +46,10 @@ android { javaCompileOptions { annotationProcessorOptions { - arguments["room.incremental"] = "true" + arguments += [ + "room.schemaLocation": "$projectDir/schemas", + "room.incremental" : "true" + ] } } signingConfig signingConfigs.debug @@ -61,17 +64,14 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlin { jvmToolchain { - languageVersion.set(JavaLanguageVersion.of(18)) + languageVersion.set(JavaLanguageVersion.of(11)) } - // Or shorter: - jvmToolchain(18) - // For example: - jvmToolchain(8) + jvmToolchain(11) } buildFeatures { viewBinding true @@ -103,6 +103,7 @@ dependencies { def room_version = "2.5.0" implementation "androidx.room:room-runtime:$room_version" + annotationProcessor "androidx.room:room-compiler:$room_version" kapt "androidx.room:room-compiler:$room_version" implementation fileTree(include: ["*.jar"], dir: "libs")