Skip to content

Commit

Permalink
Let the IDE recognize generated code when using KSP (#279)
Browse files Browse the repository at this point in the history
Co-authored-by: Vinay Gaba <vinaygaba@gmail.com>
  • Loading branch information
Omico and vinaygaba committed Dec 16, 2022
1 parent ca21d44 commit bbd293f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ plugins {

if (project.hasProperty('useKsp')) {
apply plugin: 'com.google.devtools.ksp'
kotlin {
sourceSets.configureEach {
kotlin.srcDirs += "build/generated/ksp/${it.name}/kotlin"
}
}
} else {
apply plugin: 'kotlin-kapt'
kapt {
Expand All @@ -31,7 +36,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand Down Expand Up @@ -72,7 +77,7 @@ if (project.hasProperty("useKsp")) {

dependencies {
// Showkase dependencies
// TODO(vinaygaba): Using debugImplementation was causing kapt related NonExistentClass errors.
// TODO(vinaygaba): Using debugImplementation was causing kapt related NonExistentClass errors.
// Figure out a way to enable using debugImplementation
implementation project(':showkase')
implementation project(':sample-submodule')
Expand Down

0 comments on commit bbd293f

Please sign in to comment.