Skip to content

Instantly share code, notes, and snippets.

@cdsap
Created May 17, 2019 08:36
Show Gist options
  • Save cdsap/2e3abc340f0b6d3ff863eb151104ad39 to your computer and use it in GitHub Desktop.
Save cdsap/2e3abc340f0b6d3ff863eb151104ad39 to your computer and use it in GitHub Desktop.
properties
open class AndroidMessage : DefaultTask() {
@Input
val what: Property<String> = project.objects.property()
@Internal
val completeValue: Provider<String> = what.map { " Android $it" }
@TaskAction
fun printMessage() {
logger.quiet(completeValue.get())
}
}
open class AndroidMessageExtension(objects: ObjectFactory) {
val message: Property<String> = objects.property()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment