From 2b21701e9e18c197d4bcfa9c86bea1845a0c2553 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Sun, 11 Oct 2015 12:12:57 -0700 Subject: [PATCH] Document alwaysRunAfter. --- plug-in-development/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plug-in-development/index.html b/plug-in-development/index.html index 22900b5..a6bd002 100644 --- a/plug-in-development/index.html +++ b/plug-in-development/index.html @@ -391,12 +391,12 @@ fun lineCount(project: Project): TaskResult {
A list of all the tasks that this task should run prior to.
runAfter
A list of all the tasks that should run before this task does.
-
wrapAfter
+
alwaysRunAfter
A list of all the tasks that will always be run after this task if it's invoked.

- The difference between runAfter and wrapAfter is subtle but important. runAfter + The difference between runAfter and alwaysRunAfter is subtle but important. runAfter is just a declaration of dependency. It's basically the reverse of runBefore but it's useful in case you are not the author of the task you want to run before (if you were, you would just use the runBefore annotation on it). Since you can't say "a runBefore b" because you don't own task "a", @@ -414,8 +414,8 @@ fun lineCount(project: Project): TaskResult { For example, you could have a signJarFile task that should always be invoked if someone builds a jar file. You don't expect users to invoke that target explicitly, but whenever they invoke the assemble target, you want your signJarFile target to be invoked. When you want such a task to always be invoked - even if the user didn't explicitly request it, you should use wrapAfter. You are essentially wrapping - an existing task with your own task. Note that there is no wrapBefore annotation since runBefore + even if the user didn't explicitly request it, you should use alwaysRunAfter. + Note that there is no alwaysRunBefore annotation since runBefore achieves the same functionality.