Skip to content

Commit

Permalink
fix: build against jvm21
Browse files Browse the repository at this point in the history
- fix: build against embedded jdk sources needs `--enable-preview`
  when built against jvm21

- fix: add `-Djava.security.manager=allow` to fix security manager
  tests under modern java

Fixes and closes google#7065

Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Mar 11, 2024
1 parent 8a7df43 commit 0f80174
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,19 @@
<maven-javadoc-plugin.additionalJOptions>--no-module-directories</maven-javadoc-plugin.additionalJOptions>
</properties>
</profile>
<profile>
<!--
In order to build against JDK 19+, Javadoc needs to enable Java preview features, because JDK sources
themselves have code which defines/uses preview features.
-->
<id>javadocs-jdk19plus</id>
<activation>
<jdk>[19,]</jdk>
</activation>
<properties>
<maven-javadoc-plugin.additionalJOptions>--enable-preview</maven-javadoc-plugin.additionalJOptions>
</properties>
</profile>
<profile>
<id>open-jre-modules</id>
<activation>
Expand Down
1 change: 1 addition & 0 deletions guava/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
<link>https://errorprone.info/api/latest/</link>
</links>
<overview>../overview.html</overview>
<additionalJOption>${maven-javadoc-plugin.additionalJOptions}</additionalJOption>
</configuration>
</plugin>
<plugin>
Expand Down
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,19 @@
<maven-javadoc-plugin.additionalJOptions>--no-module-directories</maven-javadoc-plugin.additionalJOptions>
</properties>
</profile>
<profile>
<!--
In order to build against JDK 19+, Javadoc needs to enable Java preview features, because JDK sources
themselves have code which defines/uses preview features.
-->
<id>javadocs-jdk19plus</id>
<activation>
<jdk>[19,]</jdk>
</activation>
<properties>
<maven-javadoc-plugin.additionalJOptions>--enable-preview</maven-javadoc-plugin.additionalJOptions>
</properties>
</profile>
<profile>
<id>open-jre-modules</id>
<activation>
Expand Down

0 comments on commit 0f80174

Please sign in to comment.