dependencyRelocate

fun <T : ModuleDependency> Project.dependencyRelocate(dependency: T, relocateFrom: String, relocateTo: String = ".libs.", configuration: String = "implementation", configurationAction: T.() -> Unit = {}): T
  1. Adds the provided dependency as an implementation dependency

  2. Relocates the dependency to the provided package

Return

The T of the added dependency

Parameters

dependency

The dependency to add

relocateFrom

The package to relocate from

relocateTo

The package to relocate to

configurationAction

The configuration action for the dependency


fun Project.dependencyRelocate(dependency: String, relocateFrom: String = dependency.split(":").first(), relocateTo: String = ".libs.", configuration: String = "implementation", configurationAction: ExternalModuleDependency.() -> Unit = {}): ExternalModuleDependency
  1. Adds the provided dependency as an implementation dependency

  2. Relocates the dependency to the provided package

Return

The ExternalModuleDependency of the added dependency

Parameters

dependency

The dependency to add

relocateFrom

The package to relocate from

relocateTo

The package to relocate to

configurationAction

The configuration to add the dependency to