From 81e9926b723e6f1214bae43cf0d177e81b4e821e Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 29 Nov 2021 02:38:06 +0530 Subject: buildSrc: remove --- buildSrc/src/main/java/KaptConfigs.kt | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 buildSrc/src/main/java/KaptConfigs.kt (limited to 'buildSrc/src/main/java/KaptConfigs.kt') 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 { - 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" } } -- cgit v1.2.3