Bump auto-service-annotations from 1.0 to 1.0.1

Bumps [auto-service-annotations](https://github.com/google/auto) from 1.0 to 1.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/google/auto/releases">auto-service-annotations's releases</a>.</em></p>
<blockquote>
<h2>AutoFactory 1.0.1</h2>
<ul>
<li>Fixed Gradle incremental compilation. (8f17e4c4)</li>
</ul>
<h2>AutoCommon 1.0.1</h2>
<ul>
<li>Added some methods to allow annotation processors to use Streams functionality that is present in mainline Guava but not Android Guava. This can be useful if Android Guava might be on the processor path.</li>
</ul>
<h2>AutoService 1.0.1</h2>
<ul>
<li>AutoService no longer throws an exception for a missing service class. (d8083fde)</li>
<li>Fixed a bug in AutoServiceProcessor that could lead to some services not being processed. (d4c865be)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/google/auto/commit/e057b8bcbd151556203573471c472605ce68f6e8"><code>e057b8b</code></a> Set version number for auto-common to 1.0.1.</li>
<li><a href="https://github.com/google/auto/commit/15d49d9f3c0b2a782b03e16a80daf4f503943035"><code>15d49d9</code></a> Replace server Guava API usage with Android compatible alternatives.</li>
<li><a href="https://github.com/google/auto/commit/64b9ecc8fa0279278c521a58c3878fdb43d1d6b2"><code>64b9ecc</code></a> Bump actions/cache from 2.1.5 to 2.1.6</li>
<li><a href="https://github.com/google/auto/commit/7d3aa66ed4a4a419966e29ec9500779640e0a903"><code>7d3aa66</code></a> Implicitly exclude Kotlin <code>@Metadata</code> annotations from <code>@CopyAnnotations</code></li>
<li><a href="https://github.com/google/auto/commit/2b77e449d269a73f43a9cc1d410854c473b026f2"><code>2b77e44</code></a> Bump kotlin.version from 1.5.0 to 1.5.10 in /value</li>
<li><a href="https://github.com/google/auto/commit/acb0765e866ec9ef4dec69b0e6019616a5c3c820"><code>acb0765</code></a> Bump truth from 1.1.2 to 1.1.3 in /factory</li>
<li><a href="https://github.com/google/auto/commit/7f8bd35b8a0ef0f78aef7057160f81f9175a0763"><code>7f8bd35</code></a> Bump truth from 1.1.2 to 1.1.3 in /common</li>
<li><a href="https://github.com/google/auto/commit/d48209755a3417d8f87f3b91d0ea524057b3ded9"><code>d482097</code></a> Bump truth from 1.1.2 to 1.1.3 in /service</li>
<li><a href="https://github.com/google/auto/commit/31eeb6764894de6d6d383652366527750366e7d5"><code>31eeb67</code></a> Bump truth.version from 1.1.2 to 1.1.3 in /value</li>
<li><a href="https://github.com/google/auto/commit/54baeb3e4ffbf1a4ad403c3386eaf462620fe6a1"><code>54baeb3</code></a> Update an AutoValue test to the newer compile-testing API.</li>
<li>Additional commits viewable in <a href="https://github.com/google/auto/compare/auto-value-1.0...auto-common-1.0.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.auto.service:auto-service-annotations&package-manager=maven&previous-version=1.0&new-version=1.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

Fixes #724

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/google-java-format/pull/724 from google:dependabot/maven/com.google.auto.service-auto-service-annotations-1.0.1 f73ae20a8d349ad0cf51c047cac205a5954e0a97
PiperOrigin-RevId: 423849278
1 file changed
tree: dd7f541f201da1f95f9af12b948ec421aa3c5523
  1. .github/
  2. .mvn/
  3. core/
  4. eclipse_plugin/
  5. idea_plugin/
  6. scripts/
  7. util/
  8. .gitignore
  9. CONTRIBUTING.md
  10. LICENSE
  11. pom.xml
  12. README.md
README.md

google-java-format

google-java-format is a program that reformats Java source code to comply with Google Java Style.

Using the formatter

from the command-line

Download the formatter and run it with:

java -jar /path/to/google-java-format-1.13.0-all-deps.jar <options> [files...]

The formatter can act on whole files, on limited lines (--lines), on specific offsets (--offset), passing through to standard-out (default) or altered in-place (--replace).

To reformat changed lines in a specific patch, use google-java-format-diff.py.

Note: There is no configurability as to the formatter's algorithm for formatting. This is a deliberate design decision to unify our code formatting on a single format.

JDK 16

The following flags are required when running on JDK 16, due to JEP 396: Strongly Encapsulate JDK Internals by Default:

java \
  --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
  -jar google-java-format-1.13.0-all-deps.jar <options> [files...]

IntelliJ, Android Studio, and other JetBrains IDEs

A google-java-format IntelliJ plugin is available from the plugin repository. To install it, go to your IDE's settings and select the Plugins category. Click the Marketplace tab, search for the google-java-format plugin, and click the Install button.

The plugin will be disabled by default. To enable it in the current project, go to File→Settings...→google-java-format Settings (or IntelliJ IDEA→Preferences...→Other Settings→google-java-format Settings on macOS) and check the Enable google-java-format checkbox. (A notification will be presented when you first open a project offering to do this for you.)

To enable it by default in new projects, use File→Other Settings→Default Settings....

When enabled, it will replace the normal Reformat Code action, which can be triggered from the Code menu or with the Ctrl-Alt-L (by default) keyboard shortcut.

The import ordering is not handled by this plugin, unfortunately. To fix the import order, download the IntelliJ Java Google Style file and import it into File→Settings→Editor→Code Style.

Eclipse

Version 1.11 of the google-java-format Eclipse plugin can be downloaded from the releases page. Drop it into the Eclipse drop-ins folder to activate the plugin.

The plugin adds a google-java-format formatter implementation that can be configured in Window > Preferences > Java > Code Style > Formatter > Formatter Implementation.

Third-party integrations

as a library

The formatter can be used in software which generates java to output more legible java code. Just include the library in your maven/gradle/etc. configuration.

Maven

<dependency>
  <groupId>com.google.googlejavaformat</groupId>
  <artifactId>google-java-format</artifactId>
  <version>1.13.0</version>
</dependency>

Gradle

dependencies {
  implementation 'com.google.googlejavaformat:google-java-format:1.13.0'
}

You can then use the formatter through the formatSource methods. E.g.

String formattedSource = new Formatter().formatSource(sourceString);

or

CharSource source = ...
CharSink output = ...
new Formatter().formatSource(source, output);

Your starting point should be the instance methods of com.google.googlejavaformat.java.Formatter.

Building from source

mvn install

Contributing

Please see the contributors guide for details.

License

Copyright 2015 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.