From 1096e33524c7cb6628b202378c8387d0d98c64fd Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Fri, 9 Oct 2015 02:09:29 -0700 Subject: [PATCH] Plug-in development. --- js/kobalt.js | 4 ++ write-plug-in/index.html | 122 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 write-plug-in/index.html diff --git a/js/kobalt.js b/js/kobalt.js index 7baf518..527ab07 100644 --- a/js/kobalt.js +++ b/js/kobalt.js @@ -18,6 +18,10 @@ var content = [ { url: "../write-plug-in-10mn/index.html", title: "A plug-in in 10mn" + }, + { + url: "../write-plug-in/index.html", + title: "Plug-in development" } ]; diff --git a/write-plug-in/index.html b/write-plug-in/index.html new file mode 100644 index 0000000..44c12c7 --- /dev/null +++ b/write-plug-in/index.html @@ -0,0 +1,122 @@ + + + + + Kobalt, by Cedric Beust + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Plug-in development

+

How to set up your environment to write a Kobalt plug-in.

+ +
+ + +
+ +

Reference project

+ +

+ As a start up point, you can clone the kobalt-line-count + project and use it as a guide line to write your own plug-in. +

+ +

Build file

+ +

+ You can start with a simple build file: +

+ +
+import com.beust.kobalt.*
+import com.beust.kobalt.plugin.packaging.*
+import com.beust.kobalt.plugin.kotlin.*
+import com.beust.kobalt.plugin.publish.*
+
+
+val project = kotlinProject {
+    name = "kobalt-line-count"
+    group = "com.beust.kobalt"
+    artifactId = name
+    version = "0.1"
+
+    dependencies {
+        compile("com.beust:kobalt:0.154")
+    }
+}
+
+val packProject = assemble(project) {
+    mavenJars {
+        manifest {
+            attributes("Kobalt-Plugin-Class", "com.beust.kobalt.plugin.linecount.Main")
+        }
+    }
+}
+
+val jc = jcenter(project) {
+    publish = true
+}
+          
+ +
+ + +
+
+ + + + + + + + + + + + +