Created
October 13, 2018 01:12
-
-
Save fuzzyweapon/0cacb9ef8142e74f30c77e141a6815f2 to your computer and use it in GitHub Desktop.
Helper function for making registering callsites pretty.
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
// --- Utility functions ----------------------------------------------- | |
inline fun <reified T : Task> task(noinline configuration: T.() -> Unit) = | |
tasks.registering(T::class, configuration) | |
// Usage | |
val customInstallation by task<Copy> { | |
description = "Copies latest gradle-kotlin-dsl snapshot over the custom installation." | |
dependsOn(copyCurrentDistro) | |
from(distribution) | |
into("$customInstallationDir/lib") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment