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

Updated plug-in dev docs to newer API.

This commit is contained in:
Erik C. Thauvin 2016-08-04 17:42:05 -07:00
parent 75fbaa4538
commit ce93cc0395
2 changed files with 9 additions and 19 deletions

View file

@ -91,23 +91,11 @@ val project = project {
...
</pre>
<p>
We also need to add Kobalt as a dependency, so let's find out what the latest version of the
jar file:
</p>
<pre class="brush:plain">
$ ./kobaltw --resolve com.beust:kobalt:
+======================================================================+
| com.beust:kobalt: |
| https://jcenter.bintray.com/com/beust/kobalt/0.335/kobalt-0.335.jar |
+======================================================================+</pre>
<p>
<p>
Note that the Maven id above doesn't specify a version (it ends with a colon), which means
Kobalt will resolve it to the latest version it can find.Let's add this version in our dependencies:
We also need to add Kobalt Plug-in API as a dependency:
</p>
<pre class="brush:java">
dependencies {
compile("com.beust:kobalt:0.335")
compile("com.beust:kobalt-plugin-api:")
}</pre>
<p>
@ -303,7 +291,7 @@ public class Main : BasePlugin() {
<pre class="brush:java">
val p = plugins(
file(homeDir("kotlin/kobalt-line-count/kobaltBuild/libs/kobalt-line-count-0.8.jar"))
file(homeDir("kotlin/kobalt-line-count/kobaltBuild/libs/kobalt-line-count-0.2.jar"))
)
</pre>