From 2d9d95117afeb9258f12cb3812efe0eddfe0ecb0 Mon Sep 17 00:00:00 2001
From: Cedric Beust
- 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:
The Kobalt IDEA plug-in offers the following features:
Installation
+
@@ -65,69 +81,82 @@
-
- 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.j}n5g&7}oDWP+l~aGwyls+28lA}Mi!UwnbRKWE(Jyd}dEa1UyT$4nVXN=Y=m2Mauh zdH9-@=ux6r{L~hRuC hdw0rvQ+-xWxP6DnArlY&;Tdqu!7tVMOs}dnkN5I8lkz?E$cn7 z8(9xXv&9m8-&GF#!2Ql=5L_zijfSw&csw=YyIA`0uvgWB>0(|00&ypa>4ptVC`lb| zFuj$~IT-3}M<20{$yMK1ZwaN+QGLJ?APeaX<&!rYXD3Y$75xnrm6SPW8|x|bHq$D_ zxWVZ*lYt6rZJLY6 nDoG#|TK$R=I_(k|3m)SS`Up>?6|^k(KYJx}Wn*q&kG;%2ebycO zH^<*;98n)GHVih1Mo~X{7OtxO=we|{=4E4YNZ1H3>co*v2WBt)9eWrP{KNA{;t!%| z5 G6AW{>3|l4VNhL>7?Oq%h3x($C`8m`qRfPGlSNjz)3G*u#b}~qpAn@6I z8OBDMrxb~d( ZAQm7;Y^p@+-C|rR3-O-#FU$ltp3go3 z$eKZPNnXsDM2qpd>IVP;?+ +h?obn5$*tS;Lc**74#~Zv|KvqnlWqN1=UT c|0a%A<%U3*1e0LZdI6-xHzV(Y$zwcCRmFm5OoA`JlFQ2rbOeR-> zw$_G8?!u9P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