From b3a8d1a91c91379ef42f1ca0fe91566bed7e7bfc Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Sat, 25 Jun 2016 09:18:53 -0700 Subject: [PATCH] Document buildFileClasspath(). --- documentation/index.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/documentation/index.html b/documentation/index.html index a88a412..2889f88 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -191,6 +191,19 @@ fun taskCreateVersion(project: Project) : TaskResult { This tasks takes a template file and replaces all occurrences of the string "@version@" with the actual version of the project. Obviously, this task is very specific to TestNG's own build and it wasn't worth writing a plug-in ftor this. Note the attributes runBefore and runAfter, which specify when this task will run. You can find more information about tasks in the plug-in development section.

+

Build file classpath

+

+ If you are writing code or an inline task in your build file that requires additional libraries, + you can specify these dependencies with the buildFileClasspath() directive, which accepts a list + of dependencies in parameters. Each of these dependencies will then be added to the classpath when + your build file is compiled and run: +

+
+// Build.kt
+val bfc = buildFileClasspath("org.testng:testng:6.9.11")
+val t = org.testng.TestNG()  // now legal
+
+

Dependencies