Java Clean Architecture Masterclass

Java Clean Architecture MasterclassNov 20-21

Join

Disclaimer: This is not an official Google product.

Mug

A small Java 8+ utilities library (javadoc), widely used in Google's internal Java codebase, with 0 deps (Proto, BigQuery, Guava addons are in separate artifacts).

Highlights

More tools
Installation
Maven

Add the following to pom.xml:

  <dependency>
    <groupId>com.google.mug</groupId>
    <artifactId>mug</artifactId>
    <version>8.6</version>
  </dependency>

Add mug-errorprone to your annotationProcessorPaths:

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <annotationProcessorPaths>
              <path>
                <groupId>com.google.errorprone</groupId>
                <artifactId>error_prone_core</artifactId>
                <version>2.23.0</version>
              </path>
              <path>
                <groupId>com.google.mug</groupId>
                <artifactId>mug-errorprone</artifactId>
                <version>8.6</version>
              </path>
            </annotationProcessorPaths>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

Protobuf utils (javadoc):

  <dependency>
    <groupId>com.google.mug</groupId>
    <artifactId>mug-protobuf</artifactId>
    <version>8.6</version>
  </dependency>

Guava add-ons (with SafeSql, SafeQuery and GoogleSql):

  <dependency>
    <groupId>com.google.mug</groupId>
    <artifactId>mug-guava</artifactId>
    <version>8.6</version>
  </dependency>
Gradle

Add to build.gradle:

  implementation 'com.google.mug:mug:8.6'
  implementation 'com.google.mug:mug-guava:8.6'
  implementation 'com.google.mug:mug-protobuf:8.6'

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.