From 67e633810e815601e71adb4405f6e85c1011e37c Mon Sep 17 00:00:00 2001
From: Cedric Beust
- It's useful to turn on auto completion for your Build.kt
file if you are adding new
- elements to the DSL. You can achieve this in two steps.
-
- This is achieved with the Kobalt / Sync build file
menu item. On top of configuring your
- IDEA project with the correct dependencies, this will also add the kobalt.jar
file to your
- classpath.
-
-
-
-
-
- Next, mark the directory that contains your build file as a "Source directory": -
-
-
-
Build.kt
Build.kt
is in the root directory of your project but
- you can also put it in kobalt/src/Build.kt
and then mark that directory as
- a source directory.
- - You can now use all the IDEA features on your build file: -
-
-
-
Build.kt
file in your current directory based on what was found there.
+kobalt/src/Build.kt
file based on what was found there.
kobalt/
directory. From now on, you can just use ./kobaltw
to build and you can ignore $KOBALT_HOME
.
./kobaltw
:
--buildFile
Build.kt
is not in kobalt/src
.--checkVersions
- The plug-in will find your `Build.kt` file and it will automatically update your project's libraries and
+ The plug-in will locate your kobalt/src/Build.kt
file and automatically update your project's libraries and
dependencies to reflect it. For example, suppose you have the following dependencies:
@@ -148,8 +148,8 @@ dependencies {Auto completion of Build.kt
- The plug-in will automatically turn on auto-completion of your
diff --git a/plug-in-development/index.html b/plug-in-development/index.html index 997ef8e..fe18ef0 100644 --- a/plug-in-development/index.html +++ b/plug-in-development/index.html @@ -354,7 +354,7 @@ public fun myConfig(init: Info.() -> Unit) = Info().apply { init() }Build.kt
- file if it's located in thekobalt/src
directory. Once this is + The plug-in will automatically turn on auto-completion of yourkobalt/src/Build.kt
+ file. Once this is enabled, you can use everything you use on Kotlin files (auto completion, jump to symbols, even refactorings).
// Build.kt -import.com.example.plugin.myConfig +ort.com.example.plugin.myConfig myConfig { publish = true