Skip to content

Commit d58ac1e

Browse files
authored
Fix build due to phasing off SecurityManager usage in favor of Java Agent (#1404)
Signed-off-by: Pranav Reddy <[email protected]>
1 parent 226e66d commit d58ac1e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

build.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,29 @@ ext {
208208
allprojects {
209209
group = "org.opensearch"
210210
version = "${opensearch_build}"
211+
212+
configurations {
213+
agent
214+
}
215+
216+
dependencies {
217+
}
218+
219+
task prepareAgent(type: Copy) {
220+
from(configurations.agent)
221+
into "$buildDir/agent"
222+
}
223+
224+
dependencies {
225+
agent "org.opensearch:opensearch-agent-bootstrap:${opensearch_version}"
226+
agent "org.opensearch:opensearch-agent:${opensearch_version}"
227+
agent "net.bytebuddy:byte-buddy:${versions.bytebuddy}"
228+
}
229+
230+
tasks.withType(Test) {
231+
dependsOn prepareAgent
232+
jvmArgs += ["-javaagent:" + project.layout.buildDirectory.file("agent/opensearch-agent-${opensearch_version}.jar").get()]
233+
}
211234
}
212235

213236
configurations {

0 commit comments

Comments
 (0)