1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-doc.git synced 2025-04-26 04:17:11 -07:00

Document mixed projects.

This commit is contained in:
Cedric Beust 2016-02-02 23:40:30 +04:00
parent f7da7c961a
commit 7d170bfb53

View file

@ -58,8 +58,7 @@ val p = javaProject(wrapper) {
group = "com.beust" group = "com.beust"
artifactId = name artifactId = name
version = "0.1" version = "0.1"
} }</pre>
</pre>
<p> <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>. 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,25 @@ A <code>Project</code> has two mandatory attributes: <code>name</code> and <code
<dd>The dependencies for your tests</dd> <dd>The dependencies for your tests</dd>
</dl> </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>). This restrictions
might be relaxed in the future.
</p>
<h3 class="section" id="tasks" indent="1">Tasks</h3> <h3 class="section" id="tasks" indent="1">Tasks</h3>
<p> <p>
Once you have at least one project configured, the plug-in lets you invoke the following tasks: Once you have at least one project configured, the plug-in lets you invoke the following tasks: