Skip to content

Commit

Permalink
Move Hilt from KAPT to KSP (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob authored Jun 17, 2024
1 parent 0177492 commit 7d9e69f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 28 deletions.
2 changes: 0 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
id("net.twisterrob.inventory.mapping")
id("net.twisterrob.inventory.upgradeTest")
id("net.twisterrob.inventory.build.tests.instrumentation")
id("com.google.devtools.ksp")
}

dependencies {
Expand Down Expand Up @@ -35,7 +34,6 @@ dependencies {
implementation(libs.androidx.swiperefreshlayout)
implementation(libs.androidx.webkit)
implementation(libs.slf4j.api)
annotationProcessor(libs.dagger.hilt.apt)
ksp(libs.glide.ksp)

// Class.forName("org.apache.xml.serializer.Version").getDeclaredMethod("main", String[].class)
Expand Down
1 change: 0 additions & 1 deletion android/data/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id("net.twisterrob.inventory.android.module")
id("com.google.devtools.ksp")
}

dependencies {
Expand Down
1 change: 0 additions & 1 deletion android/data/svg/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id("net.twisterrob.inventory.android.app")
id("com.google.devtools.ksp")
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ plugins {
id("org.gradle.java-base")
id("com.google.dagger.hilt.android")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.kapt")
id("org.gradle.idea")
}

plugins.withId("com.android.base") {
// REPORT ordering matters, this has to be after AGP.
plugins.apply("com.google.devtools.ksp")
}

dependencies {
"implementation"(libs.dagger.hilt)
"kapt"(libs.dagger.hilt.apt)
"ksp"(libs.dagger.hilt.apt)
}

tasks.withType<JavaCompile>().configureEach javac@{
Expand All @@ -41,28 +45,8 @@ hilt {
// disableCrossCompilationRootValidation = false // default (2.46.1): false
}

//val daggerFlags = mapOf(
// "dagger.experimentalDaggerErrorMessages" to "disabled",
//)
//
//android {
// defaultConfig {
// javaCompileOptions {
// annotationProcessorOptions {
// daggerFlags.forEach { (key, value) ->
// argument(key, value)
// }
// }
// }
// }
//}
//
//kapt {
// arguments {
// daggerFlags.forEach { (key, value) ->
// arg(key, value)
// }
// }
//ksp {
// arg("dagger.experimentalDaggerErrorMessages" to "disabled")
//}

androidComponents.onVariants { variant ->
Expand Down

0 comments on commit 7d9e69f

Please sign in to comment.