aboutsummaryrefslogtreecommitdiffstats
path: root/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-06-05 03:56:37 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2022-06-05 03:58:16 +0530
commit98f49e7b69dad95e973260743e4579d426a17b4a (patch)
treea3d48bb865bf4f6eaef41e9158ff64a76c07767a /build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts
parentfe3ca3f7d82436f2eaf1e6212ea278466dc85402 (diff)
downloadHardenedPass-98f49e7b69dad95e973260743e4579d426a17b4a.tar.gz
HardenedPass-98f49e7b69dad95e973260743e4579d426a17b4a.zip
kotlin-plugins: convert to full plugins
Diffstat (limited to 'build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts')
-rw-r--r--build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts43
1 files changed, 0 insertions, 43 deletions
diff --git a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts b/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts
deleted file mode 100644
index ac0f5337..00000000
--- a/build-logic/kotlin-plugins/src/main/kotlin/com.github.android-password-store.kotlin-kapt.gradle.kts
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
- * SPDX-License-Identifier: GPL-3.0-only
- */
-
-import org.gradle.api.Project
-
-plugins {
- kotlin("android")
- kotlin("kapt")
-}
-
-afterEvaluate {
- kapt {
- 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 }
-
-fun Project.hasDaggerCompilerDependency(): Boolean {
- return configurations.any {
- it.dependencies.any { dependency -> dependency.name == "hilt-compiler" }
- }
-}