KotlinDependencyHandler

Represents a DSL for managing the dependencies of Kotlin entities that implement a HasKotlinDependencies interface.

Properties

Link copied to clipboard
abstract val project: Project

The Gradle Project associated with the entity.

Functions

Link copied to clipboard
abstract fun api(dependencyNotation: Any): Dependency?
abstract fun api(dependencyNotation: String, configure: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
open fun api(dependencyNotation: String, configure: Action<ExternalModuleDependency>): ExternalModuleDependency

Adds an api module dependency to this entity.

abstract fun <T : Dependency> api(dependency: T, configure: T.() -> Unit): T
open fun <T : Dependency> api(dependency: T, configure: Action<T>): T

Adds an api dependency to this entity.

Link copied to clipboard
abstract fun compileOnly(dependencyNotation: Any): Dependency?
abstract fun compileOnly(dependencyNotation: String, configure: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
open fun compileOnly(dependencyNotation: String, configure: Action<ExternalModuleDependency>): ExternalModuleDependency

Adds a compileOnly module dependency to this entity.

abstract fun <T : Dependency> compileOnly(dependency: T, configure: T.() -> Unit): T
open fun <T : Dependency> compileOnly(dependency: T, configure: Action<T>): T

Adds a compileOnly dependency to this entity.

Link copied to clipboard
abstract fun devNpm(directory: File): Dependency

Creates a dependency to a NPM module that is added to devDependencies. The name of the dependency is derived either from the package.json file located in the directory or the directory name itself.

abstract fun devNpm(name: String, directory: File): Dependency
abstract fun devNpm(name: String, version: String): Dependency

Creates a dependency to a NPM module that is added to devDependencies.

Link copied to clipboard
abstract fun implementation(dependencyNotation: Any): Dependency?
abstract fun implementation(dependencyNotation: String, configure: ExternalModuleDependency.() -> Unit): ExternalModuleDependency

Adds an implementation module dependency to this entity.

abstract fun <T : Dependency> implementation(dependency: T, configure: T.() -> Unit): T
open fun <T : Dependency> implementation(dependency: T, configure: Action<T>): T

Adds an implementation dependency to this entity.

Link copied to clipboard
open fun kotlin(simpleModuleName: String): ExternalModuleDependency

Creates a dependency to an official Kotlin library with the same version that is configured <<<<<<< HEAD <<<<<<< HEAD in KotlinTopLevelExtensionConfig.coreLibrariesVersion. ||||||| parent of d8f8907bc52f (fixup! Gradle Add public KotlinBaseExtension interface) in KotlinTopLevelExtension.coreLibrariesVersion. ======= in KotlinBaseExtension.coreLibrariesVersion.

abstract fun kotlin(simpleModuleName: String, version: String?): ExternalModuleDependency

Creates a dependency to an official Kotlin library.

Link copied to clipboard
abstract fun npm(directory: File): Dependency

Creates a dependency on the NPM module. The name of the dependency is derived either from the package.json file located in the directory or the directory name itself.

abstract fun npm(name: String, directory: File): Dependency
abstract fun npm(name: String, version: String): Dependency

Creates a dependency on the NPM module.

Link copied to clipboard
abstract fun optionalNpm(directory: File): Dependency

Creates a dependency to a NPM module that is added to optionalDependencies. The name of the dependency is derived either from the package.json file located in the directory or the directory name itself.

abstract fun optionalNpm(name: String, directory: File): Dependency
abstract fun optionalNpm(name: String, version: String): Dependency

Creates a dependency to a NPM module that is added to optionalDependencies.

Link copied to clipboard
abstract fun peerNpm(name: String, version: String): Dependency

Creates a dependency to a NPM module that is added to peerDependencies.

Link copied to clipboard
abstract fun project(notation: Map<String, Any?>): ProjectDependency
open fun project(path: String, configuration: String? = null): ProjectDependency

Creates a Gradle project dependency.

Link copied to clipboard
abstract fun runtimeOnly(dependencyNotation: Any): Dependency?
abstract fun runtimeOnly(dependencyNotation: String, configure: ExternalModuleDependency.() -> Unit): ExternalModuleDependency
open fun runtimeOnly(dependencyNotation: String, configure: Action<ExternalModuleDependency>): ExternalModuleDependency

Adds a runtimeOnly module dependency to this entity.

abstract fun <T : Dependency> runtimeOnly(dependency: T, configure: T.() -> Unit): T
open fun <T : Dependency> runtimeOnly(dependency: T, configure: Action<T>): T

Adds a runtimeOnly dependency to this entity.