|
62 | 62 | <mockito.version>5.23.0</mockito.version> |
63 | 63 | <byteBuddy.version>1.18.10</byteBuddy.version> |
64 | 64 |
|
65 | | - <!-- |
66 | | - Bundled Google fonts moved to the independently-versioned |
67 | | - io.github.demchaav:graph-compose-fonts artifact in v1.8.0 so an |
68 | | - engine upgrade never re-ships ~18 MB of fonts. The engine depends |
69 | | - on it at TEST scope only (the visual / snapshot suite renders with |
70 | | - the bundled families); it never propagates to consumers, who add |
71 | | - graph-compose-fonts (or graph-compose-bundle) themselves. Its |
72 | | - version is an independent line — do NOT fold it into the engine |
73 | | - lockstep `versions:set`. Keep in lockstep with the same property in |
74 | | - aggregator/pom.xml and bundle/pom.xml (no shared parent to |
75 | | - single-source it; VersionConsistencyGuardTest enforces agreement). |
76 | | - --> |
77 | | - <graphcompose.fonts.version>1.0.0</graphcompose.fonts.version> |
78 | | - |
79 | 65 | <!-- Build plugins --> |
80 | 66 | <central.publishing.plugin.version>0.10.0</central.publishing.plugin.version> |
81 | 67 | <maven.compiler.plugin.version>3.15.0</maven.compiler.plugin.version> |
|
232 | 218 |
|
233 | 219 | <!-- Test dependencies --> |
234 | 220 | <!-- |
235 | | - The bundled Google font binaries (graph-compose-fonts) are no |
236 | | - longer part of the main artifact. The engine's visual / snapshot |
237 | | - suite still renders with them, so they are pulled at test scope. |
238 | | - Test scope is deliberate: it keeps fonts off the consumer-facing |
239 | | - classpath, so upgrading the engine never drags fonts along. |
| 221 | + The bundled Google fonts (graph-compose-fonts) are NOT a dependency |
| 222 | + of the engine — not even at test scope. The engine's visual / |
| 223 | + snapshot suite renders with them, but they are placed on the TEST |
| 224 | + classpath directly from the sibling module's source via the |
| 225 | + <testResources> entry in <build> below. This keeps the engine fully |
| 226 | + decoupled from the fonts ARTIFACT (no Maven coordinate to resolve, so |
| 227 | + an engine-only build never needs the fonts jar published or installed |
| 228 | + first), while still exercising the real font binaries. |
240 | 229 | --> |
241 | | - <dependency> |
242 | | - <groupId>io.github.demchaav</groupId> |
243 | | - <artifactId>graph-compose-fonts</artifactId> |
244 | | - <version>${graphcompose.fonts.version}</version> |
245 | | - <scope>test</scope> |
246 | | - </dependency> |
247 | | - |
248 | 230 | <dependency> |
249 | 231 | <groupId>ch.qos.logback</groupId> |
250 | 232 | <artifactId>logback-classic</artifactId> |
|
311 | 293 | </dependencies> |
312 | 294 |
|
313 | 295 | <build> |
| 296 | + <testResources> |
| 297 | + <!-- Default test resources. --> |
| 298 | + <testResource> |
| 299 | + <directory>src/test/resources</directory> |
| 300 | + </testResource> |
| 301 | + <!-- |
| 302 | + Bundled Google fonts live in the sibling graph-compose-fonts |
| 303 | + module since v1.8.0. The engine's visual / snapshot suite renders |
| 304 | + with them, so put that module's resources on the TEST classpath |
| 305 | + directly from source. This decouples the engine build from the |
| 306 | + fonts ARTIFACT (no Maven dependency to resolve, so no CI/local |
| 307 | + bootstrap is needed) while still exercising the real binaries. |
| 308 | + Test-only: it never reaches the main jar (built from |
| 309 | + src/main/resources) and is excluded from the tests-jar below. |
| 310 | + --> |
| 311 | + <testResource> |
| 312 | + <directory>${project.basedir}/fonts/src/main/resources</directory> |
| 313 | + </testResource> |
| 314 | + </testResources> |
| 315 | + |
314 | 316 | <!-- |
315 | 317 | Pin the default-lifecycle plugins (clean / install / site / |
316 | 318 | resources / deploy) so requirePluginVersions in the enforcer |
|
445 | 447 | <goals> |
446 | 448 | <goal>test-jar</goal> |
447 | 449 | </goals> |
| 450 | + <configuration> |
| 451 | + <!-- |
| 452 | + The bundled fonts are on the test classpath via |
| 453 | + <testResources> for the engine's own suite; keep |
| 454 | + them OUT of the tests-jar. The benchmarks module |
| 455 | + (the only consumer of this jar) gets fonts from |
| 456 | + the graph-compose-fonts artifact instead. |
| 457 | + --> |
| 458 | + <excludes> |
| 459 | + <exclude>fonts/**</exclude> |
| 460 | + </excludes> |
| 461 | + </configuration> |
448 | 462 | </execution> |
449 | 463 | </executions> |
450 | 464 | </plugin> |
|
0 commit comments