@@ -21,24 +21,6 @@ import org.opensearch.gradle.test.RestIntegTestTask
2121import org.opensearch.gradle.testclusters.OpenSearchCluster
2222import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask
2323
24- buildscript {
25- ext {
26- opensearch_group = " org.opensearch"
27- opensearch_version = System . getProperty(" opensearch.version" , " 3.1.0-SNAPSHOT" )
28- isSnapshot = " true" == System . getProperty(" build.snapshot" , " true" )
29- buildVersionQualifier = System . getProperty(" build.version_qualifier" , " " )
30- kotlin_version = System . getProperty(" kotlin.version" , " 1.9.25" )
31- version_tokens = opensearch_version. tokenize(' -' )
32- opensearch_build = version_tokens[0 ] + ' .0'
33- if (buildVersionQualifier) {
34- opensearch_build + = " -${ buildVersionQualifier} "
35- }
36- if (isSnapshot) {
37- opensearch_build + = " -SNAPSHOT"
38- }
39- }
40- }
41-
4224apply plugin : ' java'
4325apply plugin : ' idea'
4426apply plugin : ' org.jetbrains.kotlin.jvm'
@@ -99,7 +81,6 @@ publishing {
9981 }
10082
10183 repositories {
102- mavenLocal()
10384 maven {
10485 name = " Snapshots"
10586 url = " https://aws.oss.sonatype.org/content/repositories/snapshots"
@@ -165,18 +146,6 @@ def bwcVersion = bwcVersionShort + ".0"
165146def bwcOpenSearchVersion = bwcVersionShort + " -SNAPSHOT"
166147def bwcPluginVersion = bwcVersion + " -SNAPSHOT"
167148
168- def sqlJarDirectory = " $buildDir /dependencies/opensearch-sql-plugin"
169-
170- task addJarsToClasspath (type : Copy ) {
171- from(fileTree(dir : sqlJarDirectory)) {
172- include " opensearch-sql-${ opensearch_build} .jar"
173- include " ppl-${ opensearch_build} .jar"
174- include " protocol-${ opensearch_build} .jar"
175- include " core-${ opensearch_build} .jar"
176- }
177- into(" $buildDir /classes" )
178- }
179-
180149dependencies {
181150 // Needed for integ tests
182151 zipArchive group : ' org.opensearch.plugin' , name :' opensearch-notifications-core' , version : " ${ opensearch_build} "
@@ -200,10 +169,8 @@ dependencies {
200169
201170 // SQL/PPL plugin dependencies
202171 implementation ' org.json:json:20240303'
203- // implementation fileTree(dir: sqlJarDirectory, include: ["opensearch-sql-thin-${opensearch_build}.jar", "ppl-${opensearch_build}.jar", "protocol-${opensearch_build}.jar", "core-${opensearch_build}.jar"])
204- // zipArchive group: 'org.opensearch.plugin', name:'opensearch-sql-plugin', version: "${opensearch_build}"
205-
206172 api project(" :alerting-core" )
173+
207174 implementation " com.github.seancfoley:ipaddress:5.4.1"
208175 implementation project(path : " :alerting-spi" , configuration : ' shadow' )
209176
@@ -216,29 +183,6 @@ dependencies {
216183 testImplementation " org.opensearch.plugin:lang-mustache-client:${ opensearch_version} "
217184}
218185
219- task extractSqlJar (type : Copy ) {
220- mustRunAfter()
221- from(zipTree(configurations. zipArchive. find { it. name. startsWith(" opensearch-sql-plugin" ) }))
222- into sqlJarDirectory
223- }
224-
225- task extractSqlClass (type : Copy , dependsOn : [extractSqlJar]) {
226- from zipTree(" ${ sqlJarDirectory} /opensearch-sql-${ opensearch_build} .jar" )
227- into(" $buildDir /opensearch-sql" )
228- include ' org/opensearch/sql/**'
229- }
230-
231- task replaceSqlJar (type : Jar , dependsOn : [extractSqlClass]) {
232- from(" $buildDir /opensearch-sql" )
233- archiveFileName = " opensearch-sql-thin-${ opensearch_build} .jar"
234- destinationDirectory = file(sqlJarDirectory)
235- doLast {
236- file(" ${ sqlJarDirectory} /opensearch-sql-${ opensearch_build} .jar" ). delete()
237- }
238- }
239-
240- tasks. addJarsToClasspath. dependsOn(replaceSqlJar)
241-
242186javadoc. enabled = false // turn off javadoc as it barfs on Kotlin code
243187licenseHeaders. enabled = true
244188dependencyLicenses. enabled = false
@@ -570,6 +514,8 @@ task bwcTestSuite(type: StandaloneRestIntegTestTask) {
570514
571515run {
572516 doFirst {
517+ dependsOn addJarsToClasspath
518+
573519 // There seems to be an issue when running multi node run or integ tasks with unicast_hosts
574520 // not being written, the waitForAllConditions ensures it's written
575521 getClusters(). forEach { cluster ->
@@ -714,11 +660,3 @@ def waitForClusterSetup(OpenSearchCluster cluster, Boolean securityEnabled) {
714660}
715661
716662apply from : ' ../build-tools/pkgbuild.gradle'
717-
718- // compileJava {
719- // dependsOn addJarsToClasspath
720- // }
721- //
722- // compileKotlin {
723- // dependsOn addJarsToClasspath
724- // }
0 commit comments