All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.javiersc.hubdle.project.extensions.kotlin.shared.MinimalExternalModuleDependencyExtensions.kt Maven / Gradle / Ivy

There is a newer version: 0.7.18
Show newest version
package com.javiersc.hubdle.project.extensions.kotlin.shared

import org.gradle.api.artifacts.MinimalExternalModuleDependency
import org.gradle.api.provider.Provider

public fun MinimalExternalModuleDependency.asString(): String =
    if (version != null) "$module:$version" else "$module"

public fun Provider.asString(): String =
    map { if (it.version != null) "${it.module}:${it.version}" else "${it.module}" }.get()

public fun MinimalExternalModuleDependency.moduleAsString(): String = "$module"

public fun Provider.moduleAsString(): String =
    map { "${it.module}" }.get()

public fun Provider.versionAsString(): String? =
    map { it.version.orEmpty() }.orNull?.takeIf(String::isNotBlank)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy