1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt-doc.git synced 2025-04-25 03:57:11 -07:00
kobalt-doc/contributing/index.html
2016-01-27 15:26:26 -08:00

117 lines
No EOL
6.4 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">
-->
</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 -->
<!-- Main content -->
<div class="col-md-9">
<h2 class="section" id="license">License, Source code & Issues</h2>
<p>
Kobalt is <a href="https://github.com/cbeust/kobalt/blob/master/LICENSE.txt">licensed under Apache 2.0</a>
</p>
<p>
You can contribute code and report issues at the <a href="https://github.com/cbeust/kobalt">Kobalt Github Repo</a>
</p>
<h2 class="section" id="discuss">Discuss Kobalt</h2>
<ul>
<li>Live discussions are happening on Kotlin's Slack Channel, managed by JetBrains. You can get an automated invitation <a href="http://kotlinslackin.herokuapp.com/">here</a> and then, just join the <code>#kobalt</code> channel.
</li>
<li><a href="https://groups.google.com/forum/#!forum/kobalt-users">Join <code>kobalt-users</code>, the mailing-list for Kobalt users.</a></li>
<li><a href="https://groups.google.com/forum/#!forum/kobalt-dev">Join <code>kobalt-dev</code>, the mailing-list for Kobalt developers</a>. This mailing-list is for people interested in writing code for Kobalt, either the core, or writing plug-ins, or just to follow various technical discussions about Kobalt's internals.</li>
</ul>
<h2 class="section" id="idea">Configuring IDEA</h2>
<p>
Working on the Kobalt code base with Intellij IDEA is very easy.
</p>
<h3 class="section" id="version" indent="1">Edit kobalt.version</h3>
<p>
First of all, edit the file <code>src/main/resources/kobalt.properties</code> and set it
to a nonexistent version. For example, if the current version is <code>0.399</code>,
set it to <code>0.400</code>.
</p>
<pre class="brush:plain">
kobalt.version=0.400
</pre>
<p>
When you launch Kobalt from IDEA with a nonexistent version, Kobalt will show a message saying
that it couldn't locate that version and instead, it will use the classes generated by IDEA. This
way, you will always be running the files that you just modified with IDEA. On start up,
Kobalt will display a message looking like:
</p>
<pre class="brush:plain">
Couldn't find .../kobalt-0.400.jar, using ...
</pre>
<p>
Note that at the moment, Kobalt expects to be located in <code>$HOME/kotlin/kobalt</code>.
</p>
<h3 class="section" id="launch_configuration" indent="1">Launch configuration</h3>
<p>Next, create a launch configuration in IDEA.</p>
<p>
Kobalt's main class is <code>com.beust.kobalt.MainKt</code>. Here is a typical launch configuration:
</p>
<p align="center">
<img width="99%" class="img-rounded" src="../pics/launch-configuration.png"/>
</p>
<p>
A few observations:
<ul>
<li>You can ask Kobalt to build external projects by specifying a non-empty "Working Directory".</li>
<li>The default log level is 1. 2 is useful for debugging and 3 will be extremely verbose.</li>
<li>Another command line parameter worth of notice is <code>--dev</code>, which will add the class
name and thread information to each log line.</li>
<li>Checking the "Single instance" box is useful to avoid duplicating these launch configurations.</li>
</ul>
</p>
</div>
<!-- Table of contents -->
<div class="col-md-3" id="table-of-contents">
</div>
<!-- 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(6);</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>