mirror of
https://github.com/ethauvin/kobalt-doc.git
synced 2025-04-25 20:07:11 -07:00
More plug-in doc.
This commit is contained in:
parent
e5289f0bac
commit
729205059e
1 changed files with 21 additions and 0 deletions
|
@ -46,6 +46,7 @@ If you are curious to get a quick feel for what a Kobalt plug-in looks like, I s
|
||||||
and keep reading.
|
and keep reading.
|
||||||
</p>
|
</p>
|
||||||
<h2 class="section" id="idea-set-up">Setting up IDEA</h2>
|
<h2 class="section" id="idea-set-up">Setting up IDEA</h2>
|
||||||
|
<h3 class="section" indent="1" id="launch-configuration">Launch configuration</h3>
|
||||||
<p>
|
<p>
|
||||||
The simplest way to run your plug-in in your IDE is to create a main function in the main class of your
|
The simplest way to run your plug-in in your IDE is to create a main function in the main class of your
|
||||||
plug-in as follows:
|
plug-in as follows:
|
||||||
|
@ -91,6 +92,26 @@ val p = project {
|
||||||
with your plug-in. You can set a breakpoint in one of your tasks or anywhere that gets invoked. Don't forget
|
with your plug-in. You can set a breakpoint in one of your tasks or anywhere that gets invoked. Don't forget
|
||||||
to invoke this launch configuration with the regular parameters passed to Kobalt (e.g. <code>"assemble"</code>).
|
to invoke this launch configuration with the regular parameters passed to Kobalt (e.g. <code>"assemble"</code>).
|
||||||
</p>
|
</p>
|
||||||
|
<h3 class="section" indent="1" id="local-dependencies">Local dependencies</h3>
|
||||||
|
<p>
|
||||||
|
In the process of building your plug-in, you will probably be invoking it from test projects and since
|
||||||
|
you will be making changes to your plug-in and generating jar files often, you might find it more convenient
|
||||||
|
to have these test projects point to your local jar file instead of the Maven one (which would require you
|
||||||
|
to upload your plug-in all the time). For this, you might find the <code>file()</code> and <code>homeDir
|
||||||
|
()</code> directives convenient:
|
||||||
|
</p>
|
||||||
|
<pre class="brush:java">
|
||||||
|
// Regular dependency
|
||||||
|
compile("com.example:myPlugin:0.1")
|
||||||
|
|
||||||
|
// Development dependency
|
||||||
|
compile(file(homeDir("kotlin/myPlugin/kobaltBuild/libs/myPlugin-0.1.jar"))
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
With this latter configuration, simply build your plug-in to generate the jar file with <code>./kobaltw
|
||||||
|
assemble</code>, switch to your test project and invoke Kobalt on it so that your plug-in will get invoked
|
||||||
|
and you should see the latest version of your code being invoked.
|
||||||
|
</p>
|
||||||
<h2 class="section" id="philosophy">Plug-in architecture</h3>
|
<h2 class="section" id="philosophy">Plug-in architecture</h3>
|
||||||
<p>
|
<p>
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue