Skip to content

Commit 4262a1b

Browse files
Merge branch 'main' into require-non-null
2 parents 266e658 + 9bd9eff commit 4262a1b

File tree

212 files changed

+11257
-3701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+11257
-3701
lines changed

.github/dependabot.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,45 @@ updates:
33
- package-ecosystem: "maven"
44
directory: "/common"
55
schedule:
6-
interval: "daily"
6+
interval: "weekly"
7+
groups:
8+
dependencies:
9+
applies-to: version-updates
10+
patterns:
11+
- "*"
712
- package-ecosystem: "maven"
813
directory: "/factory"
914
schedule:
10-
interval: "daily"
15+
interval: "weekly"
16+
groups:
17+
dependencies:
18+
applies-to: version-updates
19+
patterns:
20+
- "*"
1121
- package-ecosystem: "maven"
1222
directory: "/service"
1323
schedule:
14-
interval: "daily"
24+
interval: "weekly"
25+
groups:
26+
dependencies:
27+
applies-to: version-updates
28+
patterns:
29+
- "*"
1530
- package-ecosystem: "maven"
1631
directory: "/value"
1732
schedule:
18-
interval: "daily"
33+
interval: "weekly"
34+
groups:
35+
dependencies:
36+
applies-to: version-updates
37+
patterns:
38+
- "*"
1939
- package-ecosystem: "github-actions"
2040
directory: "/"
2141
schedule:
22-
interval: "daily"
42+
interval: "monthly"
43+
groups:
44+
github-actions:
45+
applies-to: version-updates
46+
patterns:
47+
- "*"

.github/workflows/ci.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,35 @@ name: CI
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
branches:
9-
- master
9+
- main
1010

1111
jobs:
1212
test:
1313
name: "JDK ${{ matrix.java }}"
1414
strategy:
1515
matrix:
16-
java: [ 8, 11 ]
16+
java: [ 8, 11, 17 ]
1717
runs-on: ubuntu-latest
1818
steps:
1919
# Cancel any previous runs for the same branch that are still running.
2020
- name: 'Cancel previous runs'
21-
uses: styfle/cancel-workflow-action@0.9.1
21+
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa
2222
with:
2323
access_token: ${{ github.token }}
2424
- name: 'Check out repository'
25-
uses: actions/checkout@v2.4.0
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
2626
- name: 'Cache local Maven repository'
27-
uses: actions/cache@v2.1.6
27+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
2828
with:
2929
path: ~/.m2/repository
3030
key: maven-${{ hashFiles('**/pom.xml') }}
3131
restore-keys: |
3232
maven-
3333
- name: 'Set up JDK ${{ matrix.java }}'
34-
uses: actions/setup-java@v2
34+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00
3535
with:
3636
java-version: ${{ matrix.java }}
3737
distribution: 'zulu'
@@ -49,16 +49,16 @@ jobs:
4949
runs-on: ubuntu-latest
5050
steps:
5151
- name: 'Check out repository'
52-
uses: actions/checkout@v2.4.0
52+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
5353
- name: 'Cache local Maven repository'
54-
uses: actions/cache@v2.1.6
54+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
5555
with:
5656
path: ~/.m2/repository
5757
key: maven-${{ hashFiles('**/pom.xml') }}
5858
restore-keys: |
5959
maven-
6060
- name: 'Set up JDK 11'
61-
uses: actions/setup-java@v2
61+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00
6262
with:
6363
java-version: 11
6464
distribution: 'zulu'
@@ -78,18 +78,18 @@ jobs:
7878
runs-on: ubuntu-latest
7979
steps:
8080
- name: 'Check out repository'
81-
uses: actions/checkout@v2.4.0
81+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
8282
- name: 'Cache local Maven repository'
83-
uses: actions/cache@v2.1.6
83+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
8484
with:
8585
path: ~/.m2/repository
8686
key: maven-${{ hashFiles('**/pom.xml') }}
8787
restore-keys: |
8888
maven-
89-
- name: 'Set up JDK 11'
90-
uses: actions/setup-java@v2
89+
- name: 'Set up JDK 17' # need 15+ to avoid https://bugs.openjdk.org/browse/JDK-8241780
90+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00
9191
with:
92-
java-version: 11
92+
java-version: 17
9393
distribution: 'zulu'
9494
- name: 'Generate latest docs'
9595
env:

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
A collection of source code generators for [Java][java].
66

7-
## Auto‽
7+
## Overview
88

99
[Java][java] is full of code that is mechanical, repetitive, typically untested
1010
and sometimes the source of subtle bugs. _Sounds like a job for robots!_
@@ -25,7 +25,7 @@ Save time. Save code. Save sanity.
2525

2626
[![Maven Central](https://img.shields.io/maven-central/v/com.google.auto.service/auto-service.svg)](https://mvnrepository.com/artifact/com.google.auto.service/auto-service)
2727

28-
* [AutoValue] - Immutable [value-type] code generation for Java 7+.
28+
* [AutoValue] - Immutable [value-type] code generation for Java 8+.
2929

3030
[![Maven Central](https://img.shields.io/maven-central/v/com.google.auto.value/auto-value.svg)](https://mvnrepository.com/artifact/com.google.auto.value/auto-value)
3131

@@ -49,11 +49,11 @@ Save time. Save code. Save sanity.
4949
See the License for the specific language governing permissions and
5050
limitations under the License.
5151

52-
[AutoFactory]: https://github.com/google/auto/tree/master/factory
53-
[AutoService]: https://github.com/google/auto/tree/master/service
54-
[AutoValue]: https://github.com/google/auto/tree/master/value
55-
[Common]: https://github.com/google/auto/tree/master/common
52+
[AutoFactory]: https://github.com/google/auto/tree/main/factory
53+
[AutoService]: https://github.com/google/auto/tree/main/service
54+
[AutoValue]: https://github.com/google/auto/tree/main/value
55+
[Common]: https://github.com/google/auto/tree/main/common
5656

5757
[java]: https://en.wikipedia.org/wiki/Java_(programming_language)
5858
[value-type]: http://en.wikipedia.org/wiki/Value_object
59-
[`ServiceLoader`]: http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html
59+
[`ServiceLoader`]: https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/util/ServiceLoader.html

common/README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,22 @@ annotation processing environment.
77

88
## Utility classes of note
99

10-
* MoreTypes - utilities and Equivalence wrappers for TypeMirror and related
11-
subtypes
12-
* MoreElements - utilities for Element and related subtypes
13-
* SuperficialValidation - very simple scanner to ensure an Element is valid
14-
and free from distortion from upstream compilation errors
15-
* Visibility - utilities for working with Elements' visibility levels (public,
16-
protected, etc.)
17-
* BasicAnnotationProcessor/ProcessingStep - simple types that
10+
`MoreTypes`
11+
: Utilities and `Equivalence` wrappers for `TypeMirror` and related subtypes
12+
13+
`MoreElements`
14+
: Utilities for `Element` and related subtypes
15+
16+
`SuperficialValidation`
17+
: Very simple scanner to ensure an `Element` is valid and free from distortion
18+
from upstream compilation errors
19+
20+
`Visibility`
21+
: Utilities for working with `Element`s' visibility levels (public, protected,
22+
etc.)
23+
24+
`BasicAnnotationProcessor`/`Step`
25+
: Simple types that
1826
- implement a validating annotation processor
1927
- defer invalid elements until later
2028
- break processor actions into multiple steps (which may each handle

common/pom.xml

Lines changed: 107 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,20 @@
1818
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1919
<modelVersion>4.0.0</modelVersion>
2020

21-
<parent>
22-
<groupId>org.sonatype.oss</groupId>
23-
<artifactId>oss-parent</artifactId>
24-
<version>7</version>
25-
</parent>
26-
2721
<groupId>com.google.auto</groupId>
2822
<artifactId>auto-common</artifactId>
2923
<version>HEAD-SNAPSHOT</version>
3024
<name>Auto Common Libraries</name>
3125
<description>
3226
Common utilities for creating annotation processors.
3327
</description>
34-
<url>https://github.com/google/auto/tree/master/common</url>
28+
<url>https://github.com/google/auto/tree/main/common</url>
3529

3630
<properties>
3731
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3832
<java.version>1.8</java.version>
39-
<guava.version>31.0.1-jre</guava.version>
40-
<truth.version>1.1.3</truth.version>
33+
<guava.version>33.4.8-jre</guava.version>
34+
<truth.version>1.4.4</truth.version>
4135
</properties>
4236

4337
<scm>
@@ -64,12 +58,24 @@
6458
<url>http://www.google.com</url>
6559
</organization>
6660

61+
<distributionManagement>
62+
<snapshotRepository>
63+
<id>sonatype-nexus-snapshots</id>
64+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
65+
</snapshotRepository>
66+
</distributionManagement>
67+
6768
<dependencies>
6869
<dependency>
6970
<groupId>com.google.guava</groupId>
7071
<artifactId>guava</artifactId>
7172
<version>${guava.version}</version>
7273
</dependency>
74+
<dependency>
75+
<groupId>org.jspecify</groupId>
76+
<artifactId>jspecify</artifactId>
77+
<version>1.0.0</version>
78+
</dependency>
7379
<dependency>
7480
<!-- Used only by GeneratedAnnotationSpecs.
7581
If you use JavaPoet, you can use GeneratedAnnotationSpecs. -->
@@ -89,7 +95,7 @@
8995
<dependency>
9096
<groupId>com.google.testing.compile</groupId>
9197
<artifactId>compile-testing</artifactId>
92-
<version>0.19</version>
98+
<version>0.21.0</version>
9399
<scope>test</scope>
94100
</dependency>
95101
<dependency>
@@ -104,39 +110,115 @@
104110
<version>${truth.version}</version>
105111
<scope>test</scope>
106112
</dependency>
107-
<dependency>
108-
<groupId>org.eclipse.jdt</groupId>
109-
<artifactId>ecj</artifactId>
110-
<version>3.25.0</version>
111-
<scope>test</scope>
112-
</dependency>
113113
</dependencies>
114114

115115
<build>
116116
<plugins>
117117
<plugin>
118118
<artifactId>maven-compiler-plugin</artifactId>
119-
<version>3.8.1</version>
119+
<version>3.14.0</version>
120120
<configuration>
121121
<source>${java.version}</source>
122122
<target>${java.version}</target>
123123
<compilerArgument>-Xlint:all</compilerArgument>
124124
<showWarnings>true</showWarnings>
125125
<showDeprecation>true</showDeprecation>
126+
<testExcludes combine.children="append" />
126127
</configuration>
127-
<dependencies>
128-
<dependency>
129-
<groupId>org.codehaus.plexus</groupId>
130-
<artifactId>plexus-java</artifactId>
131-
<version>1.1.0</version>
132-
</dependency>
133-
</dependencies>
134128
</plugin>
135129
<plugin>
136130
<groupId>org.apache.maven.plugins</groupId>
137131
<artifactId>maven-jar-plugin</artifactId>
138-
<version>3.2.0</version>
132+
<version>3.4.2</version>
139133
</plugin>
140134
</plugins>
141135
</build>
136+
137+
<profiles>
138+
<profile>
139+
<id>test-with-ecj</id>
140+
<activation>
141+
<jdk>[17,)</jdk>
142+
</activation>
143+
<dependencies>
144+
<!-- test dependencies -->
145+
<dependency>
146+
<groupId>org.eclipse.jdt</groupId>
147+
<artifactId>ecj</artifactId>
148+
<version>3.42.0</version>
149+
<scope>test</scope>
150+
</dependency>
151+
</dependencies>
152+
</profile>
153+
154+
<profile>
155+
<id>test-without-ecj</id>
156+
<activation>
157+
<jdk>(,17)</jdk>
158+
</activation>
159+
<build>
160+
<plugins>
161+
<plugin>
162+
<artifactId>maven-compiler-plugin</artifactId>
163+
<configuration>
164+
<testExcludes>
165+
<exclude>**/OverridesTest.java</exclude>
166+
</testExcludes>
167+
</configuration>
168+
</plugin>
169+
</plugins>
170+
</build>
171+
</profile>
172+
173+
<profile>
174+
<id>sonatype-oss-release</id>
175+
<build>
176+
<plugins>
177+
<plugin>
178+
<artifactId>maven-source-plugin</artifactId>
179+
<version>3.3.1</version>
180+
<executions>
181+
<execution>
182+
<id>attach-sources</id>
183+
<goals>
184+
<goal>jar-no-fork</goal>
185+
</goals>
186+
</execution>
187+
</executions>
188+
</plugin>
189+
<plugin>
190+
<artifactId>maven-javadoc-plugin</artifactId>
191+
<version>3.11.2</version>
192+
<executions>
193+
<execution>
194+
<id>attach-javadocs</id>
195+
<goals>
196+
<goal>jar</goal>
197+
</goals>
198+
</execution>
199+
</executions>
200+
</plugin>
201+
<plugin>
202+
<artifactId>maven-gpg-plugin</artifactId>
203+
<version>3.2.8</version>
204+
<executions>
205+
<execution>
206+
<id>sign-artifacts</id>
207+
<phase>verify</phase>
208+
<goals>
209+
<goal>sign</goal>
210+
</goals>
211+
</execution>
212+
</executions>
213+
</plugin>
214+
<plugin>
215+
<groupId>org.sonatype.central</groupId>
216+
<artifactId>central-publishing-maven-plugin</artifactId>
217+
<version>0.8.0</version>
218+
<extensions>true</extensions>
219+
</plugin>
220+
</plugins>
221+
</build>
222+
</profile>
223+
</profiles>
142224
</project>

0 commit comments

Comments
 (0)