Last active
November 9, 2018 22:30
-
-
Save sierisimo/4829076ac857347de2a2284f7f88f6a1 to your computer and use it in GitHub Desktop.
Simplest Gradle Task
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
tasks.create("runGalleto") { | |
group = "Galleto Tasks" | |
description = "Runs the galleto task" | |
doLast { | |
println("Hello, I'm Galleto build") | |
} | |
} |
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
open class CustomPluginWithTask : Plugin<Project> { | |
override fun apply(project: Project) { | |
project.tasks.create("myCustomTask") { task -> | |
task.group = "My Group" | |
task.description = "A simple task example" | |
println("Hello, I'm your plugin") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can create the simplest task in gradle and invoke it with:
gradle runGalleto