mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
Revert "fix: configure Dagger Hilt for DI"
This reverts commit 874d32bc4c.
This commit is contained in:
@@ -37,7 +37,6 @@ dependencies {
|
||||
implementation(projects.buildLogic.propertiesParser)
|
||||
|
||||
implementation("com.android.tools.build:gradle:${libs.versions.agp.asProvider().get()}")
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.asProvider().get()}")
|
||||
implementation(libs.maven.publish)
|
||||
|
||||
implementation(libs.common.jkotlin)
|
||||
|
||||
+2
-5
@@ -40,10 +40,7 @@ class AndroidIDEPlugin : Plugin<Project> {
|
||||
return@run
|
||||
}
|
||||
|
||||
// Apply dependency injection for all modules
|
||||
plugins.apply(DIConfigPlugin::class.java)
|
||||
|
||||
if (this.isAndroidModule && !isFDroidBuild) {
|
||||
if (isAndroidModule && !isFDroidBuild) {
|
||||
// setup signing configuration
|
||||
plugins.apply(SigningConfigPlugin::class.java)
|
||||
}
|
||||
@@ -58,7 +55,7 @@ class AndroidIDEPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
val taskName = when {
|
||||
this.isAndroidModule -> "testDebugUnitTest"
|
||||
isAndroidModule -> "testDebugUnitTest"
|
||||
else -> "test"
|
||||
}
|
||||
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* This file is part of AndroidIDE.
|
||||
*
|
||||
* AndroidIDE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* AndroidIDE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.itsaky.androidide.plugins
|
||||
|
||||
import com.itsaky.androidide.plugins.util.isAndroidModule
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.VersionCatalogsExtension
|
||||
|
||||
/**
|
||||
* Configures dependency injection in a module.
|
||||
*
|
||||
* @author Akash Yadav
|
||||
*/
|
||||
class DIConfigPlugin : Plugin<Project> {
|
||||
|
||||
override fun apply(target: Project) = target.run {
|
||||
dependencies.add("implementation", "javax.inject:javax.inject:1")
|
||||
if (isAndroidModule) {
|
||||
val libs =
|
||||
rootProject.extensions.getByType(VersionCatalogsExtension::class.java).named("libs")
|
||||
val hiltAndroid = libs.findLibrary("hilt-android").get().get()
|
||||
dependencies.add("implementation", hiltAndroid)
|
||||
}
|
||||
Unit
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user