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 hidden or 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 hidden or 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
Created to show my friend @sirgalleto how gradle can be a very simple tool if you want