Skip to content

Commit a36dc82

Browse files
authored
Using java-agent gradle plugin to phase off Security Manager in favor of Java-agent. (#1406)
* Revert "Fix build due to phasing off SecurityManager usage in favor of Java Agent (#1404)" This reverts commit d58ac1e. Signed-off-by: Pranav Reddy <[email protected]> * Using java-agent gradle plugin to phase off Security Manager in favor of Java-agent. Signed-off-by: Pranav Reddy <[email protected]> --------- Signed-off-by: Pranav Reddy <[email protected]>
1 parent d58ac1e commit a36dc82

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

build.gradle

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ apply plugin: 'io.gitlab.arturbosch.detekt'
101101
apply plugin: 'org.jetbrains.kotlin.jvm'
102102
apply plugin: 'org.jetbrains.kotlin.plugin.allopen'
103103
apply plugin: 'opensearch.pluginzip'
104+
apply plugin: 'opensearch.java-agent'
104105

105106
configurations.all {
106107
if (it.state != Configuration.State.UNRESOLVED) return
@@ -208,29 +209,6 @@ ext {
208209
allprojects {
209210
group = "org.opensearch"
210211
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-
}
234212
}
235213

236214
configurations {

0 commit comments

Comments
 (0)