From 53c40c33b356339cbbe054fd696b12492c6ee1a1 Mon Sep 17 00:00:00 2001
From: Cedric Beust
@@ -124,7 +123,7 @@ Now that we have declared a project, we can use it to configure additional steps
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"
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
From c43be1be61d71c3d1d31cdaeeb9800dd36519c66 Mon Sep 17 00:00:00 2001
From: Cedric Beust
Date: Thu, 4 Feb 2016 22:50:23 +0400
Subject: [PATCH 2/3] Double quotes.
---
plug-ins/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plug-ins/index.html b/plug-ins/index.html
index 9179a68..890fd25 100644
--- a/plug-ins/index.html
+++ b/plug-ins/index.html
@@ -68,7 +68,7 @@ The project{}
directive creates an object of type Project
-A Project
has two mandatory attributes: name
and version
. If you are planning to deploy your project to a Maven repository, you also have to specify its group
(e.g. com.beust
) and artifactId
(e.g. kobalt
).
+A Project
has two mandatory attributes: name
and version
. If you are planning to deploy your project to a Maven repository, you also have to specify its group
(e.g. "com.beust"
) and artifactId
(e.g. "kobalt"
).
From 83703478040f3c3d57367518df8366f7b785d4e1 Mon Sep 17 00:00:00 2001
From: Cedric Beust
Date: Thu, 4 Feb 2016 22:51:14 +0400
Subject: [PATCH 3/3] Fix.
---
plug-ins/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plug-ins/index.html b/plug-ins/index.html
index 890fd25..53abcdc 100644
--- a/plug-ins/index.html
+++ b/plug-ins/index.html
@@ -87,7 +87,7 @@ A 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
+ A Kobalt project can mix Kotlin and Java in it, simply specify all the source
directories you need: