guavaGetting started with guava


Remarks

This section provides an overview of what guava is, and why a developer might want to use it.

It should also mention any large subjects within guava, and link out to the related topics. Since the Documentation for guava is new, you may need to create initial versions of those related topics.

Versions

VersionRelease Date
r01%2009-09-15
r022010-01-04
r032010-04-09
r042010-04-27
r052010-05-28
r062010-07-07
7.02010-09-22
8.02011-01-27
9.02011-04-07
10.02011-09-28
11.02011-12-18
12.02012-04-30
13.02012-08-03
14.02013-02-25
15.02013-09-06
16.02014-01-17
17.02014-04-22
18.02014-08-25
19.02015-12-09

% did not include Google Collections, which existed separately at that time

Note: Releases 1.0 through 11.0 require JDK 1.5 or newer. Releases 12.0 through 20.0 require JDK 1.6 or newer. Release 21.0 is expected to require JDK 1.8 or newer.

Setup

Dependency on Guava can be added in your Java project by using any build system.

Maven:

<dependency>
  <groupId>com.google.guava</groupId>
  <artifactId>guava</artifactId>
  <version>19.0</version>
</dependency>
 

Gradle:

dependencies {
  compile 'com.google.guava:guava:19.0'
}
 

Ivy

<dependency org="com.google.guava" name="guava" rev="19.0" />
 

Buildr

compile.with 'com.google.guava:guava:jar:19.0'
 

Manual Dependency

You can also just manually download JARs from Guava's release page for the classes, sources and javadocs.

Note that JDK 1.6 or newer is required for Guava 12.0 through 20.0. See Version list for more info. Guava users who target Java 5 should use the Guava JDK5 backport. This includes users who target Android Froyo and earlier.