From 68d5919e44b01c283e8a4bfa35df886f9e4d79ca Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Tue, 23 Feb 2016 21:00:42 +0400 Subject: [PATCH] Add Homebrew instructions. --- getting-started/index.html | 45 +++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/getting-started/index.html b/getting-started/index.html index a569246..b0d9d4a 100644 --- a/getting-started/index.html +++ b/getting-started/index.html @@ -40,34 +40,42 @@
-

1. Download Kobalt

+

1. Install Kobalt

+

With HomeBrew

- Download the zip file then unzip it in a location we'll call KOBALT_HOME: + If you are on MacOS and have brew installed: +

+$ brew install kobalt
+$ which kobaltw
+/usr/local/bin/brew
+

+

Manually

+

+Download the zip file and unzip it in a that you can add to your $PATH variable:

-cd $KOBALT_HOME
+cd yourLocation
 unzip kobalt-xxx.zip
 
-

- Note: Kobalt doesn't need any environment variable to run, the environment variable used above - is only here for clarity. -

-

2. Initialize your project

-

- Change to your project directory and call the kobaltw command with --init: -

+

2. Initialize your project

+

+Change to your project directory and call the kobaltw command with --init: +

 cd ~/java/project
-$KOBALT_HOME/kobaltw --init java
+kobaltw --init java
 
-

- This command will do two things: -

-
    -
  1. Create a default kobalt/src/Build.kt suitable for a brand new Java project. -
  2. Install the Kobalt Wrapper in your current directory (a script called kobaltw) and a few additional files in the kobalt/wrapper directory. From now on, you can just use ./kobaltw to build and you can ignore $KOBALT_HOME. +

    +This command will do two things: +

    +
      +
    1. Create a default kobalt/src/Build.kt file based on what was found in your project.
    2. +
    3. Install the Kobalt Wrapper in your current directory (a script called kobaltw) and a few additional files in the kobalt/wrapper directory.

    +From now on, you can just use ./kobaltw to build and you can ignore the kobaltw on your path (this command is only useful for initializing projects). +

    +

    You can now attempt to build your project with Kobalt:

    @@ -76,6 +84,7 @@ You can now attempt to build your project with Kobalt:
     If your project follows a regular build structure (e.g. Maven's hierarchy), this should compile your file and create a .jar file. If not, you will have to make a few edits to your Build.kt.
     As of this writing, Kobalt supports Java and Kotlin projects.
     
    +
     

    3. Edit kobalt/src/Build.kt

    The build file generated by default might need some editing before you can build your project, so take a look at it and adjust whatever is necessary (e.g. package name, version, etc...)