aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src/main/java/KaptConfigs.kt
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-11-29 02:38:06 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2021-12-03 12:59:58 +0530
commit81e9926b723e6f1214bae43cf0d177e81b4e821e (patch)
tree4c54972fe1688ff8853f70537fe6c98fac1d545d /buildSrc/src/main/java/KaptConfigs.kt
parenta80020477f4717f04d39593dd0c558182ec369a4 (diff)
buildSrc: remove
Diffstat (limited to 'buildSrc/src/main/java/KaptConfigs.kt')
-rw-r--r--buildSrc/src/main/java/KaptConfigs.kt34
1 files changed, 0 insertions, 34 deletions
diff --git a/buildSrc/src/main/java/KaptConfigs.kt b/buildSrc/src/main/java/KaptConfigs.kt
deleted file mode 100644
index db1c6d5a..00000000
--- a/buildSrc/src/main/java/KaptConfigs.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-import org.gradle.api.Project
-import org.gradle.kotlin.dsl.configure
-import org.jetbrains.kotlin.gradle.plugin.KaptExtension
-
-/** Apply default kapt configs to the [Project]. */
-internal fun Project.configureKapt() {
- extensions.configure<KaptExtension> {
- javacOptions {
- if (hasDaggerCompilerDependency) {
- // https://dagger.dev/dev-guide/compiler-options#fastinit-mode
- option("-Adagger.fastInit=enabled")
- // Enable the better, experimental error messages
- // https://github.com/google/dagger/commit/0d2505a727b54f47b8677f42dd4fc5c1924e37f5
- option("-Adagger.experimentalDaggerErrorMessages=enabled")
- // Share test components for when we start leveraging Hilt for tests
- // https://github.com/google/dagger/releases/tag/dagger-2.34
- option("-Adagger.hilt.shareTestComponents=true")
- // KAPT nests errors causing real issues to be suppressed in CI logs
- option("-Xmaxerrs", 500)
- // Enables per-module validation for faster error detection
- // https://github.com/google/dagger/commit/325b516ac6a53d3fc973d247b5231fafda9870a2
- option("-Adagger.moduleBindingValidation=ERROR")
- }
- }
- }
- // disable kapt tasks for unit tests
- tasks
- .matching { it.name.startsWith("kapt") && it.name.endsWith("UnitTestKotlin") }
- .configureEach { enabled = false }
-}
-
-private val Project.hasDaggerCompilerDependency: Boolean
- get() =
- configurations.any { it.dependencies.any { dependency -> dependency.name == "hilt-compiler" } }