Skip to content

Commit 702b719

Browse files
authored
Fix build due to phasing off SecurityManager usage in favor of Java Agent (#796)
Signed-off-by: Pranav Reddy <pranavrd@amazon.com>
1 parent 79b8166 commit 702b719

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

build.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,26 @@ ext {
9393
allprojects {
9494
group = "org.opensearch"
9595
version = opensearch_build
96+
97+
configurations {
98+
agent
99+
}
100+
101+
task prepareAgent(type: Copy) {
102+
from(configurations.agent)
103+
into "$buildDir/agent"
104+
}
105+
106+
dependencies {
107+
agent "org.opensearch:opensearch-agent-bootstrap:${opensearch_version}"
108+
agent "org.opensearch:opensearch-agent:${opensearch_version}"
109+
agent "net.bytebuddy:byte-buddy:1.17.5"
110+
}
111+
112+
tasks.withType(Test) {
113+
dependsOn prepareAgent
114+
jvmArgs += ["-javaagent:" + project.layout.buildDirectory.file("agent/opensearch-agent-${opensearch_version}.jar").get()]
115+
}
96116
}
97117

98118
apply plugin: 'opensearch.opensearchplugin'

0 commit comments

Comments
 (0)