From 7d170bfb53e681d2374ce0b99c0a72458dd47947 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Tue, 2 Feb 2016 23:40:30 +0400 Subject: [PATCH] Document mixed projects. --- plug-ins/index.html | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/plug-ins/index.html b/plug-ins/index.html index 466b2f2..e8755bf 100644 --- a/plug-ins/index.html +++ b/plug-ins/index.html @@ -58,8 +58,7 @@ val p = javaProject(wrapper) { group = "com.beust" artifactId = name version = "0.1" -} - +}

Both these directives create an object of type Project. @@ -85,6 +84,25 @@ A Project has two mandatory attributes: name and The dependencies for your tests +

Mixed language projects

+

+ A Kobalt project can have multiple languages in it (Kotlin and Java): just specify all the source + directories you need. For example, for a javaProject, add src/main/kotlin as a + source directory: +

+
+val p = javaProject(wrapper) {
+    name = "kobalt"
+    // ...
+    sourceDirectories {
+        path("src/main/java", "src/main/kotlin")
+    }
+}
+

Note that source files must be in their respective directory (.java in + src/main/java and .kt in src/main/kotlin). This restrictions + might be relaxed in the future. +

+

Tasks

Once you have at least one project configured, the plug-in lets you invoke the following tasks: