diff --git a/plug-in-development/index.html b/plug-in-development/index.html index 7c33702..f0a9d9c 100644 --- a/plug-in-development/index.html +++ b/plug-in-development/index.html @@ -59,35 +59,20 @@ fun main(argv: Array<String>) {

In order for this code to compile, you will have to switch the dependency of your plug-in from kobalt-plugin-api to just kobalt, which is the actual application (and which - therefore contains the main() entry point). + therefore contains the main() entry point). You can leverage Kobalt profiles to easily + switch from development to production settings:

-        // Normal dependency
-        compile("com.beust:kobalt-plugin-api:$KOBALT_VERSION")
-
-        // Development dependency
-        compile("com.beust:kobalt:$KOBALT_VERSION")
-
-

- You might find it convenient to leverage Kobalt's ability to use regular Kotlin variables to make things easier: -

-
-val dev = false
+val dev = false // or true for development
 val kobaltDependency = if (dev) "kobalt" else "kobalt-plugin-api"
 
 val p = project {
-    // ...
-
-    compile("com.beust:$kobaltDependency:$KOBALT_VERSION")
-}
+    dependencies {
+        compile("com.beust:$kobaltDependency:")
+    }
 

- Then you can simply set the dev to true during development and back to false - when you are ready to publish your plug-in. - -

-

- Then resync your build file in IDEA and your main() function should now build and be launchable. + Open the Kobalt side bar and sync your build file in IDEA. Your main() function should now build and be launchable. You can right click on that class file and select "Debug <your class name>", which will launch Kobalt 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. "assemble").