@@ -64,8 +64,8 @@ buildscript {
64
64
}
65
65
66
66
plugins {
67
- id ' nebula.ospackage' version " 8.3 .0" apply false
68
- id " com.diffplug.gradle. spotless" version " 3.26.1 "
67
+ id ' com.netflix. nebula.ospackage' version " 11.0 .0"
68
+ id " com.diffplug.spotless" version " 6.18.0 "
69
69
id ' java-library'
70
70
// Gradle 7.6 support was added in test-retry 1.4.0.
71
71
id ' org.gradle.test-retry' version ' 1.4.1'
@@ -149,22 +149,17 @@ dependencies {
149
149
}
150
150
151
151
testImplementation group : ' pl.pragmatists' , name : ' JUnitParams' , version : ' 1.1.1'
152
- testImplementation group : ' org.mockito' , name : ' mockito-core' , version : ' 2.25.0'
153
- testImplementation group : ' org.powermock' , name : ' powermock-api-mockito2' , version : ' 2.0.2'
154
- testImplementation group : ' org.powermock' , name : ' powermock-module-junit4' , version : ' 2.0.2'
155
- testImplementation group : ' org.powermock' , name : ' powermock-module-junit4-common' , version : ' 2.0.2'
156
- testImplementation group : ' org.powermock' , name : ' powermock-core' , version : ' 2.0.2'
157
- testImplementation group : ' org.powermock' , name : ' powermock-api-support' , version : ' 2.0.2'
158
- testImplementation group : ' org.powermock' , name : ' powermock-reflect' , version : ' 2.0.2'
152
+ testImplementation group : ' org.mockito' , name : ' mockito-core' , version : ' 5.3.1'
159
153
testImplementation group : ' org.objenesis' , name : ' objenesis' , version : ' 3.0.1'
160
- testImplementation group : ' net.bytebuddy' , name : ' byte-buddy' , version : ' 1.9.15 '
161
- testImplementation group : ' net.bytebuddy' , name : ' byte-buddy-agent' , version : ' 1.9.15 '
154
+ testImplementation group : ' net.bytebuddy' , name : ' byte-buddy' , version : ' 1.14.6 '
155
+ testImplementation group : ' net.bytebuddy' , name : ' byte-buddy-agent' , version : ' 1.14.6 '
162
156
testCompileOnly ' org.apiguardian:apiguardian-api:1.1.0'
163
- testImplementation ' org.junit.jupiter:junit-jupiter-api:5.7.2'
164
- testImplementation ' org.junit.jupiter:junit-jupiter-params:5.7.2'
165
- testImplementation ' org.junit.jupiter:junit-jupiter-engine:5.7.2'
157
+ // jupiter is required to run unit tests not inherited from OpenSearchTestCase (e.g., PreviousValueImputerTests)
158
+ testImplementation ' org.junit.jupiter:junit-jupiter-api:5.9.2'
159
+ testImplementation ' org.junit.jupiter:junit-jupiter-params:5.9.2'
160
+ testImplementation ' org.junit.jupiter:junit-jupiter-engine:5.9.2'
166
161
testImplementation " org.opensearch:opensearch-core:${ opensearch_version} "
167
- testRuntimeOnly ' org.junit.vintage :junit-vintage-engine:5.7.2 '
162
+ testRuntimeOnly( " org.junit.platform :junit-platform-launcher:1.9.2 " )
168
163
testCompileOnly ' junit:junit:4.13.2'
169
164
}
170
165
@@ -187,11 +182,16 @@ allprojects {
187
182
188
183
version = " ${ opensearch_build} "
189
184
190
- plugins. withId(' java ' ) {
191
- sourceCompatibility = targetCompatibility = JavaVersion . VERSION_11
185
+ plugins. withId(' jacoco ' ) {
186
+ jacoco . toolVersion = ' 0.8.10 '
192
187
}
193
188
}
194
189
190
+ java {
191
+ targetCompatibility = JavaVersion . VERSION_11
192
+ sourceCompatibility = JavaVersion . VERSION_11
193
+ }
194
+
195
195
ext {
196
196
projectSubstitutions = [:]
197
197
licenseFile = rootProject. file(' LICENSE.txt' )
@@ -215,10 +215,10 @@ configurations.all {
215
215
force " org.apache.httpcomponents.client5:httpclient5:${ versions.httpclient5} "
216
216
force " commons-codec:commons-codec:${ versions.commonscodec} "
217
217
218
- force " org.mockito:mockito-core:2.25.0 "
218
+ force " org.mockito:mockito-core:5.3.1 "
219
219
force " org.objenesis:objenesis:3.0.1"
220
- force " net.bytebuddy:byte-buddy:1.9.15 "
221
- force " net.bytebuddy:byte-buddy-agent:1.9.15 "
220
+ force " net.bytebuddy:byte-buddy:1.14.6 "
221
+ force " net.bytebuddy:byte-buddy-agent:1.14.6 "
222
222
force " com.google.code.gson:gson:2.8.9"
223
223
force " junit:junit:4.13.2"
224
224
}
@@ -711,8 +711,8 @@ jacocoTestCoverageVerification {
711
711
712
712
jacocoTestReport {
713
713
reports {
714
- xml. enabled = true
715
- html. enabled = true
714
+ xml. required = true // for coverlay
715
+ html. required = true // human readable
716
716
}
717
717
}
718
718
@@ -721,11 +721,7 @@ jacocoTestCoverageVerification.dependsOn jacocoTestReport
721
721
722
722
compileJava. options. compilerArgs << " -Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
723
723
724
- test {
725
- useJUnitPlatform()
726
- }
727
-
728
- apply plugin : ' nebula.ospackage'
724
+ apply plugin : ' com.netflix.nebula.ospackage'
729
725
730
726
// This is afterEvaluate because the bundlePlugin ZIP task is updated afterEvaluate and changes the ZIP name to match the plugin name
731
727
afterEvaluate {
@@ -735,7 +731,7 @@ afterEvaluate {
735
731
version = " ${ project.version} " - " -SNAPSHOT"
736
732
737
733
into ' /usr/share/opensearch/plugins'
738
- from(zipTree(bundlePlugin. archivePath )) {
734
+ from(zipTree(bundlePlugin. archiveFile )) {
739
735
into opensearchplugin. name
740
736
}
741
737
@@ -766,9 +762,8 @@ afterEvaluate {
766
762
task renameRpm(type : Copy ) {
767
763
from(" $buildDir /distributions" )
768
764
into(" $buildDir /distributions" )
769
- include archiveName
770
- rename archiveName, " ${ packageName} -${ version} .rpm"
771
- doLast { delete file(" $buildDir /distributions/$archiveName " ) }
765
+ rename " $archiveFileName " , " ${ packageName} -${ archiveVersion} .rpm"
766
+ doLast { delete file(" $buildDir /distributions/$archiveFileName " ) }
772
767
}
773
768
}
774
769
@@ -779,9 +774,8 @@ afterEvaluate {
779
774
task renameDeb(type : Copy ) {
780
775
from(" $buildDir /distributions" )
781
776
into(" $buildDir /distributions" )
782
- include archiveName
783
- rename archiveName, " ${ packageName} -${ version} .deb"
784
- doLast { delete file(" $buildDir /distributions/$archiveName " ) }
777
+ rename " $archiveFileName " , " ${ packageName} -${ archiveVersion} .deb"
778
+ doLast { delete file(" $buildDir /distributions/$archiveFileName " ) }
785
779
}
786
780
}
787
781
0 commit comments