Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,29 @@ allprojects {
version = "${opensearch_build}"
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_21

configurations {
agent
}

dependencies {
}
Comment on lines +104 to +105
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this?


task prepareAgent(type: Copy) {
from(configurations.agent)
into "$buildDir/agent"
}

dependencies {
agent "org.opensearch:opensearch-agent-bootstrap:${opensearch_version}"
agent "org.opensearch:opensearch-agent:${opensearch_version}"
agent "net.bytebuddy:byte-buddy:${versions.bytebuddy}"
}

tasks.withType(Test) {
dependsOn prepareAgent
jvmArgs += ["-javaagent:" + project.layout.buildDirectory.file("agent/opensearch-agent-${opensearch_version}.jar").get()]
}
}

repositories {
Expand Down
Loading