Fix: fix generated ksp search path

This commit is contained in:
kr328 2021-05-25 19:40:44 +08:00
parent 5594485bec
commit c48ce82640

View File

@ -48,15 +48,6 @@ android {
kotlinOptions { kotlinOptions {
jvmTarget = "1.8" jvmTarget = "1.8"
} }
sourceSets {
named("debug") {
java.srcDir(buildDir.resolve("generated/ksp/debug/kotlin"))
}
named("release") {
java.srcDir(buildDir.resolve("generated/ksp/release/kotlin"))
}
}
} }
dependencies { dependencies {
@ -75,3 +66,11 @@ dependencies {
implementation("dev.rikka.rikkax.preference:multiprocess:$muiltprocessVersion") implementation("dev.rikka.rikkax.preference:multiprocess:$muiltprocessVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$serializationVersion")
} }
afterEvaluate {
android {
libraryVariants.forEach {
sourceSets[it.name].java.srcDir(buildDir.resolve("generated/ksp/${it.name}/kotlin"))
}
}
}