mirror of
https://github.com/ethauvin/kobalt-doc.git
synced 2025-04-26 04:17:11 -07:00
Merge branch 'master' of github.com:cbeust/kobalt-doc
Conflicts: plug-ins/index.html
This commit is contained in:
commit
9a53a4b34d
5 changed files with 85 additions and 34 deletions
|
@ -217,7 +217,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependenciesTest {
|
dependenciesTest {
|
||||||
compile("org.testng:testng:6.9.5")
|
compile("org.testng:testng:")
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
|
@ -292,13 +292,13 @@ dependencies {
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre class="brush:plain">
|
<pre class="brush:plain">
|
||||||
<kobalt-settings>
|
<kobaltSettings>
|
||||||
<local-repo>/Users/beust/my-kobalt-repo</local-repo>
|
<localCache>/Users/beust/my-kobalt-repo</localCache>
|
||||||
<default-repos>
|
<defaultRepos>
|
||||||
<repo>http://jcenter.com</repo>
|
<repo>http://jcenter.com</repo>
|
||||||
<repo>http://example.com</repo>
|
<repo>http://example.com</repo>
|
||||||
</default-repos>
|
</defaultRepos>
|
||||||
</kobalt-settings></pre>
|
</kobaltSettings></pre>
|
||||||
<p>
|
<p>
|
||||||
Here is a list of the parameters you can configure:
|
Here is a list of the parameters you can configure:
|
||||||
</p>
|
</p>
|
||||||
|
@ -317,25 +317,30 @@ dependencies {
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>default-repos</code></td>
|
<td><code>defaultRepos</code></td>
|
||||||
<td><a href="https://github.com/cbeust/kobalt/blob/master/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/Constants.kt#L10">Default repos</a></td>
|
<td><a href="https://github.com/cbeust/kobalt/blob/master/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/Constants.kt#L10">Default repos</a></td>
|
||||||
<td>List of repos overriding the default ones that Kobalt uses.</td>
|
<td>List of repos overriding the default ones that Kobalt uses.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>kobalt-compiler-version</code></td>
|
<td><code>kobaltCompilerVersion</code></td>
|
||||||
<td>1.0.0</td>
|
<td>1.0.3</td>
|
||||||
<td>The version of the Kotlin compiler that Kobalt uses.</td>
|
<td>The version of the Kotlin compiler that Kobalt uses.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>kobalt-compiler-repo</code></td>
|
<td><code>kobaltCompilerRepo</code></td>
|
||||||
<td>None</td>
|
<td>None</td>
|
||||||
<td>The Maven repository where to find the compiler. By default, the compiler is looked up in the default repos (JCenter, Maven, ...).</td>
|
<td>The Maven repository where to find the compiler. By default, the compiler is looked up in the default repos (JCenter, Maven, ...).</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>local-repo</code></td>
|
<td><code>localCache</code></td>
|
||||||
<td><code>~/.kobalt/repository</code></td>
|
<td><code>~/.kobalt/cache</code></td>
|
||||||
<td>Where Kobalt stores all the downloaded dependencies.</td>
|
<td>Where Kobalt stores all the downloaded dependencies.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>localMavenRepo</code></td>
|
||||||
|
<td><code>~/.kobalt/localMavenRepo</code></td>
|
||||||
|
<td>Where Kobalt publishes artifacts when the task <code>publishToLocalMaven</code> is invoked.</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2 class="section" id="templates">Templates</h2>
|
<h2 class="section" id="templates">Templates</h2>
|
||||||
|
@ -394,8 +399,8 @@ $ ./kobaltw --pluginJarFiles kobaltBuild/libs/kobalt-line-count-0.18.jar --tasks
|
||||||
$ ./kobaltw --plugins com.beust:kobalt-android: --listTemplates
|
$ ./kobaltw --plugins com.beust:kobalt-android: --listTemplates
|
||||||
Available templates
|
Available templates
|
||||||
Plug-in: Kobalt
|
Plug-in: Kobalt
|
||||||
"java" Generates a simple Java project
|
"java" Generate a simple Java project
|
||||||
"kotlin" Generates a simple Kotlin project
|
"kotlin" Generate a simple Kotlin project
|
||||||
"kobaltPlugin" Generate a sample Kobalt plug-in project
|
"kobaltPlugin" Generate a sample Kobalt plug-in project
|
||||||
Plug-in: Android
|
Plug-in: Android
|
||||||
"androidJava" Generate a simple Android Java project
|
"androidJava" Generate a simple Android Java project
|
||||||
|
@ -605,7 +610,7 @@ Here are the options that you can pass to <code>./kobaltw</code>:
|
||||||
$ ./kobaltw --checkVersions
|
$ ./kobaltw --checkVersions
|
||||||
New versions found:
|
New versions found:
|
||||||
com.beust:klaxon:0.14
|
com.beust:klaxon:0.14
|
||||||
org.testng:testng:6.9.5
|
org.testng:testng:6.9.12
|
||||||
</pre>
|
</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -659,6 +664,13 @@ New versions found:
|
||||||
<td>Specify the plug-ins to load.</td>
|
<td>Specify the plug-ins to load.</td>
|
||||||
<td>This is similar to specifying these plug-in id's in a build file except that no build file is needed.</td>
|
<td>This is similar to specifying these plug-in id's in a build file except that no build file is needed.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>--profiling</code></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>Display timings for the build tasks.</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>--resolve</code></td>
|
<td><code>--resolve</code></td>
|
||||||
<td>Maven id<br/>(e.g. <code>"com.beust:kobalt:0.228"</code>)</td>
|
<td>Maven id<br/>(e.g. <code>"com.beust:kobalt:0.228"</code>)</td>
|
||||||
|
|
|
@ -111,7 +111,7 @@ val jcommander = project {
|
||||||
version = "1.54"
|
version = "1.54"
|
||||||
|
|
||||||
dependenciesTest {
|
dependenciesTest {
|
||||||
compile("org.testng:testng:6.9.9")
|
compile("org.testng:testng:")
|
||||||
}
|
}
|
||||||
|
|
||||||
assemble {
|
assemble {
|
||||||
|
|
|
@ -95,7 +95,7 @@ val jcommander = project {
|
||||||
version = "1.52"
|
version = "1.52"
|
||||||
|
|
||||||
dependenciesTest {
|
dependenciesTest {
|
||||||
compile("org.testng:testng:6.9.5")
|
compile("org.testng:testng:")
|
||||||
}
|
}
|
||||||
|
|
||||||
assemble {
|
assemble {
|
||||||
|
|
|
@ -534,6 +534,44 @@ $ ./kobaltw uploadBintray
|
||||||
<dd>The first parameter is the file you want to upload and the second one is the path where it will be uploaded to.</dd>
|
<dd>The first parameter is the file you want to upload and the second one is the path where it will be uploaded to.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
<h3 class="section" indent="1" id="configuring-pom">Configuring your POM file</h3>
|
||||||
|
<p>
|
||||||
|
When you upload your package to Bintray or JCenter in Maven form, Kobalt will create a default
|
||||||
|
POM file for you. You can configure it with the <code>pom{}</code> directive in your project.
|
||||||
|
Here is an example:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre class="brush:java">
|
||||||
|
import org.apache.maven.model.*
|
||||||
|
|
||||||
|
val kobalt = project {
|
||||||
|
pom = Model().apply {
|
||||||
|
name = project.name
|
||||||
|
description = "A build system in Kotlin"
|
||||||
|
url = "http://beust.com/kobalt"
|
||||||
|
licenses = listOf(License().apply {
|
||||||
|
name = "Apache 2.0"
|
||||||
|
url = "http://www.apache .org/licenses/LICENSE-2.0"
|
||||||
|
})
|
||||||
|
scm = Scm().apply {
|
||||||
|
url = "http://github.com/cbeust/kobalt"
|
||||||
|
connection = "https://github.com/cbeust/kobalt.git"
|
||||||
|
developerConnection = "git@github.com:cbeust/kobalt.git"
|
||||||
|
}
|
||||||
|
developers = listOf(Developer().apply {
|
||||||
|
name = "Cedric Beust"
|
||||||
|
email = "cedric@beust.com"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Note that the classes used in this snippet (<code>Model</code>, <code>License</code>, etc...) are
|
||||||
|
the actual Apache Maven class, so you have access to the full POM model.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!---
|
||||||
<h2 class="section" id="dokka">Dokka</h2>
|
<h2 class="section" id="dokka">Dokka</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -572,10 +610,11 @@ $ ./kobaltw uploadBintray
|
||||||
<dt>skip</dt>
|
<dt>skip</dt>
|
||||||
<dd>If true, don't generate anything.</dd>
|
<dd>If true, don't generate anything.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
-->
|
||||||
|
|
||||||
</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">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
<pre class="brush:plain">
|
<pre class="brush:plain">
|
||||||
$ mkdir linecount
|
$ mkdir linecount
|
||||||
$ cd linecount
|
$ cd linecount
|
||||||
$ mkdir -p src/main/kotlin/com/beust/plugin/linecount
|
$ mkdir -p src/main/kotlin/com/beust/kobalt/plugin/linecount
|
||||||
$ $KOBALT_HOME/kobaltw --init kotlin
|
$ $KOBALT_HOME/kobaltw --init kotlin
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ BUILD SUCCESSFUL (15 seconds)
|
||||||
|
|
||||||
<pre class="brush:java">
|
<pre class="brush:java">
|
||||||
val repos = repos("https://dl.bintray.com/cbeust/maven/")
|
val repos = repos("https://dl.bintray.com/cbeust/maven/")
|
||||||
val plugins = plugins("com.beust.kobalt:kobalt-line-count:0.2")
|
val plugins = plugins("com.beust:kobalt-line-count:0.2")
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue