|
154 | 154 | <httpcore.version>4.4.16</httpcore.version>
|
155 | 155 | <jna.version>5.16.0</jna.version>
|
156 | 156 |
|
| 157 | + <!-- Add 'requires static' for annotation library dependencies (defined as <scope>provided</scope> in this file) |
| 158 | + to allow them to be visible at compile time to make the '-Xlint:classfile' check of javac pass. |
| 159 | + Overrides parent's 'bnd-jpms-module-info' and hence re-defines '$[bnd-module-name];access=0' --> |
| 160 | + <bnd-jpms-module-info>$[bnd-module-name];access=0;modules=" |
| 161 | + biz.aQute.bnd.annotation, |
| 162 | + com.google.errorprone.annotations, |
| 163 | + com.github.spotbugs.annotations, |
| 164 | + org.osgi.annotation.bundle |
| 165 | + "</bnd-jpms-module-info> |
157 | 166 | </properties>
|
158 | 167 |
|
159 | 168 | <dependencyManagement>
|
|
1088 | 1097 | </executions>
|
1089 | 1098 | </plugin>
|
1090 | 1099 |
|
| 1100 | + <!-- Add annotation library dependencies (defined as <scope>provided</scope> in this file) as compileOnlyApi |
| 1101 | + dependencies for Gradle consumers. This makes the Jars automatically available at compile time to make |
| 1102 | + the '-Xlint:classfile' check of javac pass.--> |
| 1103 | + <plugin> |
| 1104 | + <groupId>org.gradlex</groupId> |
| 1105 | + <artifactId>gradle-module-metadata-maven-plugin</artifactId> |
| 1106 | + <version>1.0</version> |
| 1107 | + <configuration> |
| 1108 | + <compileOnlyApiDependencies> |
| 1109 | + <dependency> |
| 1110 | + <groupId>org.jspecify</groupId> |
| 1111 | + <artifactId>jspecify</artifactId> |
| 1112 | + <version>${jspecify.version}</version> |
| 1113 | + </dependency> |
| 1114 | + <dependency> |
| 1115 | + <groupId>biz.aQute.bnd</groupId> |
| 1116 | + <artifactId>biz.aQute.bnd.annotation</artifactId> |
| 1117 | + <version>${bnd.annotation.version}</version> |
| 1118 | + </dependency> |
| 1119 | + <dependency> |
| 1120 | + <groupId>com.google.errorprone</groupId> |
| 1121 | + <artifactId>error_prone_annotations</artifactId> |
| 1122 | + <version>${error-prone.version}</version> |
| 1123 | + </dependency> |
| 1124 | + <dependency> |
| 1125 | + <groupId>org.osgi</groupId> |
| 1126 | + <!-- Note: 'org.osgi.annotation.bundle' and 'osgi.annotation' overlap. We do not want to add |
| 1127 | + both. As 'org.osgi.annotation.bundle' has an Automatic-Module-Name, it is preferred. --> |
| 1128 | + <artifactId>org.osgi.annotation.bundle</artifactId> |
| 1129 | + <version>${osgi.annotation.bundle.version}</version> |
| 1130 | + </dependency> |
| 1131 | + <dependency> |
| 1132 | + <groupId>com.github.spotbugs</groupId> |
| 1133 | + <artifactId>spotbugs-annotations</artifactId> |
| 1134 | + <version>${spotbugs-annotations.version}</version> |
| 1135 | + </dependency> |
| 1136 | + </compileOnlyApiDependencies> |
| 1137 | + </configuration> |
| 1138 | + <executions> |
| 1139 | + <execution> |
| 1140 | + <goals> |
| 1141 | + <goal>gmm</goal> |
| 1142 | + </goals> |
| 1143 | + </execution> |
| 1144 | + </executions> |
| 1145 | + </plugin> |
| 1146 | + |
1091 | 1147 | </plugins>
|
1092 | 1148 | </build>
|
1093 | 1149 |
|
|
0 commit comments