From 8d404fd02340b16ce9aa3470ddc707a0fa872752 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Wed, 5 Apr 2017 14:51:39 -0700 Subject: [PATCH] Additions for install{}. --- plug-ins/index.html | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/plug-ins/index.html b/plug-ins/index.html index c10cf3a..e3ca420 100644 --- a/plug-ins/index.html +++ b/plug-ins/index.html @@ -476,12 +476,37 @@ assemble {

The install section lets you specify how the artifacts get installed. If you don't specify any install directive, then the install task will install your artifacts in the lib directory by default.

+

+ The simplest configuration is to copy all the artifacts created to a directory: +

     install {
         libDir = "libs"
     }
 
+

+ You can also be more selective in what you install with either the copy directive to copy + individual files or with include, which lets you specify more sophisticated ways of moving + files to a destination: +

+
+    install {
+        copy("README", to("deploy"))
+        include(from("kobaltBuild/libs"), to("deploy"), glob("**/*"))
+    }
+
+

+ You might find the directive collect() useful when installing: this function is invoked on a + list of dependencies and returns a list of jar files that represent the transitive closure of the dependencies: +

+
+    install {
+        collect(compileDependencies).forEach {
+            copy(it.absolutePath, to("deploy"))
+        }
+    }
+

Publishing