From 489aebf6294891bee0d9d0d60445b36417d96e86 Mon Sep 17 00:00:00 2001 From: Jaehwa Noh Date: Thu, 24 Oct 2024 11:27:33 +0900 Subject: [PATCH] Fix duplicated implementation of hilt. (#1570) Change-Id: I82c2e06b594297cdae7009ee5e87162d0295eb7c --- .../convention/src/main/kotlin/HiltConventionPlugin.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build-logic/convention/src/main/kotlin/HiltConventionPlugin.kt b/build-logic/convention/src/main/kotlin/HiltConventionPlugin.kt index a8228e5af3..f49366f755 100644 --- a/build-logic/convention/src/main/kotlin/HiltConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/HiltConventionPlugin.kt @@ -26,7 +26,13 @@ class HiltConventionPlugin : Plugin { pluginManager.apply("com.google.devtools.ksp") dependencies { add("ksp", libs.findLibrary("hilt.compiler").get()) - add("implementation", libs.findLibrary("hilt.core").get()) + } + + // Add support for Jvm Module, base on org.jetbrains.kotlin.jvm + pluginManager.withPlugin("org.jetbrains.kotlin.jvm") { + dependencies { + add("implementation", libs.findLibrary("hilt.core").get()) + } } /** Add support for Android modules, based on [AndroidBasePlugin] */