Skip to content

Commit 5d7af4c

Browse files
Add java agent plugin (#237)
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
1 parent c1e92c6 commit 5d7af4c

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

build.gradle

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ apply plugin: 'opensearch.opensearchplugin'
5858
apply plugin: 'opensearch.internal-cluster-test'
5959
apply plugin: 'opensearch.pluginzip'
6060
apply plugin: 'opensearch.rest-test'
61+
apply plugin: 'opensearch.java-agent'
6162
apply from: 'gradle/formatting.gradle'
6263

6364
repositories {
@@ -91,17 +92,9 @@ opensearchplugin {
9192
noticeFile rootProject.file('NOTICE')
9293
}
9394

94-
configurations {
95-
agent
96-
}
97-
9895
dependencies {
9996
api "com.github.luben:zstd-jni:1.5.6-1"
10097
api "com.intel.qat:qat-java:1.1.1"
101-
102-
agent "org.opensearch:opensearch-agent-bootstrap:${opensearch_version}"
103-
agent "org.opensearch:opensearch-agent:${opensearch_version}"
104-
agent "net.bytebuddy:byte-buddy:${versions.bytebuddy}"
10598
}
10699

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

0 commit comments

Comments
 (0)