mirror of
https://github.com/ethauvin/kobalt-doc.git
synced 2025-04-25 03:57:11 -07:00
Additions for install{}.
This commit is contained in:
parent
7db92fe117
commit
8d404fd023
1 changed files with 25 additions and 0 deletions
|
@ -476,12 +476,37 @@ assemble {
|
|||
<p>
|
||||
The <code>install</code> section lets you specify how the artifacts get installed. If you don't specify any <code>install</code> directive, then the <code>install</code> task will install your artifacts in the <code>lib</code> directory by default.
|
||||
</p>
|
||||
<p>
|
||||
The simplest configuration is to copy all the artifacts created to a directory:
|
||||
</p>
|
||||
<pre class="brush:java">
|
||||
install {
|
||||
libDir = "libs"
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
You can also be more selective in what you install with either the <code>copy</code> directive to copy
|
||||
individual files or with <code>include</code>, which lets you specify more sophisticated ways of moving
|
||||
files to a destination:
|
||||
</p>
|
||||
<pre class="brush:java">
|
||||
install {
|
||||
copy("README", to("deploy"))
|
||||
include(from("kobaltBuild/libs"), to("deploy"), glob("**/*"))
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
You might find the directive <code>collect()</code> 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:
|
||||
</p>
|
||||
<pre class="brush:java">
|
||||
install {
|
||||
collect(compileDependencies).forEach {
|
||||
copy(it.absolutePath, to("deploy"))
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<h2 class="section" id="publishing">Publishing</h2>
|
||||
|
||||
<p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue