Name Date Size #Lines LOC

..--

.github/H25-Apr-2025-602460

.mvn/wrapper/H25-Apr-2025-2019

android/H25-Apr-2025-506,310370,064

android-annotation-stubs/H25-Apr-2025-533272

futures/H25-Apr-2025-479235

guava/H25-Apr-2025-182,71497,702

guava-bom/H25-Apr-2025-5951

guava-gwt/H25-Apr-2025-8,5035,234

guava-testlib/H25-Apr-2025-49,20233,589

guava-tests/H25-Apr-2025-292,535251,653

integration-tests/gradle/H25-Apr-2025-603389

proguard/H25-Apr-2025-143126

refactorings/H25-Apr-2025-286206

util/H25-Apr-2025-8839

.classpathH A D25-Apr-2025298 87

.gitattributesH A D25-Apr-2025196 1412

.gitignoreH A D25-Apr-2025176 2218

.projectH A D25-Apr-2025364 1817

Android.bpH A D25-Apr-20256.4 KiB226213

CONTRIBUTING.mdH A D25-Apr-20253.7 KiB8766

CONTRIBUTORSH A D25-Apr-20259 21

CleanSpec.mkH A D25-Apr-20252.2 KiB500

LICENSEH A D25-Apr-202511.1 KiB203169

METADATAH A D25-Apr-2025557 2119

MODULE_LICENSE_APACHE2HD25-Apr-20250

NOTICEH A D25-Apr-202511.1 KiB203169

OWNERSH A D25-Apr-202533 21

README.mdH A D25-Apr-20255.9 KiB138100

cycle_suppress_list.txtH A D25-Apr-20253.1 KiB5346

javadoc-stylesheet.cssH A D25-Apr-202511.2 KiB492488

mvnwH A D25-Apr-202511 KiB309214

mvnw.cmdH A D25-Apr-20257.4 KiB206169

overview.htmlH A D25-Apr-2025429 128

pom.xmlH A D25-Apr-202519.7 KiB503432

README.md

1# Guava: Google Core Libraries for Java
2
3[![Latest release](https://img.shields.io/github/release/google/guava.svg)](https://github.com/google/guava/releases/latest)
4[![Build Status](https://github.com/google/guava/workflows/CI/badge.svg?branch=master)](https://github.com/google/guava/actions)
5[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7197/badge)](https://bestpractices.coreinfrastructure.org/projects/7197)
6
7
8
9Guava is a set of core Java libraries from Google that includes new collection
10types (such as multimap and multiset), immutable collections, a graph library,
11and utilities for concurrency, I/O, hashing, primitives, strings, and more! It
12is widely used on most Java projects within Google, and widely used by many
13other companies as well.
14
15
16
17Guava comes in two flavors:
18
19*   The JRE flavor requires JDK 1.8 or higher.
20*   If you need support for Android, use
21    [the Android flavor](https://github.com/google/guava/wiki/Android). You can
22    find the Android Guava source in the [`android` directory].
23
24[`android` directory]: https://github.com/google/guava/tree/master/android
25
26## Adding Guava to your build
27
28Guava's Maven group ID is `com.google.guava`, and its artifact ID is `guava`.
29Guava provides two different "flavors": one for use on a (Java 8+) JRE and one
30for use on Android or by any library that wants to be compatible with Android.
31These flavors are specified in the Maven version field as either `33.3.0-jre` or
32`33.3.0-android`. For more about depending on Guava, see
33[using Guava in your build].
34
35To add a dependency on Guava using Maven, use the following:
36
37```xml
38<dependency>
39  <groupId>com.google.guava</groupId>
40  <artifactId>guava</artifactId>
41  <version>33.3.0-jre</version>
42  <!-- or, for Android: -->
43  <version>33.3.0-android</version>
44</dependency>
45```
46
47To add a dependency using Gradle:
48
49```gradle
50dependencies {
51  // Pick one:
52
53  // 1. Use Guava in your implementation only:
54  implementation("com.google.guava:guava:33.3.0-jre")
55
56  // 2. Use Guava types in your public API:
57  api("com.google.guava:guava:33.3.0-jre")
58
59  // 3. Android - Use Guava in your implementation only:
60  implementation("com.google.guava:guava:33.3.0-android")
61
62  // 4. Android - Use Guava types in your public API:
63  api("com.google.guava:guava:33.3.0-android")
64}
65```
66
67For more information on when to use `api` and when to use `implementation`,
68consult the
69[Gradle documentation on API and implementation separation](https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_separation).
70
71## Snapshots and Documentation
72
73Snapshots of Guava built from the `master` branch are available through Maven
74using version `HEAD-jre-SNAPSHOT`, or `HEAD-android-SNAPSHOT` for the Android
75flavor.
76
77-   Snapshot API Docs: [guava][guava-snapshot-api-docs]
78-   Snapshot API Diffs: [guava][guava-snapshot-api-diffs]
79
80## Learn about Guava
81
82-   Our users' guide, [Guava Explained]
83-   [A nice collection](https://www.tfnico.com/presentations/google-guava) of
84    other helpful links
85
86## Links
87
88-   [GitHub project](https://github.com/google/guava)
89-   [Issue tracker: Report a defect or feature request](https://github.com/google/guava/issues/new)
90-   [StackOverflow: Ask "how-to" and "why-didn't-it-work" questions](https://stackoverflow.com/questions/ask?tags=guava+java)
91-   [guava-announce: Announcements of releases and upcoming significant changes](https://groups.google.com/group/guava-announce)
92-   [guava-discuss: For open-ended questions and discussion](https://groups.google.com/group/guava-discuss)
93
94## IMPORTANT WARNINGS
95
961.  APIs marked with the `@Beta` annotation at the class or method level are
97    subject to change. They can be modified in any way, or even removed, at any
98    time. If your code is a library itself (i.e., it is used on the CLASSPATH of
99    users outside your own control), you should not use beta APIs unless you
100    [repackage] them. **If your code is a library, we strongly recommend using
101    the [Guava Beta Checker] to ensure that you do not use any `@Beta` APIs!**
102
1032.  APIs without `@Beta` will remain binary-compatible for the indefinite
104    future. (Previously, we sometimes removed such APIs after a deprecation
105    period. The last release to remove non-`@Beta` APIs was Guava 21.0.) Even
106    `@Deprecated` APIs will remain (again, unless they are `@Beta`). We have no
107    plans to start removing things again, but officially, we're leaving our
108    options open in case of surprises (like, say, a serious security problem).
109
1103.  Guava has one dependency that is needed for linkage at runtime:
111    `com.google.guava:failureaccess:1.0.2`. It also has
112    [some annotation-only dependencies][guava-deps], which we discuss in more
113    detail at that link.
114
1154.  Serialized forms of ALL objects are subject to change unless noted
116    otherwise. Do not persist these and assume they can be read by a future
117    version of the library.
118
1195.  Our classes are not designed to protect against a malicious caller. You
120    should not use them for communication between trusted and untrusted code.
121
1226.  For the mainline flavor, we test the libraries using OpenJDK 8, 11, and 17
123    on Linux, with some additional testing on newer JDKs and on Windows. Some
124    features, especially in `com.google.common.io`, may not work correctly in
125    non-Linux environments. For the Android flavor, our unit tests also run on
126    API level 21 (Lollipop).
127
128[guava-snapshot-api-docs]: https://guava.dev/releases/snapshot-jre/api/docs/
129[guava-snapshot-api-diffs]: https://guava.dev/releases/snapshot-jre/api/diffs/
130[Guava Explained]: https://github.com/google/guava/wiki/Home
131[Guava Beta Checker]: https://github.com/google/guava-beta-checker
132
133<!-- References -->
134
135[using Guava in your build]: https://github.com/google/guava/wiki/UseGuavaInYourBuild
136[repackage]: https://github.com/google/guava/wiki/UseGuavaInYourBuild#what-if-i-want-to-use-beta-apis-from-a-library-that-people-use-as-a-dependency
137[guava-deps]: https://github.com/google/guava/wiki/UseGuavaInYourBuild#what-about-guavas-own-dependencies
138