Skip to content

Commit 58e0b20

Browse files
committed
move errorprone into diff profile
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
1 parent 4bcc776 commit 58e0b20

File tree

2 files changed

+47
-35
lines changed

2 files changed

+47
-35
lines changed

.github/workflows/multi-version-test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
distribution: 'temurin'
2727
java-version: ${{ matrix.java }}
2828

29-
# - name: Cache local Maven repository
30-
# uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
31-
# with:
32-
# path: ~/.m2/repository
33-
# key: ${{ runner.os }}-maven-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
34-
# restore-keys: |
35-
# ${{ runner.os }}-maven-java${{ matrix.java }}-
36-
# ${{ runner.os }}-maven-
29+
- name: Cache local Maven repository
30+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
31+
with:
32+
path: ~/.m2/repository
33+
key: ${{ runner.os }}-maven-java${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
34+
restore-keys: |
35+
${{ runner.os }}-maven-java${{ matrix.java }}-
36+
${{ runner.os }}-maven-
3737
3838
- name: Build and test on Java ${{ matrix.java }}
39-
run: ./mvnw clean install -Dtest.java.version=${{ matrix.java }} -Dspotless.skip=true -Dcheckstyle.skip=true -Dmaven.compiler.proc=none -Dwarnings=-nowarn
39+
run: ./mvnw clean install -Dtest.java.version=${{ matrix.java }} -Dspotless.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn -Dcoverage.skip=true

pom.xml

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -262,33 +262,7 @@
262262
<arg>${warnings}</arg>
263263
<arg>--should-stop=ifError=FLOW</arg>
264264
<arg>-XDcompilePolicy=simple</arg>
265-
<arg>
266-
-Xplugin:ErrorProne
267-
-Xep:AlmostJavadoc:OFF
268-
-Xep:MissingSummary:OFF
269-
-Xep:LongDoubleConversion:OFF
270-
-Xep:StringSplitter:OFF
271-
-XepExcludedPaths:(.*/generated/.*|.*/src/test/java/.*|.*/examples/.*|.*/integration-tests/.*)
272-
-XepOpt:NullAway:AnnotatedPackages=io.prometheus.metrics
273-
</arg>
274265
</compilerArgs>
275-
<annotationProcessorPaths>
276-
<path>
277-
<groupId>com.google.errorprone</groupId>
278-
<artifactId>error_prone_core</artifactId>
279-
<version>2.46.0</version>
280-
</path>
281-
<path>
282-
<groupId>com.uber.nullaway</groupId>
283-
<artifactId>nullaway</artifactId>
284-
<version>0.12.15</version>
285-
</path>
286-
<!-- Other annotation processors go here.
287-
288-
If 'annotationProcessorPaths' is set, processors will no longer be
289-
discovered on the regular -classpath; see also 'Using Error Prone
290-
together with other annotation processors' below. -->
291-
</annotationProcessorPaths>
292266
</configuration>
293267
</plugin>
294268
<plugin>
@@ -449,6 +423,44 @@
449423
</plugins>
450424
</build>
451425
</profile>
426+
<profile>
427+
<id>errorprone</id>
428+
<activation>
429+
<jdk>[21,)</jdk>
430+
</activation>
431+
<build>
432+
<plugins>
433+
<plugin>
434+
<artifactId>maven-compiler-plugin</artifactId>
435+
<configuration>
436+
<compilerArgs combine.children="append">
437+
<arg>
438+
-Xplugin:ErrorProne
439+
-Xep:AlmostJavadoc:OFF
440+
-Xep:MissingSummary:OFF
441+
-Xep:LongDoubleConversion:OFF
442+
-Xep:StringSplitter:OFF
443+
-XepExcludedPaths:(.*/generated/.*|.*/src/test/java/.*|.*/examples/.*|.*/integration-tests/.*)
444+
-XepOpt:NullAway:AnnotatedPackages=io.prometheus.metrics
445+
</arg>
446+
</compilerArgs>
447+
<annotationProcessorPaths>
448+
<path>
449+
<groupId>com.google.errorprone</groupId>
450+
<artifactId>error_prone_core</artifactId>
451+
<version>2.46.0</version>
452+
</path>
453+
<path>
454+
<groupId>com.uber.nullaway</groupId>
455+
<artifactId>nullaway</artifactId>
456+
<version>0.12.15</version>
457+
</path>
458+
</annotationProcessorPaths>
459+
</configuration>
460+
</plugin>
461+
</plugins>
462+
</build>
463+
</profile>
452464
<profile>
453465
<id>release</id>
454466
<build>

0 commit comments

Comments
 (0)