Skip to content

build: consume test dependencies through codegen-testing - #392

Merged
AndreasIgel merged 1 commit into
java-helpers:mainfrom
igel-devin-ai:devin/1794266528-test-deps-transitive
Nov 10, 2026
Merged

AndreasIgel merged 1 commit into
java-helpers:mainfrom
igel-devin-ai:devin/1794266528-test-deps-transitive

Conversation

@igel-devin-ai

Copy link
Copy Markdown
Contributor

Part of #375.

Summary

#375 asks that the testing project holds the needed test dependencies and that the other projects consume them transitively in test scope. codegen-testing already brings JUnit (api, params, engine) and compile-testing, but the consumers did not rely on it:

Module Before After
processor codegen-testing + own JUnit ×3 + own compile-testing codegen-testing
codegen-roaster codegen-testing + own JUnit ×3 codegen-testing
simple-processor own JUnit ×3 codegen-testing
codegen-core own JUnit ×3 unchanged

codegen-core keeps its own JUnit dependencies, because codegen-testing depends on codegen-core and Maven does not allow the cycle, not even in test scope.

The now unused version properties (junit-jupiter.version, google-compile-testing.version) are removed from the poms that no longer reference them, so the JUnit and compile-testing versions of these modules are maintained in codegen-testing/pom.xml only. In codegen-testing/pom.xml the dangling "Google Compile Testing" comment moves onto its dependency.

mvn clean install is green with the same test counts as before (568).

Written by Devin

codegen-testing already brings JUnit and compile-testing, but processor
and codegen-roaster declared them a second time and simple-processor did
not use codegen-testing at all. The three modules now get their test
dependencies transitively from codegen-testing in test scope, so the
versions are maintained in one place.

codegen-core keeps its own JUnit dependencies: codegen-testing depends
on codegen-core, so the other direction would be a cycle.
@AndreasIgel
AndreasIgel merged commit 5418896 into java-helpers:main Nov 10, 2026
3 checks passed
@devin-ai-integration
devin-ai-integration Bot deleted the devin/1794266528-test-deps-transitive branch November 22, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants