Created
August 4, 2022 00:34
-
-
Save cdsap/3def4322e9c7ef3bba780adf8f2832da to your computer and use it in GitHub Desktop.
Room + Ksp + Variants
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
androidComponents { | |
onVariants { variant -> | |
afterEvaluate { | |
tasks.named<KspTask>("ksp${variant.name.capitalize()}Kotlin").configure { | |
options.add( | |
org.jetbrains.kotlin.gradle.plugin.SubpluginOption( | |
"apoption", | |
"room.schemaLocation=${project.layout.projectDirectory.dir("schemas-${variant.name}").asFile.path}" | |
) | |
) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment