Skip to content

Commit

Permalink
Nice shorthands
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian-panek-vmltech committed Sep 20, 2021
1 parent 5d9bb54 commit dff2c8c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -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.
*/
Expand Down

0 comments on commit dff2c8c

Please sign in to comment.