mirror of
https://github.com/ethauvin/kobalt-doc.git
synced 2025-04-24 19:47:11 -07:00
181 lines
5.8 KiB
HTML
181 lines
5.8 KiB
HTML
<html>
|
|
<head>
|
|
<title>
|
|
|
|
Kobalt, by Cedric Beust
|
|
|
|
</title>
|
|
|
|
<!-- Bootstrap core CSS -->
|
|
<script type="text/javascript" src="../sh/scripts/shCore.js"></script>
|
|
<script type="text/javascript" src="../sh/scripts/shBrushJScript.js"></script>
|
|
<script type="text/javascript" src="../sh/scripts/shBrushJava.js"></script>
|
|
<script type="text/javascript" src="../sh/scripts/shBrushPlain.js"></script>
|
|
|
|
<script>
|
|
SyntaxHighlighter.defaults['gutter'] = false;
|
|
SyntaxHighlighter.defaults['toolbar'] = false;
|
|
SyntaxHighlighter.all();
|
|
</script>
|
|
|
|
<!-- Optional Bootstrap Theme -->
|
|
|
|
<link href="data:text/css;charset=utf-8," data-href="../bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet" id="bs-theme-stylesheet">
|
|
|
|
|
|
<!--[if lt IE 9]><script src="../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
|
<!--
|
|
<script src="../bootstrap/assets/js/ie-emulation-modes-warning.js"></script>
|
|
-->
|
|
|
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
|
<![endif]-->
|
|
|
|
<!-- Favicons -->
|
|
<!--
|
|
<link rel="icon" href="/favicon.ico">
|
|
-->
|
|
|
|
<style type="text/css">
|
|
img {
|
|
border: 1px solid #cccccc;
|
|
padding: 5px;
|
|
margin: 10px;
|
|
}
|
|
img.kb-wide {
|
|
width: 75%;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
<div class="container">
|
|
|
|
<!-- Static navbar -->
|
|
<nav id="kobalt-navbar" class="navbar navbar-default">
|
|
</nav>
|
|
|
|
<!-- Main component for a primary marketing message or call to action -->
|
|
<div class="jumbotron">
|
|
<h1>IDEA plug-in</h1>
|
|
<p>How to install and use the Kobalt IDEA plug-in.</p>
|
|
|
|
</div>
|
|
|
|
<!-- Main content -->
|
|
<div class="col-md-9">
|
|
|
|
<h2 class="section" id="installation">Installation</h2>
|
|
<p>
|
|
Open the "Plugins" section of the IDEA preferences and find the "Kobalt" plug-in.
|
|
</p>
|
|
<p align="center">
|
|
<img src="../pics/install-plugin.png" class="img-rounded kb-wide"/>
|
|
</p>
|
|
<p>
|
|
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:
|
|
</p>
|
|
<p align="center">
|
|
<img src="../pics/kobalt-menu.png" class="img-rounded"/>
|
|
</p>
|
|
|
|
<h2 class="section" id="features">Features</h2>
|
|
<p>
|
|
The Kobalt IDEA plug-in offers the following features:
|
|
<ul>
|
|
<li>Synchronization of build files.</li>
|
|
</ul>
|
|
</p>
|
|
<h3 class="section" indent="1" id="sync-build-file">Synchronization of build files</h3>
|
|
<p>
|
|
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:
|
|
</p>
|
|
<pre>
|
|
compile("org.apache.ant:ant:1.7.0",
|
|
"com.google.inject:guice:4.0:no_aop",
|
|
"com.beust:jcommander:1.48")
|
|
</pre>
|
|
<p>
|
|
Select the menu "Kobalt / Sync build file", wait for a few seconds as the status in the lower left
|
|
corner updates:
|
|
</p>
|
|
<p align="center">
|
|
<img src="../pics/status.png" class="img-rounded"/>
|
|
</p>
|
|
<p>
|
|
Bring up the "Project structure" window for your project and you should see the following:
|
|
</p>
|
|
<p align="center">
|
|
<img src="../pics/structure-1.png" class="img-rounded"/>
|
|
</p>
|
|
<p>
|
|
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:
|
|
</p>
|
|
<p align="center">
|
|
<img src="../pics/structure-2.png" class="img-rounded"/>
|
|
</p>
|
|
<p>
|
|
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:
|
|
</p>
|
|
<pre>
|
|
dependencies {
|
|
runtime("com.google.inject:guice:4.0:no_aop")
|
|
compile("org.apache.ant:ant:1.7.0",
|
|
"com.beust:jcommander:1.48")
|
|
}</pre>
|
|
<p>
|
|
The libraries are now the following:
|
|
</p>
|
|
<p align="center">
|
|
<img src="../pics/structure-3.png" class="img-rounded"/>
|
|
</p>
|
|
<p>
|
|
Notice that you now have two different libraries and that they have both been added with the
|
|
correct scope to your project:
|
|
</p>
|
|
<p align="center">
|
|
<img src="../pics/structure-4.png" class="img-rounded"/>
|
|
</p>
|
|
|
|
<h2 class="section">Source code and bug reports</h2>
|
|
<p>
|
|
The source code <a href="http://github.com/cbeust/kobalt-intellij-plugin">can be found on github</a>.
|
|
If you need to report a bug, please make sure you include the log file, which you can find under
|
|
the "Help" menu:
|
|
</p>
|
|
<p align="center">
|
|
<img src="../pics/show-log.png" class="img-rounded"/>
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Table of contents -->
|
|
<div class="col-md-3" id="table-of-contents">
|
|
</div>
|
|
|
|
</div> <!-- container -->
|
|
|
|
<!-- Bootstrap core JavaScript
|
|
================================================== -->
|
|
<!-- Placed at the end of the document so the pages load faster -->
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
|
<script src="../bootstrap/dist/js/bootstrap.min.js"></script>
|
|
<script src="../js/kobalt.js"></script>
|
|
<script>generateKobalt(4);</script>
|
|
|
|
<!--
|
|
<script src="../../assets/js/docs.min.js"></script>
|
|
-->
|
|
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
|
<!--
|
|
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
|
|
-->
|
|
|
|
</body>
|