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 @@ -179,6 +179,26 @@ allprojects {
179179 plugins. withId(' java' ) {
180180 sourceCompatibility = targetCompatibility = " 21"
181181 }
182+
183+ configurations {
184+ agent
185+ }
186+
187+ task prepareAgent(type : Copy ) {
188+ from(configurations. agent)
189+ into " $buildDir /agent"
190+ }
191+
192+ dependencies {
193+ agent " org.opensearch:opensearch-agent-bootstrap:${ opensearch_version} "
194+ agent " org.opensearch:opensearch-agent:${ opensearch_version} "
195+ agent " net.bytebuddy:byte-buddy:${ versions.bytebuddy} "
196+ }
197+
198+ tasks. withType(Test ) {
199+ dependsOn prepareAgent
200+ jvmArgs + = [" -javaagent:" + project. layout. buildDirectory. file(" agent/opensearch-agent-${ opensearch_version} .jar" ). get()]
201+ }
182202}
183203
184204dependencies {
You can’t perform that action at this time.
0 commit comments