diff --git a/src/main/kotlin/com/cognifide/gradle/environment/docker/Docker.kt b/src/main/kotlin/com/cognifide/gradle/environment/docker/Docker.kt index 7d3e4be..24ba7f0 100644 --- a/src/main/kotlin/com/cognifide/gradle/environment/docker/Docker.kt +++ b/src/main/kotlin/com/cognifide/gradle/environment/docker/Docker.kt @@ -12,6 +12,7 @@ import java.io.File import java.io.FileOutputStream import java.nio.charset.StandardCharsets +@Suppress("TooManyFunctions") class Docker(val environment: EnvironmentExtension) { private val logger = environment.logger @@ -311,6 +312,15 @@ class Docker(val environment: EnvironmentExtension) { fun load(composePropertyName: String, fileProvider: () -> File) = load(composePropertyName, common.project.provider { fileProvider() }) fun load(composePropertyName: String, fileProvider: Provider) { - composeProperties.putAll(common.project.provider { mapOf(composePropertyName to load(fileProvider.get())) }) + property(composePropertyName) { load(fileProvider.get()) } } + + /** + * @see + */ + fun property(name: String, valueProvider: Provider) { + composeProperties.putAll(common.project.provider { mapOf(name to valueProvider) }) + } + + fun property(name: String, valueProvider: () -> T) = property(name, common.project.provider { valueProvider() }) }