Commit 73d0d37
authored
Fixed: remove generateSecretKeys dependency from test to improve build caching
The `test` task depends on `generateSecretKeys`, which writes new random
values to `framework/security/config/security.properties` on every
build. Since this file is part of the main resource source set
(`config/` dirs are included via
`getDirectoryInActiveComponentsIfExists('config')`), changing it causes
cascading Gradle build cache misses for:
- `:compileTestGroovy` — classpath includes main resources
- `:checkstyleMain` — classpath includes `sourceSets.main.output`
- `:checkstyleTest` — same reason
- `:test` — classpath + test classes differ
This commit:
1. Removes `dependsOn 'generateSecretKeys'` from the `test` task —
the main `security.properties` is no longer mutated during `build`
2. Adds a test-specific `security.properties` in
`framework/security/src/test/resources/` with fixed keys — this shadows
the main config on the test classpath so unit tests that require JWT
keys (e.g. `ModelFormTest`) continue to work
The `generateSecretKeys` task is unchanged and remains available for
manual use (`./gradlew generateSecretKeys`) and as a dependency of
`loadAll`.1 parent 5a6790b commit 73d0d37
2 files changed
Lines changed: 48 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
378 | 377 | | |
379 | | - | |
380 | 378 | | |
381 | 379 | | |
382 | 380 | | |
| |||
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
0 commit comments