Skip to content

Commit

Permalink
Fix local debugger issue
Browse files Browse the repository at this point in the history
Signed-off-by: Manasvini B S <manasvis@amazon.com>
  • Loading branch information
manasvinibs committed Sep 13, 2024
1 parent 1915298 commit ae80476
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import java.util.concurrent.Callable

/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
Expand Down Expand Up @@ -114,6 +116,11 @@ configurations.all {
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10"
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10"
}

configurations {
zipArchive
}

compileJava {
options.compilerArgs.addAll(["-processor", 'lombok.launch.AnnotationProcessorHider$AnnotationProcessor'])
}
Expand Down Expand Up @@ -162,6 +169,8 @@ dependencies {
testImplementation group: 'org.mockito', name: 'mockito-core', version: "${versions.mockito}"
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: "${versions.mockito}"
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3'

zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}"
}

test {
Expand Down Expand Up @@ -276,7 +285,24 @@ afterEvaluate {
}
}

def getJobSchedulerPlugin() {
provider(new Callable<RegularFile>() {
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return configurations.zipArchive.asFileTree.matching {
include '**/opensearch-job-scheduler*'
}.singleFile
}
}
}
})
}

testClusters.integTest {
plugin(getJobSchedulerPlugin())
plugin(project.tasks.bundlePlugin.archiveFile)
testDistribution = "ARCHIVE"

Expand All @@ -291,5 +317,4 @@ testClusters.integTest {

run {
useCluster testClusters.integTest
}

}

0 comments on commit ae80476

Please sign in to comment.