Skip to content

Commit 83659e3

Browse files
authored
Using java-agent gradle plugin to phase off Security Manager in favor of Java-agent. (#815)
* Revert "Support phasing off SecurityManager usage in favor of Java Agent (#814)" This reverts commit 25e52af. Signed-off-by: Pranav Reddy <[email protected]> * Using java-agent gradle plugin to phase of Security Manager in favour of java-agent Signed-off-by: Pranav Reddy <[email protected]> --------- Signed-off-by: Pranav Reddy <[email protected]>
1 parent 25e52af commit 83659e3

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

build.gradle

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ apply plugin: 'org.jetbrains.kotlin.jvm'
6464
apply plugin: 'org.jetbrains.kotlin.plugin.allopen'
6565
apply plugin: 'opensearch.repositories'
6666
apply from: 'build-tools/opensearchplugin-coverage.gradle'
67+
apply plugin: 'opensearch.java-agent'
6768

6869
configurations {
6970
ktlint {
@@ -72,7 +73,6 @@ configurations {
7273
force "ch.qos.logback:logback-core:1.5.16"
7374
}
7475
}
75-
agent
7676
}
7777

7878
dependencies {
@@ -92,10 +92,6 @@ dependencies {
9292
testImplementation "commons-validator:commons-validator:1.7"
9393
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
9494

95-
agent "org.opensearch:opensearch-agent-bootstrap:${opensearch_version}"
96-
agent "org.opensearch:opensearch-agent:${opensearch_version}"
97-
agent "net.bytebuddy:byte-buddy:1.17.5"
98-
9995
ktlint "com.pinterest:ktlint:0.47.1"
10096
}
10197

@@ -237,13 +233,3 @@ task updateVersion {
237233
ant.replaceregexp(file:'build.gradle', match: '"opensearch.version", "\\d.*"', replace: '"opensearch.version", "' + newVersion.tokenize('-')[0] + '-SNAPSHOT"', flags:'g', byline:true)
238234
}
239235
}
240-
241-
task prepareAgent(type: Copy) {
242-
from(configurations.agent)
243-
into "$buildDir/agent"
244-
}
245-
246-
tasks.withType(Test) {
247-
dependsOn prepareAgent
248-
jvmArgs += ["-javaagent:" + project.layout.buildDirectory.file("agent/opensearch-agent-${opensearch_version}.jar").get()]
249-
}

0 commit comments

Comments
 (0)