diff --git a/idea-plug-in/index.html b/idea-plug-in/index.html index 4843ee0..6b01b53 100644 --- a/idea-plug-in/index.html +++ b/idea-plug-in/index.html @@ -32,6 +32,16 @@ --> +
@@ -55,7 +65,13 @@- Open the "Plugins" section of the IDEA preferences and find the "Kobalt" plug-in. Install it and restart IDEA. If the plug-in was correctly installed, you should see a new menu called "Kobalt" juste before the "Help" menu: + Open the "Plugins" section of the IDEA preferences and find the "Kobalt" plug-in. +
+
+
+
+ Install it and restart IDEA. If the plug-in was correctly installed, you should see a new menu called "Kobalt" juste before the "Help" menu:
@@ -65,69 +81,82 @@
The Kobalt IDEA plug-in offers the following features:
- Since Kobalt's build files are valid Kotlin files, you can leverage IDEA's auto complete feature to assist you in writing build files. There are two steps to take to enable this support: -
-Build.kt
file.
- Now that your Build.kt
file is recognized by IDEA, you can use Ctrl-space to trigger auto completion whenever you need help figuring out what functions you can invoke. However, by default, IDEA will display all the Kotlin functions available within a given scope. While all these functions are valid and will produce a valid Kotlin file, you are probably going to prever Kobalt directives over regular Kotlin functions, so the Kobalt IDEA plug-in will re-order the suggestions so that Kobalt's directives appear first. Compare the next two screen shots:
-
- When you select the "Synchronize build file" menu item from the Kobalt
main menu, the Kobalt IDEA plug-in will locate your Build.kt
file and parse it. Then it will update your modules' library and dependency information to reflect all the dependencies declared in your build file.
-
- For example, the following list of dependencies: + The plug-in will find your `Build.kt` file and it will automatically update your project's libraries and + dependencies to reflect it. For example, suppose you have the following dependencies:
+compile("org.apache.ant:ant:1.7.0", + "com.google.inject:guice:4.0:no_aop", + "com.beust:jcommander:1.48") ++
+ Select the menu "Kobalt / Sync build file", wait for a few seconds as the status in the lower left + corner updates: +
+
+
+
+ Bring up the "Project structure" window for your project and you should see the following: +
+
+
+
+ A new library has been created with the dependencies from your build file. If you switch to the + Module section, you should see this library added as a dependency of your modules: +
+
+
+
+ The plug-in understands other scopes as well (e.g. "provided", "runtime"). For example, let's + move a dependency in the "runtime" section of the build file: +
+dependencies { + runtime("com.google.inject:guice:4.0:no_aop") compile("org.apache.ant:ant:1.7.0", - "junit:junit:4.10", - "org.beanshell:bsh:2.0b4", - "com.google.inject:guice:4.0:no_aop", - "com.beust:jcommander:1.48", - "org.yaml:snakeyaml:1.15") -} --
- will update your project structure as follows: -
-
- The plug-in will honor other types of dependencies, such as provided
or test
. For example:
-
-dependencies { - compile("org.apache.ant:ant:1.7.0") - test("org.testng:testng:6.9.8") - provided("com.beust:jcommander:1.48") -} --
- will produce the following libraries and dependencies: -
+ "com.beust:jcommander:1.48") +} ++ The libraries are now the following: +
+
+
+
+ Notice that you now have two different libraries and that they have both been added with the + correct scope to your project: +
+
+
+
+ The source code can be found on github. + If you need to report a bug, please make sure you include the log file, which you can find under + the "Help" menu: +
+
+
+
- The source code for the Kobalt IDEA plug-in can be found on github. The license is Apache 2.0. -
+>>>>>>> IDEA plug-in doc.