maaxgr
11/09/2022, 9:58 AM/**
* Adds a dependency to the 'implementation' configuration.
*
* @param dependencyNotation notation for the dependency to be added.
* @param dependencyConfiguration expression to use to configure the dependency.
* @return The dependency.
*
* @see [DependencyHandler.add]
*/
fun DependencyHandler.`implementation2`(
dependencyNotation: Provider<*>,
dependencyConfiguration: Action<ExternalModuleDependency>
): Unit = addConfiguredDependencyTo(
this, "implementation", dependencyNotation, dependencyConfiguration
)
But that can't be the solution or?
This is my current buildSrc/build.gradle.kts:
repositories {
google()
mavenCentral()
maven("<https://jitpack.io>")
}
plugins {
`kotlin-dsl`
}
dependencies {
implementation("com.android.tools.build:gradle:7.2.1")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
}
Vampire
11/09/2022, 10:20 AMplugins
block that ensures those are actually available at runtime. If you want to use them in a "normal" Kotlin file, you need to define the accessor yourself or not use such accessors, but work with them String
based.
But besides that, I'd recommend you use a version catalog instead of such a Dependencies
class.maaxgr
11/09/2022, 10:36 AMVampire
11/09/2022, 10:37 AMVampire
11/09/2022, 10:38 AMmaaxgr
11/09/2022, 10:49 AM