blob: da97c0552afdebbfbfeb8edbd7d6686772447d8f [file] [log] [blame]
{namespace buck.development}
/***/
{template .soyweb}
{call buck.page}
{param title: 'Development Workflow' /}
{param content}
As explained in <a href="{ROOT}setup/install.html">Downloading and Installing
Buck</a>, you can build Buck by running <code>ant</code> in the directory
where you checked out Buck from GitHub. If you modify Buck's source code,
running <code>ant</code> again should be sufficient to rebuild it.
If you are concerned that Buck may have gotten in some sort of bad state,
run <code>ant clean && ant</code> to do a clean build.
<p>
In practice, this is not a particularly fast development cycle. Fortunately,
we have found development to be quite fast when developing Buck using Eclipse.
Buck contains the Eclipse project configuration files
{sp}<code>.classpath</code> and <code>.project</code> so that Buck can be
imported directly into Eclipse as a Java project.
The project is configured such that when you save your code,
Eclipse automatically overwrites the <code>.class</code> files where Buck
expects them (assuming you have <strong>Build Automatically</strong> enabled in
Eclipse).
<p>
This means that immediately after you save your code in Eclipse, you can
switch to the command-line to run <code>buck</code> and you will automatically
run Buck with your most recent edits. If your Eclipse build becomes wedged for
any reason, selecting the root folder of the Buck project and choosing
{sp}<strong>File -> Refresh</strong> followed by
{sp}<strong>Project -> Clean&hellip;</strong> should fix everything.
<p>
Note that if you are developing Buck, you should create a
{sp}<code>.nobuckcheck</code> file in the root of the project where you are
using Buck. Read the articles on
{sp}<a href="{ROOT}concept/nobuckcheck.html"><code>.nobuckcheck</code></a> and
{sp}<a href="{ROOT}concept/buckversion.html"><code>.buckversion</code></a> for
more details.
<p>
<strong>Note:</strong> Buck also contains the metadata files so that it can
be imported as a project in IntelliJ. Developing Buck in IntelliJ works
perfectly fine; however, it does not automatically overwrite the existing
{sp}<code>.class</code> files as Eclipse does. (You could likely add some
sort of build step to IntelliJ to make this possible, but we have not.)
Therefore, if you elect to develop Buck using IntelliJ, you may want to
create an alias for <code>buck</code> that runs <code>ant</code> before
running Buck to reduce the friction of developing with IntelliJ.
{/param}
{/call}
{/template}