четвер, 22 серпня 2013 р.

Install Gradle on Ubuntu 12.04

I'm going to try builld Android projects with Gradle, so first of all I need to install this build system.

  • Visit http://www.gradle.org/installation, click "Download Gradle 1.7" button to get complete source code(binaries, sources and documentation). This archive has size about 50Mb, but you can choose lighter archive on http://www.gradle.org/downloads.
  • Unpack the archive with GUI tool, as Gradle requires.
  • Also we need to add Gradle directory to $PATH variable. I add this only to my user's path, so I open ~/.bashrc and add the lines: 
PATH=$PATH:/home/username/gradle-1.7/bin
export PATH
  •  Save changes and run source .bashrc to apply changes. I check the PATH with echo $PATH - it shoud be at the end of output.
  • Final step - run gradle command in the terminal, it shows output:
:help
Welcome to Gradle 1.7.
To run a build, run gradle ...
To see a list of available tasks, run gradle tasks
To see a list of command-line options, run gradle --help
BUILD SUCCESSFUL
Total time: 4.786 secs
Sounds good, Gradle build system is installed now and ready for use.

Немає коментарів:

Дописати коментар