[Gradle, JS] KT-37207 Leave constructor NpmDependency once

This commit is contained in:
Ilya Goncharov
2020-03-27 12:18:23 +03:00
parent 459577e646
commit f6ef96a34c
4 changed files with 32 additions and 31 deletions
@@ -22,20 +22,29 @@ interface KotlinDependencyHandler {
fun implementation(dependencyNotation: Any): Dependency?
fun implementation(dependencyNotation: String, configure: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
fun <T : Dependency> implementation(dependency: T, configure: T.() -> Unit): T
fun implementation(dependencyNotation: String, configure: Closure<*>) = implementation(dependencyNotation) { ConfigureUtil.configure(configure, this) }
fun <T : Dependency> implementation(dependency: T, configure: Closure<*>) = implementation(dependency) { ConfigureUtil.configure(configure, this) }
fun implementation(dependencyNotation: String, configure: Closure<*>) =
implementation(dependencyNotation) { ConfigureUtil.configure(configure, this) }
fun <T : Dependency> implementation(dependency: T, configure: Closure<*>) =
implementation(dependency) { ConfigureUtil.configure(configure, this) }
fun compileOnly(dependencyNotation: Any): Dependency?
fun compileOnly(dependencyNotation: String, configure: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
fun <T : Dependency> compileOnly(dependency: T, configure: T.() -> Unit): T
fun compileOnly(dependencyNotation: String, configure: Closure<*>) = compileOnly(dependencyNotation) { ConfigureUtil.configure(configure, this) }
fun <T : Dependency> compileOnly(dependency: T, configure: Closure<*>) = compileOnly(dependency) { ConfigureUtil.configure(configure, this) }
fun compileOnly(dependencyNotation: String, configure: Closure<*>) =
compileOnly(dependencyNotation) { ConfigureUtil.configure(configure, this) }
fun <T : Dependency> compileOnly(dependency: T, configure: Closure<*>) =
compileOnly(dependency) { ConfigureUtil.configure(configure, this) }
fun runtimeOnly(dependencyNotation: Any): Dependency?
fun runtimeOnly(dependencyNotation: String, configure: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
fun <T : Dependency> runtimeOnly(dependency: T, configure: T.() -> Unit): T
fun runtimeOnly(dependencyNotation: String, configure: Closure<*>) = runtimeOnly(dependencyNotation) { ConfigureUtil.configure(configure, this) }
fun <T : Dependency> runtimeOnly(dependency: T, configure: Closure<*>) = runtimeOnly(dependency) { ConfigureUtil.configure(configure, this) }
fun runtimeOnly(dependencyNotation: String, configure: Closure<*>) =
runtimeOnly(dependencyNotation) { ConfigureUtil.configure(configure, this) }
fun <T : Dependency> runtimeOnly(dependency: T, configure: Closure<*>) =
runtimeOnly(dependency) { ConfigureUtil.configure(configure, this) }
fun kotlin(simpleModuleName: String): ExternalModuleDependency = kotlin(simpleModuleName, null)
fun kotlin(simpleModuleName: String, version: String?): ExternalModuleDependency
@@ -49,6 +58,8 @@ interface KotlinDependencyHandler {
fun npm(name: String, directory: File): Dependency
fun npm(directory: File): Dependency
@Deprecated(
message = "Use npm(name, version) instead. Name like in package.json"
)