mirror of
https://github.com/ethauvin/kobalt-doc.git
synced 2025-04-25 20:07:11 -07:00
Doc fixes.
This commit is contained in:
parent
637f1bc93b
commit
abbf4ade79
2 changed files with 27 additions and 10 deletions
|
@ -48,7 +48,11 @@
|
||||||
cd $KOBALT_HOME
|
cd $KOBALT_HOME
|
||||||
unzip kobalt-xxx.zip
|
unzip kobalt-xxx.zip
|
||||||
</pre>
|
</pre>
|
||||||
<h2 class="section" id="initialize">2. Initialize your project for Kobalt</h2>
|
<p>
|
||||||
|
<em>Note: Kobalt doesn't need any environment variable to run, the environment variable used above
|
||||||
|
is only here for clarity.</em>
|
||||||
|
</p>
|
||||||
|
<h2 class="section" id="initialize">2. Initialize your project</h2>
|
||||||
<p>
|
<p>
|
||||||
Change to your project directory and call the <code>kobaltw</code> command with <code>--init</code>:
|
Change to your project directory and call the <code>kobaltw</code> command with <code>--init</code>:
|
||||||
</p>
|
</p>
|
||||||
|
@ -60,8 +64,8 @@ $KOBALT_HOME/kobaltw --init
|
||||||
This command will do two things:
|
This command will do two things:
|
||||||
</p>
|
</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Create a default <code>kobalt/src/Build.kt</code> file based on what was found there.
|
<li>Create a default <code>kobalt/src/Build.kt</code> file based on what was found in your project.
|
||||||
<li>Install the Kobalt Wrapper in your current directory (script `kobaltw`) and in the <code>kobalt/</code> directory. From now on, you can just use <code>./kobaltw</code> to build and you can ignore <code>$KOBALT_HOME</code>.
|
<li>Install the Kobalt Wrapper in your current directory (a script called <code>kobaltw</code>) and a few additional files in the <code>kobalt/wrapper</code> directory. From now on, you can just use <code>./kobaltw</code> to build and you can ignore <code>$KOBALT_HOME</code>.
|
||||||
</ol>
|
</ol>
|
||||||
<p>
|
<p>
|
||||||
You can now attempt to build your project with Kobalt:
|
You can now attempt to build your project with Kobalt:
|
||||||
|
@ -74,7 +78,7 @@ $KOBALT_HOME/kobaltw --init
|
||||||
|
|
||||||
<h2 class="section" id="edit">3. Edit kobalt/src/Build.kt</h2>
|
<h2 class="section" id="edit">3. Edit kobalt/src/Build.kt</h2>
|
||||||
|
|
||||||
Here for example is the Build.kt for wasabi http framework
|
Here is the <code>Build.kt</code> for the Wasabi HTTP framework:
|
||||||
<pre class="brush:java">
|
<pre class="brush:java">
|
||||||
import com.beust.kobalt.*
|
import com.beust.kobalt.*
|
||||||
import com.beust.kobalt.plugin.packaging.assemble
|
import com.beust.kobalt.plugin.packaging.assemble
|
||||||
|
@ -89,7 +93,7 @@ val p = kotlinProject {
|
||||||
artifactId = name
|
artifactId = name
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
|
|
||||||
//tells Kobalt to also search here for dependencies
|
// Tell Kobalt to also search here for dependencies
|
||||||
val repos = repos("http://oss.sonatype.org/content/repositories/snapshots")
|
val repos = repos("http://oss.sonatype.org/content/repositories/snapshots")
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -110,7 +114,7 @@ val p = kotlinProject {
|
||||||
"joda-time:joda-time:2.3")
|
"joda-time:joda-time:2.3")
|
||||||
}
|
}
|
||||||
|
|
||||||
//these are only downloaded when running the test task
|
// Test dependencies
|
||||||
dependenciesTest {
|
dependenciesTest {
|
||||||
compile("junit:junit:4.9",
|
compile("junit:junit:4.9",
|
||||||
"org.mockito:mockito-all:1.9.5",
|
"org.mockito:mockito-all:1.9.5",
|
||||||
|
@ -118,7 +122,7 @@ val p = kotlinProject {
|
||||||
"org.apache.httpcomponents:httpclient:4.5.1")
|
"org.apache.httpcomponents:httpclient:4.5.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
//tells kobalt to produce a jar
|
// Tell kobalt to produce a jar
|
||||||
assemble {
|
assemble {
|
||||||
jar {
|
jar {
|
||||||
}
|
}
|
||||||
|
@ -126,11 +130,16 @@ val p = kotlinProject {
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<h2 class="section" id="idea-plugin">4. In Intellij IDEA, Sync Build File</h2>
|
<h2 class="section" id="idea-plugin">4. Sync your build file</h2>
|
||||||
<p>
|
<p>
|
||||||
If you're using Intellij IDEA, make sure you've <a href="../idea-plug-in/index.html">installed the Kobalt plugin</a> and then go to <code>Kobalt -> Sync Build File</code>. This will download dependencies in a way that IDEA understand so you no loger get errors.
|
If you're using Intellij IDEA, make sure you've <a href="../idea-plug-in/index.html">installed the Kobalt plugin</a> and then go to <code>Kobalt -> Sync Build File</code>. This will download dependencies in a way that IDEA understand so you no loger get errors.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<h2 class="section" id="next-steps">5. Next steps</h2>
|
||||||
|
<p>
|
||||||
|
From this point, you can either <a href="../idea-plug-in/index.html">learn how to install the Kobalt IDEA plug-in</a> or read <a href="../documentation/index.html">Kobalt's documentation</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Table of contents -->
|
<!-- Table of contents -->
|
||||||
<div class="col-md-3" id="table-of-contents">
|
<div class="col-md-3" id="table-of-contents">
|
||||||
|
|
|
@ -75,6 +75,8 @@
|
||||||
Here are some of Kobalt's most prominent features.
|
Here are some of Kobalt's most prominent features.
|
||||||
</em>
|
</em>
|
||||||
</p>
|
</p>
|
||||||
|
<h2 class="section" id="features">Features</h2>
|
||||||
|
|
||||||
<h2 class="section" id="buildFile" indent="1">Build file auto-completion in your IDE</h2>
|
<h2 class="section" id="buildFile" indent="1">Build file auto-completion in your IDE</h2>
|
||||||
<p>
|
<p>
|
||||||
Since Kobalt's build files are actual Kotlin files, not only can you leverage auto-completion
|
Since Kobalt's build files are actual Kotlin files, not only can you leverage auto-completion
|
||||||
|
@ -163,7 +165,7 @@ val jcommander = javaProject {
|
||||||
<h2 class="section" id="path">Status</h2>
|
<h2 class="section" id="path">Status</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Kobalt is currently in Beta but I'm already using it to build most of my projects. Here are links to a few build files you can inspect to get a feel for what Kobalt enables:
|
Kobalt is currently in Beta but already used in several projects. Here are links to a few build files you can inspect to get a feel for what Kobalt enables:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -173,6 +175,12 @@ Kobalt is currently in Beta but I'm already using it to build most of my project
|
||||||
<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>
|
<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>
|
</ul>
|
||||||
|
|
||||||
|
<h2 class="section" id="next-step">Next steps</h2>
|
||||||
|
<p>
|
||||||
|
Proceed to the <a href="../getting-started/index.html">Getting Started</a> section to learn more about Kobalt.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue