Skip to content

Instantly share code, notes, and snippets.

@cdsap
Created May 17, 2019 08:47
Show Gist options
  • Save cdsap/da45598adbc0a71eb5eed27dd207761a to your computer and use it in GitHub Desktop.
Save cdsap/da45598adbc0a71eb5eed27dd207761a to your computer and use it in GitHub Desktop.
ConsumerProducer
abstract class TaskProducer : DefaultTask() {
@get:OutputDirectory
abstract val output : DirectoryProperty
}
abstract class TaskConsumer : DefaultTask() {
@get:InputDirectory
@get:PathSensitive(PathSensitivity.RELATIVE)
abstract val input: DirectoryProperty
fun showFile() {
println("input file: ${input.get()}")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment