diff --git a/documentation/index.html b/documentation/index.html
index ab9d044..1eb11a2 100644
--- a/documentation/index.html
+++ b/documentation/index.html
@@ -68,9 +68,8 @@ The build file is located in kobalt/src/Built.kt
and it is a valid
import com.beust.kobalt.* -import com.beust.kobalt.plugin.kotlin.kotlinProject -val kobalt = kotlinProject { +val kobalt = project { name = "kobalt" group = "com.beust" artifactId = name @@ -84,7 +83,7 @@ Here are a few noteworthy details about this small build file:
kobalt
which you can reuse further in your build file, should you ever need to.
kotlinProject
and homeDir
are supplied by Kobalt and are referred to as "directives"
+project
and homeDir
are supplied by Kobalt and are referred to as "directives"
@@ -124,7 +123,7 @@ Now that we have declared a project, we can use it to configure additional steps
import com.beust.kobalt.plugin.packaging.assemble -val kobalt = kotlinProject { +val kobalt = project { // ... assemble { jar { @@ -374,8 +373,8 @@ You can specify more than one project in a build file, simply by declaring them:-val p1 = javaProject { ... } -val p2 = kotlinProject { ... } +val p1 = project { ... } +val p2 = project { ... }@@ -383,7 +382,7 @@ If some of your projects need to be built in a certain order, you can specify de
-val p2 = kotlinProject(p1) { ... } +val p2 = project(p1) { ... }@@ -502,7 +501,7 @@ First of all, make sure you specified the group, artifactId and version of your
-val kobalt = kotlinProject { +val kobalt = project { group = "com.beust" artifactId = "kobalt" version = "0.72" @@ -551,7 +550,7 @@ Now, all you need to do is to upload your package: Then you use this variable wherever you need it in your build file:- val p = javaProject { + val p = project { name = if (experimental) "project-exp" else "project" version = "1.3"diff --git a/getting-started/index.html b/getting-started/index.html index c5923e4..af005fd 100644 --- a/getting-started/index.html +++ b/getting-started/index.html @@ -86,7 +86,7 @@ import com.beust.kobalt.plugin.kotlin.* val kotlinVersion = "1.0.0-beta-4583" -val p = kotlinProject { +val p = project { name = "wasabi" group = "com.example" diff --git a/home/index.html b/home/index.html index ffbfb99..19de4d6 100644 --- a/home/index.html +++ b/home/index.html @@ -109,7 +109,7 @@ import com.beust.kobalt.plugin.java.* import com.beust.kobalt.plugin.packaging.* import com.beust.kobalt.plugin.publish.* -val jcommander = javaProject { +val jcommander = project { name = "jcommander" group = "com.beust" artifactId = name diff --git a/plug-in-development/index.html b/plug-in-development/index.html index e96eb76..272caa2 100644 --- a/plug-in-development/index.html +++ b/plug-in-development/index.html @@ -68,7 +68,7 @@
kotlinProject
or dependencies
. These functions typically configure some data that your plug-in will later use to perform its functions.project
or dependencies
. These functions typically configure some data that your plug-in will later use to perform its functions.
-The Java and Kotlin plug-ins are extremely similar, the only difference is that you configure a Java project with the javaProject
directive and a Kotlin project with kotlinProject
:
+ Java and Kotlin are supported by default by Kobalt. You use the directive project{}
+ to declare a new project and Kobalt will automatically detect how to compile it:
-val p = javaProject(wrapper) { +val p = project(wrapper) { name = "kobalt" group = "com.beust" artifactId = name @@ -61,7 +62,7 @@ val p = javaProject(wrapper) { }
-Both these directives create an object of type Project
.
+The project{}
directive creates an object of type Project
.
Project
has two mandatory attributes: name
and 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:
+ directories you need:
-val p = javaProject(wrapper) {
+val p = project(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
).
+
+ Kotlin and Java files can be in the same directories.
Tasks
diff --git a/ten-minutes/index.html b/ten-minutes/index.html
index 84897a8..4569eb3 100644
--- a/ten-minutes/index.html
+++ b/ten-minutes/index.html
@@ -84,7 +84,7 @@ $ $KOBALT_HOME/kobaltw --init
-val project = kotlinProject {
+val project = project {
name = "kobalt-line-count"
group = "com.beust.kobalt"
artifactId = name