mirror of
https://github.com/ethauvin/kobalt-doc.git
synced 2025-04-27 20:48:13 -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>
|
<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.
|
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>
|
||||||
|
<p>
|
||||||
|
The simplest configuration is to copy all the artifacts created to a directory:
|
||||||
|
</p>
|
||||||
<pre class="brush:java">
|
<pre class="brush:java">
|
||||||
install {
|
install {
|
||||||
libDir = "libs"
|
libDir = "libs"
|
||||||
}
|
}
|
||||||
</pre>
|
</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>
|
<h2 class="section" id="publishing">Publishing</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue