1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-doc.git synced 2025-04-25 12:07:10 -07:00

Merge branch 'master' of github.com:cbeust/kobalt-doc

This commit is contained in:
Cedric Beust 2016-02-04 06:51:49 -08:00
commit 81ef95763e
2 changed files with 20 additions and 2 deletions

View file

@ -172,6 +172,7 @@ Kobalt is currently in Beta but already used in several projects. Here are links
<li><a href="https://github.com/cbeust/jcommander/blob/master/kobalt/src/Build.kt">JCommander</a>.</li>
<li><a href="https://github.com/cbeust/testng/blob/master/kobalt/src/Build.kt">TestNG</a> (this build file shows an example of adding a custom task in the build itself).</li>
<li><a href="https://github.com/cbeust/klaxon/blob/master/kobalt/src/Build.kt">Klaxon</a></li>
<li><a href="https://github.com/cbeust/kobalt-android">u2020 (Android show case application)</a></li>
<li>... and of course, <a href="https://github.com/cbeust/kobalt/blob/master/kobalt/src/Build.kt">Kobalt itself</a> (this build file demonstrates multi projects and project dependencies).</li>
</ul>

View file

@ -58,8 +58,7 @@ val p = javaProject(wrapper) {
group = "com.beust"
artifactId = name
version = "0.1"
}
</pre>
}</pre>
<p>
Both these directives create an object of type <code><a href="https://github.com/cbeust/kobalt/blob/master/src/main/kotlin/com/beust/kobalt/api/Project.kt">Project</code></a>.
@ -85,6 +84,24 @@ A <code>Project</code> has two mandatory attributes: <code>name</code> and <code
<dd>The dependencies for your tests</dd>
</dl>
<h4 class="section" id="mixed-projects" indent="2">Mixed language projects</h4>
<p>
A Kobalt project can have multiple languages in it (Kotlin and Java): just specify all the source
directories you need. For example, for a <code>javaProject</code>, add <code>src/main/kotlin</code> as a
source directory:
</p>
<pre class="brush:java">
val p = javaProject(wrapper) {
name = "kobalt"
// ...
sourceDirectories {
path("src/main/java", "src/main/kotlin")
}
}</pre>
<p>Note that source files must be in their respective directory (<code>.java</code> in
<code>src/main/java</code> and <code>.kt</code> in <code>src/main/kotlin</code>).
</p>
<h3 class="section" id="tasks" indent="1">Tasks</h3>
<p>
Once you have at least one project configured, the plug-in lets you invoke the following tasks: