diff --git a/src/main/kotlin/com/cognifide/gradle/environment/EnvironmentExtension.kt b/src/main/kotlin/com/cognifide/gradle/environment/EnvironmentExtension.kt index 8b1e0d7..f233839 100644 --- a/src/main/kotlin/com/cognifide/gradle/environment/EnvironmentExtension.kt +++ b/src/main/kotlin/com/cognifide/gradle/environment/EnvironmentExtension.kt @@ -28,12 +28,16 @@ open class EnvironmentExtension(val project: Project) : Serializable { prop.file("environment.workDir")?.let { set(it) } } + fun workFile(path: String) = workDir.get().asFile.resolve(path) + /** * Path for temporary files needed to set up environment like: * generated SSL certificates, unpacked archive contents, etc. */ val buildDir = obj.buildDir("environment") + fun buildFile(path: String) = buildDir.get().asFile.resolve(path) + /** * Convention directory for storing environment specific configuration files. */ @@ -42,6 +46,8 @@ open class EnvironmentExtension(val project: Project) : Serializable { prop.file("environment.sourceDir")?.let { set(it) } } + fun sourceFile(path: String) = sourceDir.get().asFile.resolve(path) + /** * Configures Docker related options. */