Created
December 25, 2019 18:58
-
-
Save martinbonnin/ba088f3012229b34b5cf01e08597dfba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply from: "dependencies.gradle" | |
// A task that displays a greeting | |
class Greeting extends DefaultTask { | |
// A configurable greeting | |
@Input | |
String input | |
// Read-only property calculated from the greeting | |
@OutputFile | |
File output | |
@TaskAction | |
void printMessage() { | |
output.write(project.hello + input) | |
} | |
} | |
// Create the greeting task | |
task greeting(type: Greeting) { | |
input = "input" | |
output = new File("output.txt") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment