@@ -61,11 +61,10 @@ buildscript {
61
61
}
62
62
63
63
plugins {
64
- id ' nebula.ospackage' version " 8.3 .0" apply false
65
- id " com.diffplug.gradle. spotless" version " 3.26.1 "
64
+ id ' com.netflix. nebula.ospackage' version " 11.6 .0"
65
+ id " com.diffplug.spotless" version " 6.24.0 "
66
66
id ' java-library'
67
- // Gradle 7.6 support was added in test-retry 1.4.0.
68
- id ' org.gradle.test-retry' version ' 1.4.1'
67
+ id ' org.gradle.test-retry' version ' 1.5.7'
69
68
}
70
69
71
70
tasks. withType(JavaCompile ) {
@@ -119,11 +118,16 @@ allprojects {
119
118
120
119
version = " ${ opensearch_build} "
121
120
122
- plugins. withId(' java ' ) {
123
- sourceCompatibility = targetCompatibility = JavaVersion . VERSION_11
121
+ plugins. withId(' jacoco ' ) {
122
+ jacoco . toolVersion = ' 0.8.11 '
124
123
}
125
124
}
126
125
126
+ java {
127
+ targetCompatibility = JavaVersion . VERSION_11
128
+ sourceCompatibility = JavaVersion . VERSION_11
129
+ }
130
+
127
131
ext {
128
132
projectSubstitutions = [:]
129
133
licenseFile = rootProject. file(' LICENSE.txt' )
@@ -146,10 +150,10 @@ configurations.all {
146
150
force " org.apache.httpcomponents:httpcore:${ versions.httpcore} "
147
151
force " commons-codec:commons-codec:${ versions.commonscodec} "
148
152
149
- force " org.mockito:mockito-core:2.25 .0"
150
- force " org.objenesis:objenesis:3.0.1 "
151
- force " net.bytebuddy:byte-buddy:1.9.15 "
152
- force " net.bytebuddy:byte-buddy-agent:1.9.15 "
153
+ force " org.mockito:mockito-core:5.9 .0"
154
+ force " org.objenesis:objenesis:3.3 "
155
+ force " net.bytebuddy:byte-buddy:1.14.9 "
156
+ force " net.bytebuddy:byte-buddy-agent:1.14.9 "
153
157
force " com.google.code.gson:gson:2.8.9"
154
158
force " junit:junit:4.13.2"
155
159
}
@@ -727,8 +731,8 @@ jacocoTestCoverageVerification {
727
731
728
732
jacocoTestReport {
729
733
reports {
730
- xml. enabled = true
731
- html. enabled = true
734
+ xml. required = true
735
+ html. required = true
732
736
}
733
737
}
734
738
@@ -755,8 +759,8 @@ dependencies {
755
759
implementation ' software.amazon.randomcutforest:randomcutforest-core:3.8.0'
756
760
757
761
// force Jackson version to avoid version conflict issue
758
- implementation " com.fasterxml.jackson.core:jackson-databind:2.14 .1"
759
- implementation " com.fasterxml.jackson.core:jackson-annotations:2.14 .1"
762
+ implementation " com.fasterxml.jackson.core:jackson-databind:2.16 .1"
763
+ implementation " com.fasterxml.jackson.core:jackson-annotations:2.16 .1"
760
764
761
765
// used for serializing/deserializing rcf models.
762
766
implementation group : ' io.protostuff' , name : ' protostuff-core' , version : ' 1.8.0'
@@ -773,31 +777,21 @@ dependencies {
773
777
}
774
778
775
779
testImplementation group : ' pl.pragmatists' , name : ' JUnitParams' , version : ' 1.1.1'
776
- testImplementation group : ' org.mockito' , name : ' mockito-core' , version : ' 2.25.0'
777
- testImplementation group : ' org.powermock' , name : ' powermock-api-mockito2' , version : ' 2.0.2'
778
- testImplementation group : ' org.powermock' , name : ' powermock-module-junit4' , version : ' 2.0.2'
779
- testImplementation group : ' org.powermock' , name : ' powermock-module-junit4-common' , version : ' 2.0.2'
780
- testImplementation group : ' org.powermock' , name : ' powermock-core' , version : ' 2.0.2'
781
- testImplementation group : ' org.powermock' , name : ' powermock-api-support' , version : ' 2.0.2'
782
- testImplementation group : ' org.powermock' , name : ' powermock-reflect' , version : ' 2.0.2'
783
- testImplementation group : ' org.objenesis' , name : ' objenesis' , version : ' 3.0.1'
784
- testImplementation group : ' net.bytebuddy' , name : ' byte-buddy' , version : ' 1.9.15'
785
- testImplementation group : ' net.bytebuddy' , name : ' byte-buddy-agent' , version : ' 1.9.15'
780
+ testImplementation group : ' org.mockito' , name : ' mockito-core' , version : ' 5.9.0'
781
+ testImplementation group : ' org.objenesis' , name : ' objenesis' , version : ' 3.3'
782
+ testImplementation group : ' net.bytebuddy' , name : ' byte-buddy' , version : ' 1.14.9'
783
+ testImplementation group : ' net.bytebuddy' , name : ' byte-buddy-agent' , version : ' 1.14.9'
786
784
testCompileOnly ' org.apiguardian:apiguardian-api:1.1.0'
787
- testImplementation ' org.junit.jupiter:junit-jupiter-api:5.7 .2'
788
- testImplementation ' org.junit.jupiter:junit-jupiter-params:5.7 .2'
789
- testImplementation ' org.junit.jupiter:junit-jupiter-engine:5.7 .2'
790
- testRuntimeOnly ' org.junit.vintage:junit-vintage-engine:5.7 .2'
785
+ testImplementation ' org.junit.jupiter:junit-jupiter-api:5.8 .2'
786
+ testImplementation ' org.junit.jupiter:junit-jupiter-params:5.8 .2'
787
+ testImplementation ' org.junit.jupiter:junit-jupiter-engine:5.8 .2'
788
+ testRuntimeOnly ' org.junit.vintage:junit-vintage-engine:5.8 .2'
791
789
testCompileOnly ' junit:junit:4.13.2'
792
790
}
793
791
794
792
compileJava. options. compilerArgs << " -Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
795
793
796
- test {
797
- useJUnitPlatform()
798
- }
799
-
800
- apply plugin : ' nebula.ospackage'
794
+ apply plugin : ' com.netflix.nebula.ospackage'
801
795
802
796
// This is afterEvaluate because the bundlePlugin ZIP task is updated afterEvaluate and changes the ZIP name to match the plugin name
803
797
afterEvaluate {
@@ -838,9 +832,8 @@ afterEvaluate {
838
832
task renameRpm(type : Copy ) {
839
833
from(" $buildDir /distributions" )
840
834
into(" $buildDir /distributions" )
841
- include archiveName
842
- rename archiveName, " ${ packageName} -${ version} .rpm"
843
- doLast { delete file(" $buildDir /distributions/$archiveName " ) }
835
+ rename " $archiveFileName " , " ${ packageName} -${ archiveVersion} .rpm"
836
+ doLast { delete file(" $buildDir /distributions/$archiveFileName " ) }
844
837
}
845
838
}
846
839
@@ -851,9 +844,8 @@ afterEvaluate {
851
844
task renameDeb(type : Copy ) {
852
845
from(" $buildDir /distributions" )
853
846
into(" $buildDir /distributions" )
854
- include archiveName
855
- rename archiveName, " ${ packageName} -${ version} .deb"
856
- doLast { delete file(" $buildDir /distributions/$archiveName " ) }
847
+ rename " $archiveFileName " , " ${ packageName} -${ archiveVersion} .deb"
848
+ doLast { delete file(" $buildDir /distributions/$archiveFileName " ) }
857
849
}
858
850
}
859
851
@@ -898,4 +890,13 @@ task updateVersion {
898
890
// Include the required files that needs to be updated with new Version
899
891
ant. replaceregexp(file :' build.gradle' , match : ' "opensearch.version", "\\ d.*"' , replace : ' "opensearch.version", "' + newVersion. tokenize(' -' )[0 ] + ' -SNAPSHOT"' , flags :' g' , byline :true )
900
892
}
901
- }
893
+ }
894
+
895
+ tasks. withType(AbstractPublishToMaven ) {
896
+ def predicate = provider {
897
+ publication. name == " pluginZip"
898
+ }
899
+ onlyIf(" Publishing only ZIP distributions" ) {
900
+ predicate. get()
901
+ }
902
+ }
0 commit comments