wiki:Installation

Installation

Installation of GRAL is very straight forward: just include the JAR file of the library core in your project's class path.

Requirements

Recommended packages

Building GRAL from source code

The source package contains all files necessary to build GRAL from scratch using the Gradle sbuild automation tool. Like Makefile files the build.gradle files are used by Gradle to execute certain steps, so called tasks, for generating various distribution or documentation files.

First, you have to get the GRAL source from the Download page or from the git repository using the git clone command:

$ git clone git://erichseifert.de/gral.git GRAL

To see what tasks can be performed change to the directory of the GRAL project and execute the following command:

$ gradle tasks

Building a JAR file of the library core

In case you just want to build the core of the library to get started execute the following command in the core directory:

$ gradle build

This will generate a JAR archive named gral-core in the gral-core/build/libs path. This JAR file can be added to the class path of your application.

Building a JAR file of the examples

If you want to build the GRAL example applications just execute the following command in the gral-examples directory:

$ gradle build

This will generate a JAR archive for the examples in the gral-examples/build/libs path which can be used together with the library core to run the example applications. Finally, to run an application just call java with a suitable class path:

$ java -cp gral-core/src/main/resources:gral-core/build/libs/gral-core-<version>.jar:gral-examples/build/libs/gral-examples-<version>.jar de.erichseifert.gral.examples.xyplot.MemoryUsage

Building the distribution archives

In order to build package archives like the ones available for download you have to execute the following command in the package directory:

$ gradle distTar distZip

This will create {{build/distributions}} directories in gral-core and gral-examples containing the following files:

  • gral-core-<version>.tar.bz2 and gral-core-<version>.zip – JAR files for GRAL and all its dependencies, JavaDoc API documentation, and the source code and resources including the complete Gradle project
  • gral-examples-<version>.tar.bz2 and gral-examples-<version>.zip – Example applications and JAR files for GRAL and all its dependencies, the source code and resources to build the examples including the complete Gradle project

Building the documentation

The GRAL Gradle project offers two sources for documentation:

The first one are the standard Gradle reports containing various project informations like the JavaDocs, test results, etc. To build the Gradle reports just execute in the project directory:

$ gradle report

The second is a book-like documentation in form of a !reStructured Text file which can be found in the doc directory:

Using GRAL in an IDE

The Gradle project can also be used in several development environments, like Eclipse or IDEA. For further information look at the following descriptions on the Gradle website:

Once you have installed an appropriate Gradle plug-in for your IDE you will be able to import the GRAL project found in this folder.

Last modified 4 years ago Last modified on Dec 9, 2013, 12:44:30 AM