|
53 | 53 | <logback.version>1.5.32</logback.version> |
54 | 54 | <jetbrains-annotations.version>26.1.0</jetbrains-annotations.version> |
55 | 55 | <testcontainers.version>2.0.3</testcontainers.version> |
| 56 | + |
| 57 | + <!-- Versions with JDK-specific overrides in profiles below --> |
| 58 | + <junit-bom.version>5.13.0</junit-bom.version> |
| 59 | + <errorprone.version>2.31.0</errorprone.version> |
| 60 | + <nullaway.version>0.12.6</nullaway.version> |
56 | 61 | </properties> |
57 | 62 |
|
58 | 63 | <developers> |
|
102 | 107 | <dependency> |
103 | 108 | <groupId>org.junit</groupId> |
104 | 109 | <artifactId>junit-bom</artifactId> |
105 | | - <version>5.13.0</version> |
| 110 | + <version>${junit-bom.version}</version> |
106 | 111 | <type>pom</type> |
107 | 112 | <scope>import</scope> |
108 | 113 | </dependency> |
|
325 | 330 | <path> |
326 | 331 | <groupId>com.google.errorprone</groupId> |
327 | 332 | <artifactId>error_prone_core</artifactId> |
328 | | - <version>2.31.0</version> |
| 333 | + <version>${errorprone.version}</version> |
329 | 334 | </path> |
330 | 335 | <path> |
331 | 336 | <groupId>com.uber.nullaway</groupId> |
332 | 337 | <artifactId>nullaway</artifactId> |
333 | | - <version>0.12.6</version> |
| 338 | + <version>${nullaway.version}</version> |
334 | 339 | </path> |
335 | | - <!-- Other annotation processors go here --> |
336 | 340 | </annotationProcessorPaths> |
337 | 341 | </configuration> |
338 | 342 | </plugin> |
|
482 | 486 | </build> |
483 | 487 |
|
484 | 488 | <profiles> |
| 489 | + <!-- JDK 17+: use JUnit 6 (requires JDK 17+) --> |
| 490 | + <profile> |
| 491 | + <id>jdk17+</id> |
| 492 | + <activation> |
| 493 | + <jdk>[17,)</jdk> |
| 494 | + </activation> |
| 495 | + <properties> |
| 496 | + <junit-bom.version>6.0.3</junit-bom.version> |
| 497 | + </properties> |
| 498 | + </profile> |
| 499 | + |
| 500 | + <!-- JDK 21+: use Error Prone 2.48.0 and NullAway 0.13.1 (require JDK 21+) --> |
485 | 501 | <profile> |
486 | | - <id>errorprone-jdk25</id> |
| 502 | + <id>jdk21+</id> |
487 | 503 | <activation> |
488 | | - <jdk>[25,)</jdk> |
| 504 | + <jdk>[21,)</jdk> |
489 | 505 | </activation> |
| 506 | + <properties> |
| 507 | + <errorprone.version>2.48.0</errorprone.version> |
| 508 | + <nullaway.version>0.13.1</nullaway.version> |
| 509 | + </properties> |
490 | 510 | <build> |
491 | 511 | <plugins> |
492 | 512 | <plugin> |
|
495 | 515 | <configuration> |
496 | 516 | <compilerArgs combine.children="append"> |
497 | 517 | <arg>--should-stop=ifError=FLOW</arg> |
| 518 | + <arg>-XDaddTypeAnnotationsToSymbol=true</arg> |
498 | 519 | </compilerArgs> |
499 | | - <annotationProcessorPaths combine.self="override"> |
500 | | - <path> |
501 | | - <groupId>com.google.errorprone</groupId> |
502 | | - <artifactId>error_prone_core</artifactId> |
503 | | - <version>2.48.0</version> |
504 | | - </path> |
505 | | - <path> |
506 | | - <groupId>com.uber.nullaway</groupId> |
507 | | - <artifactId>nullaway</artifactId> |
508 | | - <version>0.13.1</version> |
509 | | - </path> |
510 | | - </annotationProcessorPaths> |
511 | 520 | </configuration> |
512 | 521 | </plugin> |
513 | 522 | </plugins> |
|
0 commit comments