From 8fb169e934634d98161963c4d0980ea19b9e06a1 Mon Sep 17 00:00:00 2001 From: jack-berg <34418638+jack-berg@users.noreply.github.com> Date: Wed, 11 Sep 2024 09:16:58 -0500 Subject: [PATCH] Codify stance against using java-test-fixtures plugin (#6696) --- CONTRIBUTING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c6c78a7362..5c02e405c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -146,6 +146,13 @@ uses [google-java-format](https://github.com/google/google-java-format) library: 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 consider a pull request to add it.