Skip to content

Commit 3db32f8

Browse files
committed
chore: Move errorprone to a profile
1 parent 2ef7058 commit 3db32f8

2 files changed

Lines changed: 46 additions & 32 deletions

File tree

.github/workflows/dashboard.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/setup-java@v5
1313
with:
1414
distribution: temurin
15-
java-version: 8
15+
java-version: 25
1616
cache: maven
1717
- run: java -version
1818
- run: .kokoro/dashboard.sh

dashboard/pom.xml

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,51 @@
123123
</dependency>
124124
</dependencies>
125125

126+
<profiles>
127+
<profile>
128+
<id>error-prone</id>
129+
<activation>
130+
<!-- errorprone requires >= jdk17 -->
131+
<jdk>[17,)</jdk>
132+
</activation>
133+
<build>
134+
<plugins>
135+
<plugin>
136+
<groupId>org.apache.maven.plugins</groupId>
137+
<artifactId>maven-compiler-plugin</artifactId>
138+
<configuration>
139+
<fork>true</fork>
140+
<source>8</source>
141+
<target>8</target>
142+
<compilerArgs>
143+
<arg>-XDcompilePolicy=simple</arg>
144+
<arg>--should-stop=ifError=FLOW</arg>
145+
<arg>-Xplugin:ErrorProne</arg>
146+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
147+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
148+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
149+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
150+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
151+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
152+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
153+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
154+
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
155+
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
156+
</compilerArgs>
157+
<annotationProcessorPaths>
158+
<path>
159+
<groupId>com.google.errorprone</groupId>
160+
<artifactId>error_prone_core</artifactId>
161+
<version>${error-prone.version}</version>
162+
</path>
163+
</annotationProcessorPaths>
164+
</configuration>
165+
</plugin>
166+
</plugins>
167+
</build>
168+
</profile>
169+
</profiles>
170+
126171
<build>
127172
<plugins>
128173
<plugin>
@@ -133,37 +178,6 @@
133178
<mainClass>com.google.cloud.tools.opensource.cloudbomdashboard.DashboardMain</mainClass>
134179
</configuration>
135180
</plugin>
136-
<plugin>
137-
<groupId>org.apache.maven.plugins</groupId>
138-
<artifactId>maven-compiler-plugin</artifactId>
139-
<configuration>
140-
<fork>true</fork>
141-
<source>8</source>
142-
<target>8</target>
143-
<compilerArgs>
144-
<arg>-XDcompilePolicy=simple</arg>
145-
<arg>--should-stop=ifError=FLOW</arg>
146-
<arg>-Xplugin:ErrorProne</arg>
147-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
148-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
149-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
150-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
151-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
152-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
153-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
154-
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
155-
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
156-
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
157-
</compilerArgs>
158-
<annotationProcessorPaths>
159-
<path>
160-
<groupId>com.google.errorprone</groupId>
161-
<artifactId>error_prone_core</artifactId>
162-
<version>${error-prone.version}</version>
163-
</path>
164-
</annotationProcessorPaths>
165-
</configuration>
166-
</plugin>
167181
</plugins>
168182
<resources>
169183
<resource>

0 commit comments

Comments
 (0)