Apply Java convention from remaining projects - #12331
Conversation
Keep shared Kotlin and default Groovy test wiring behind plugin callbacks.
Cover JVM test suites and test fixtures through Gradle source-set APIs.
|
🎯 Code Coverage (details) 🔗 Commit SHA: 65c0c56 | Docs | View more details | Give us feedback! |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
b424a9d to
65c0c56
Compare
|
|
||
| plugins { | ||
| id 'com.gradleup.shadow' | ||
| id 'dd-trace-java.conventions.java' |
There was a problem hiding this comment.
note: The java convention for this module might be too large, but this follows what's existing today.
In the future, a proper convention should be created dd-trace-java.module.distributable.agent for agent jar, this might help to have multiple kind of agent jar distribution (modularization).
The following aspects appears to be needed
- java-base
- java-compilation (to support Java 6 (Pre Java 8) graceful degradation)
- archives / Shadow behavior
- javadoc
- code-quality
- testing
- publishing and dependency locking
Some other "features" may not be needed.
There was a problem hiding this comment.
More details
The convention plugins preserve the prior Java, Kotlin, Groovy, test suite, and test fixture setup. The Spotless exception stays limited to the publish script in dd-java-agent.
🤖 Datadog Autotest · Commit 65c0c56 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
What Does This Do
Apply
dd-trace-java.conventions.javafrom the remaining projects that directly appliedgradle/java.gradle.Make the Java and Shadow plugins explicit in the benchmark integration child projects, and update the Spotless guard so direct Java script applications are forbidden everywhere.
Motivation
Continue the incremental APMLP-610 script-plugin migration through project-facing convention plugins.
See #12258.
Additional Notes
The Java convention still delegates to
gradle/java.gradle; moving that implementation into build logic remains separate follow-up work.dd-java-agentretains a publish-only Spotless exception because migratinggradle/publish.gradleis outside this change.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue