Refactor javaagent build - #3682
Conversation
fa15b96 to
aeef142
Compare
aeef142 to
fa7a959
Compare
| configurations = listOf(bootstrapLibs) | ||
|
|
||
| dependsOn(relocateJavaagentLibs) | ||
| isolateClasses(relocateJavaagentLibs.get().outputs.files) |
There was a problem hiding this comment.
Can we just pass configuration here? Without the intermediate shadow task.
There was a problem hiding this comment.
Unfortunately not: the intermediate shadow task does the relocation, if we were to pass the configuration here we'd get not relocated files (because that'd be a separate CopySpec that does not share the relocation settings of the main shadow jar task).
| javaagentDependencies.run { | ||
| add(bootstrapLibs.name, project(subProj.path)) | ||
| } | ||
| plugins.withId("otel.javaagent-bootstrap") { |
| javaagentLibs(project(":testing:agent-exporter")) | ||
| javaagentLibs(project(":javaagent-extension-api")) | ||
| javaagentLibs(project(":javaagent-tooling")) | ||
| javaagentLibs(project(":muzzle")) |
There was a problem hiding this comment.
just curious why this needed here now?
There was a problem hiding this comment.
Hm, mostly for visibility/being super-explicit I guess. It's transitively included by javaagent-tooling so it would work even without that, but I wanted to explicitly include all our top-level agent modules just for readability I guess
Depends on #3604
This PR removes shadowing from
:instrumentationand:javaagent-exportersand moves all the build logic to the:javaagentproject.