From 5565564e70a8d34d8b59ad53f6e06dc870a7b45c Mon Sep 17 00:00:00 2001 From: utzcoz Date: Sat, 1 Apr 2023 12:43:05 +0800 Subject: [PATCH] gradle: Fix building with JDK11+ 1. Bump Kotlin version to 1.7.10. 2. Bump Hilt version to 2.45. 3. Add implementation of lifecycle-viewmodel-ktx dependency explicitly to fix duplicate class error. Signed-off-by: utzcoz --- build.gradle | 4 ++-- src/xrt/targets/android_common/build.gradle | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index ca065e988..350ddee24 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { ext { - kotlinVersion = '1.7.0' + kotlinVersion = '1.7.10' latestAboutLibsRelease = '8.9.4' @@ -15,7 +15,7 @@ buildscript { androidxCardViewVersion = '1.0.0' androidxRecyclerViewVersion = '1.2.1' - hiltVersion = '2.44.2' + hiltVersion = '2.45' materialVersion = '1.8.0' diff --git a/src/xrt/targets/android_common/build.gradle b/src/xrt/targets/android_common/build.gradle index 34e754912..c3e5692d3 100644 --- a/src/xrt/targets/android_common/build.gradle +++ b/src/xrt/targets/android_common/build.gradle @@ -52,6 +52,7 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" implementation "androidx.constraintlayout:constraintlayout:$androidxConstraintLayoutVersion" implementation "com.google.android.material:material:$materialVersion" + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidxLifecycleVersion" // Not directly used but included to avoid version conflicts