51,921
stars
+2+4+1
11,241
forks
2,318
watchers
3,729
prs
3,681
issues
62
releases
0
discussions
README
Guava: Google Core Libraries for Java
Guava is a set of core Java libraries from Google that includes new collection
types (such as multimap and multiset), immutable collections, a graph library,
and utilities for concurrency, I/O, hashing, primitives, strings, and more! It
is widely used on most Java projects within Google, and widely used by many
other companies as well.
Guava comes in two flavors:
The JRE flavor requires JDK 1.8 or higher.
If you need support for Android, use
the Android flavor. You can
find the Android Guava source in the [android directory].
[android directory]: https://github.com/google/guava/tree/master/android
Adding Guava to your build
Guava's Maven group ID is com.google.guava, and its artifact ID is guava.
Guava provides two different "flavors": one for use on a (Java 8+) JRE and one
for use on Android or by any library that wants to be compatible with Android.
These flavors are specified in the Maven version field as either 33.8.0-jre or
33.8.0-android. For more about depending on Guava, see
[using Guava in your build].
To add a dependency on Guava using Maven, use the following:
xml
com.google.guava
guava
33.8.0-jre
33.8.0-android
To add a dependency using Gradle:
gradle
dependencies {
// Pick one:
// 1. Use Guava in your implementation only:
implementation("com.google.guava:guava:33.8.0-jre")
// 2. Use Guava types in your public API:
api("com.google.guava:guava:33.8.0-jre")
// 3. Android - Use Guava in your implementation only:
implementation("com.google.guava:guava:33.8.0-android")
// 4. Android - Use Guava types in your public API:
api("com.google.guava:guava:33.8.0-android")
}
For more information on when to use api and when to use implementation,
consult the
Gradle documentation on API and implementation separation.
Snapshots and Documentation
Snapshots of Guava built from the master branch are available through Maven
using version 999.0.0-HEAD-jre-SNAPSHOT, or 999.0.0-HEAD-android-SNAPSHOT
for the Android flavor.
[Snapshot API Javadoc][guava-snapshot-api-docs] as well as
[Snapshot API Diffs][guava-snapshot-api-diffs] are also available.
Another easy way to get to the Javadoc is to open
guava.dev/api. You can also jump right to a specific
class by appending the class name to guava.dev. For example,
guava.dev/ImmutableList!
Learn about Guava
- Our users' guide, [Guava Explained]
- A nice collection of
other helpful links
Links
- GitHub project
- Issue tracker: Report a defect or feature request
- StackOverflow: Ask "how-to" and "why-didn't-it-work" questions
- guava-announce: Announcements of releases and upcoming significant changes
- guava-discuss: For open-ended questions and discussion
IMPORTANT WARNINGS
1. APIs marked with the @Beta annotation at the class or method level are
subject to change. They can be modified in any way, or even removed, at any
time. If your code is a library itself (i.e., itTop issues
#451Implement List.partition alternative that accepts number of partitions rather than their size61 comments · 2014-10-31#521Add the DisjointSet data structure57 comments · 2014-10-31#309IntMath.sum(int[]), and likewise42 comments · 2014-10-31#902Multitable interface40 comments · 2014-10-31#872Single-element cache38 comments · 2014-10-31#683A Pool<T> for expensive objects38 comments · 2014-10-31#677New feature: Iterators.interleave() [or Iterators.zip()]31 comments · 2014-10-31#6614Figure out when to require Java 11 for new Guava versions29 comments · 2023-06-30
Latest release
33.8.0 v33.8.0 2026-11-02Maven xml com.google.guava guava 33.8.0-jre 33.8.0-android Jar files - 33.8.0-jre.jar - 33.8.0-android.jar Guava requires one runtime dependency, which you can download here: - failureaccess-1.0.3.jar Javadoc - 33.8.0-jre - 33.8.0-android JDiff - 33.8.0-jre vs. 33.7.2-jre - 33.8.0-android vs. 33.7.2-android - 33.8.0-android vs. 33.8.0-jre Changelog - collect: Enhanced HashBiMap and LinkedHashMultimap.ValueSet to defend against hash flooding (forthcoming CVE-2026-118042). (7cd44b3506) - collect: Accidentally chang