File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,26 @@ allprojects {
138138 targetCompatibility = JavaVersion . VERSION_21
139139 sourceCompatibility = JavaVersion . VERSION_21
140140 }
141+
142+ configurations {
143+ agent
144+ }
145+
146+ task prepareAgent(type : Copy ) {
147+ from(configurations. agent)
148+ into " $buildDir /agent"
149+ }
150+
151+ dependencies {
152+ agent " org.opensearch:opensearch-agent-bootstrap:${ opensearch_version} "
153+ agent " org.opensearch:opensearch-agent:${ opensearch_version} "
154+ agent " net.bytebuddy:byte-buddy:${ versions.bytebuddy} "
155+ }
156+
157+ tasks. withType(Test ) {
158+ dependsOn prepareAgent
159+ jvmArgs + = [" -javaagent:" + project. layout. buildDirectory. file(" agent/opensearch-agent-${ opensearch_version} .jar" ). get()]
160+ }
141161}
142162
143163publishing {
You can’t perform that action at this time.
0 commit comments