Skip to content

Refactor javaagent build - #3682

Merged
trask merged 1 commit into
open-telemetry:mainfrom
mateuszrzeszutek:refactor-javaagent-build
Jul 29, 2021
Merged

Refactor javaagent build#3682
trask merged 1 commit into
open-telemetry:mainfrom
mateuszrzeszutek:refactor-javaagent-build

Conversation

@mateuszrzeszutek

Copy link
Copy Markdown
Member

Depends on #3604

This PR removes shadowing from :instrumentation and :javaagent-exporters and moves all the build logic to the :javaagent project.

@mateuszrzeszutek
mateuszrzeszutek force-pushed the refactor-javaagent-build branch from fa15b96 to aeef142 Compare July 27, 2021 12:50
@mateuszrzeszutek
mateuszrzeszutek force-pushed the refactor-javaagent-build branch from aeef142 to fa7a959 Compare July 28, 2021 08:38
@mateuszrzeszutek
mateuszrzeszutek marked this pull request as ready for review July 28, 2021 08:38
configurations = listOf(bootstrapLibs)

dependsOn(relocateJavaagentLibs)
isolateClasses(relocateJavaagentLibs.get().outputs.files)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just pass configuration here? Without the intermediate shadow task.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@trask trask left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 👍

javaagentDependencies.run {
add(bootstrapLibs.name, project(subProj.path))
}
plugins.withId("otel.javaagent-bootstrap") {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

javaagentLibs(project(":testing:agent-exporter"))
javaagentLibs(project(":javaagent-extension-api"))
javaagentLibs(project(":javaagent-tooling"))
javaagentLibs(project(":muzzle"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious why this needed here now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@trask
trask merged commit e5ddbfe into open-telemetry:main Jul 29, 2021
@mateuszrzeszutek
mateuszrzeszutek deleted the refactor-javaagent-build branch July 29, 2021 15:37
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.

4 participants