Codify stance against using java-test-fixtures plugin (#6696)

This commit is contained in:
jack-berg 2024-09-11 09:16:58 -05:00 committed by GitHub
parent 0feca55ee2
commit 8fb169e934
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -146,6 +146,13 @@ uses [google-java-format](https://github.com/google/google-java-format) library:
synchronized (lock) { ... } synchronized (lock) { ... }
} }
``` ```
* Don't
use [gradle test fixtures](https://docs.gradle.org/current/userguide/java_testing.html#sec:java_test_fixtures) (
i.e. `java-test-fixtures` plugin) to reuse code for internal testing. The test fixtures plugin has
side effects where test dependencies are added to the `pom.xml` and publishes an
extra `*-test-fixtures.jar` artifact which is unnecessary for internal testing. Instead, create a
new `*:testing-internal` module and omit the `otel.java-conventions`. For example,
see [/exporters/otlp/testing-internal](./exporters/otlp/testing-internal).
If you notice any practice being applied in the project consistently that isn't listed here, please If you notice any practice being applied in the project consistently that isn't listed here, please
consider a pull request to add it. consider a pull request to add it.