com.javiersc.hubdle.project.extensions.kotlin.shared.MinimalExternalModuleDependencyExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hubdle-gradle-plugin Show documentation
Show all versions of hubdle-gradle-plugin Show documentation
Single entry point to configurate any kind of project
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)