mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-11 06:44:00 +00:00
Migrate to Hilt KSP compiler (#3760)
* Migrate to Hilt KSP compiler
* Use generated code from AIDL
* Comment
* Revert "Use generated code from AIDL"
This reverts commit 64c3ecce84.
* Workaround for it
This commit is contained in:
@@ -5,8 +5,6 @@ plugins {
|
||||
id 'com.android.application' version "8.1.4"
|
||||
id 'com.android.library' version "8.1.4" apply false
|
||||
id 'org.jetbrains.kotlin.android' version "1.9.20"
|
||||
// TODO: Remove this after Dagger/Hilt finished fully migration to KSP.
|
||||
id 'org.jetbrains.kotlin.kapt' version "1.9.20" apply false
|
||||
id 'org.jetbrains.kotlin.plugin.parcelize' version "1.9.20"
|
||||
id 'org.jetbrains.kotlin.plugin.serialization' version "1.9.20"
|
||||
id "com.google.devtools.ksp" version "1.9.20-1.0.14"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
id 'org.jetbrains.kotlin.kapt'
|
||||
id 'com.google.devtools.ksp'
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -20,9 +20,21 @@ android {
|
||||
addFrameworkJar('framework-13.jar')
|
||||
compileOnlyCommonJars()
|
||||
|
||||
// Workaround for https://github.com/google/dagger/issues/4158
|
||||
androidComponents {
|
||||
onVariants(selector().all(), { variant ->
|
||||
afterEvaluate {
|
||||
def capName = variant.name.capitalize()
|
||||
tasks.getByName("ksp${capName}Kotlin") {
|
||||
setSource(tasks.getByName("compile${capName}Aidl").outputs)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "com.google.dagger:hilt-android:$daggerVersion"
|
||||
kapt "com.google.dagger:hilt-compiler:$daggerVersion"
|
||||
ksp "com.google.dagger:hilt-compiler:$daggerVersion"
|
||||
|
||||
implementation "androidx.concurrent:concurrent-futures:1.1.0"
|
||||
implementation "androidx.lifecycle:lifecycle-common:2.6.2"
|
||||
|
||||
Reference in New Issue
Block a user