diff --git a/build.gradle b/build.gradle index 6fc9085ff6..a6b8f81d24 100644 --- a/build.gradle +++ b/build.gradle @@ -63,11 +63,11 @@ buildscript { } plugins { - id 'nebula.ospackage' version "8.3.0" + id "com.netflix.nebula.ospackage-base" version "11.5.0" id 'java-library' - id "io.freefair.lombok" version "6.4.0" + id "io.freefair.lombok" version "8.4" id 'jacoco' - id 'com.diffplug.spotless' version '6.19.0' + id 'com.diffplug.spotless' version '6.22.0' } // import versions defined in https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchJavaPlugin.java#L94 @@ -97,7 +97,7 @@ spotless { removeUnusedImports() trimTrailingWhitespace() endWithNewline() - googleJavaFormat('1.17.0').reflowLongStrings().groupArtifact('com.google.googlejavaformat:google-java-format') + googleJavaFormat('1.19.2').reflowLongStrings().groupArtifact('com.google.googlejavaformat:google-java-format') } } @@ -118,6 +118,7 @@ allprojects { resolutionStrategy.force "com.squareup.okio:okio:3.5.0" resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib:1.9.0" resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.0" + resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0" } } @@ -157,8 +158,8 @@ jacoco { } jacocoTestReport { reports { - xml.enabled false - csv.enabled false + xml.required = false + csv.required = false } afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect { diff --git a/common/build.gradle b/common/build.gradle index 3a04e87fe7..4d20bb3fdb 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -25,6 +25,7 @@ plugins { id 'java-library' id "io.freefair.lombok" + id 'com.diffplug.spotless' version '6.22.0' } repositories { @@ -46,10 +47,10 @@ dependencies { testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.9.1' testImplementation group: 'com.google.guava', name: 'guava', version: '32.0.1-jre' testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' - testImplementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '4.9.3' + testImplementation('org.junit.jupiter:junit-jupiter:5.9.3') + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.7.0' + testImplementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '4.12.0' } diff --git a/core/build.gradle b/core/build.gradle index 0df41c8dd7..99296637c4 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -27,6 +27,7 @@ plugins { id "io.freefair.lombok" id 'jacoco' id 'java-test-fixtures' + id 'com.diffplug.spotless' version '6.22.0' } repositories { @@ -44,11 +45,10 @@ dependencies { api group: 'com.google.code.gson', name: 'gson', version: '2.8.9' api project(':common') - testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') + testImplementation('org.junit.jupiter:junit-jupiter:5.9.3') testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' - testImplementation group: 'org.mockito', name: 'mockito-inline', version: '3.12.4' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.7.0' } test { @@ -61,8 +61,8 @@ test { jacocoTestReport { reports { - html.enabled true - xml.enabled true + html.required = true + xml.required = true } afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect { diff --git a/core/src/test/java/org/opensearch/sql/planner/logical/LogicalPlanNodeVisitorTest.java b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalPlanNodeVisitorTest.java index 74aab31a30..f212749f48 100644 --- a/core/src/test/java/org/opensearch/sql/planner/logical/LogicalPlanNodeVisitorTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/logical/LogicalPlanNodeVisitorTest.java @@ -53,7 +53,7 @@ class LogicalPlanNodeVisitorTest { static Table table; @BeforeAll - private static void initMocks() { + public static void initMocks() { expression = mock(Expression.class); ref = mock(ReferenceExpression.class); aggregator = mock(Aggregator.class); diff --git a/core/src/test/java/org/opensearch/sql/planner/physical/datasource/DataSourceTableScanTest.java b/core/src/test/java/org/opensearch/sql/planner/physical/datasource/DataSourceTableScanTest.java index 0c9449e824..5c7182a752 100644 --- a/core/src/test/java/org/opensearch/sql/planner/physical/datasource/DataSourceTableScanTest.java +++ b/core/src/test/java/org/opensearch/sql/planner/physical/datasource/DataSourceTableScanTest.java @@ -43,7 +43,7 @@ public class DataSourceTableScanTest { private DataSourceTableScan dataSourceTableScan; @BeforeEach - private void setUp() { + public void setUp() { dataSourceTableScan = new DataSourceTableScan(dataSourceService); } diff --git a/datasources/build.gradle b/datasources/build.gradle index c1a0b94b5c..9bd233e1f9 100644 --- a/datasources/build.gradle +++ b/datasources/build.gradle @@ -26,12 +26,12 @@ dependencies { implementation group: 'commons-validator', name: 'commons-validator', version: '1.7' testImplementation group: 'junit', name: 'junit', version: '4.13.2' - testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') - testImplementation group: 'net.bytebuddy', name: 'byte-buddy-agent', version: '1.12.13' + testImplementation('org.junit.jupiter:junit-jupiter:5.9.3') + testImplementation group: 'net.bytebuddy', name: 'byte-buddy-agent', version: '1.14.9' testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.2.0' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.2.0' - testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.7.0' + testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3' } test { @@ -44,8 +44,8 @@ test { jacocoTestReport { reports { - html.enabled true - xml.enabled true + html.required = true + xml.required = true } afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbfa7..7f93135c49 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 637f7a08ed..a1f138116b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,7 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae diff --git a/gradlew b/gradlew index 39308dbb7a..1aa94a4269 100755 --- a/gradlew +++ b/gradlew @@ -1,14 +1,5 @@ -#!/usr/bin/env sh -# -# Copyright OpenSearch Contributors -# SPDX-License-Identifier: Apache-2.0 -# -# The OpenSearch Contributors require contributions made to -# this file be licensed under the Apache-2.0 license or a -# compatible open source license. -# -# Modifications Copyright OpenSearch Contributors. See -# GitHub history for details. +#!/bin/sh + # # Copyright © 2015-2021 the original authors. # @@ -92,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -142,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -153,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -161,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -206,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/gradlew.bat index 057ced6c45..6689b85bee 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,102 +1,92 @@ -@rem -@rem Copyright OpenSearch Contributors -@rem SPDX-License-Identifier: Apache-2.0 -@rem -@rem The OpenSearch Contributors require contributions made to -@rem this file be licensed under the Apache-2.0 license or a -@rem compatible open source license. -@rem -@rem Modifications Copyright OpenSearch Contributors. See -@rem GitHub history for details. -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/integ-test/build.gradle b/integ-test/build.gradle index c48d43d3e5..2215c0d664 100644 --- a/integ-test/build.gradle +++ b/integ-test/build.gradle @@ -25,6 +25,8 @@ import org.opensearch.gradle.test.RestIntegTestTask import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask import org.opensearch.gradle.testclusters.OpenSearchCluster +import org.gradle.api.internal.tasks.testing.filter.DefaultTestFilter +import org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestFramework import groovy.xml.XmlParser import java.nio.file.Paths @@ -33,6 +35,7 @@ import java.util.stream.Collectors plugins { id "de.undercouch.download" version "5.3.0" + id 'com.diffplug.spotless' version '6.22.0' } apply plugin: 'opensearch.build' @@ -170,8 +173,9 @@ dependencies { implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version:"${versions.log4j}" testImplementation project(':opensearch-sql-plugin') testImplementation project(':legacy') - testImplementation('org.junit.jupiter:junit-jupiter-api:5.6.2') - testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.6.2') + testImplementation('org.junit.jupiter:junit-jupiter-api:5.9.3') + testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.9.3') + testRuntimeOnly('org.junit.platform:junit-platform-launcher:1.9.3') testImplementation group: 'com.h2database', name: 'h2', version: '2.2.220' testImplementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.41.2.2' diff --git a/legacy/build.gradle b/legacy/build.gradle index 7eb5489dc2..db4f930a96 100644 --- a/legacy/build.gradle +++ b/legacy/build.gradle @@ -26,6 +26,7 @@ plugins { id 'java' id 'io.freefair.lombok' id 'antlr' + id 'com.diffplug.spotless' version '6.22.0' } generateGrammarSource { @@ -104,7 +105,7 @@ dependencies { compileOnly group: 'javax.servlet', name: 'servlet-api', version:'2.5' testImplementation group: 'org.hamcrest', name: 'hamcrest-core', version:'2.2' - testImplementation group: 'org.mockito', name: 'mockito-inline', version:'3.12.4' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0' testImplementation group: 'junit', name: 'junit', version: '4.13.2' } diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/JSONRequestTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/JSONRequestTest.java index 5f17951af5..94f1890efc 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/JSONRequestTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/JSONRequestTest.java @@ -8,8 +8,8 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyInt; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/LocalClusterStateTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/LocalClusterStateTest.java index 9fc04b9e3e..49c95fa23e 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/LocalClusterStateTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/LocalClusterStateTest.java @@ -6,8 +6,8 @@ package org.opensearch.sql.legacy.unittest; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java index 2dd5cc16ac..fec029a638 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java @@ -5,7 +5,7 @@ package org.opensearch.sql.legacy.unittest; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/SqlRequestFactoryTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/SqlRequestFactoryTest.java index 63fcd98524..9911f265f1 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/SqlRequestFactoryTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/SqlRequestFactoryTest.java @@ -15,7 +15,7 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.core.common.bytes.BytesArray; import org.opensearch.rest.RestRequest; import org.opensearch.sql.legacy.esdomain.LocalClusterState; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/executor/join/ElasticUtilsTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/executor/join/ElasticUtilsTest.java index 34c9b941d5..a642b03267 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/executor/join/ElasticUtilsTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/executor/join/ElasticUtilsTest.java @@ -13,7 +13,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; import org.opensearch.sql.legacy.executor.join.ElasticUtils; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/core/BinaryExpressionTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/core/BinaryExpressionTest.java index 37a0666ad3..acc0e9c60e 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/core/BinaryExpressionTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/core/BinaryExpressionTest.java @@ -15,7 +15,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.sql.legacy.expression.core.operator.ScalarOperation; @RunWith(MockitoJUnitRunner.class) diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/core/UnaryExpressionTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/core/UnaryExpressionTest.java index c8582ecb05..e030e1c6cf 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/core/UnaryExpressionTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/core/UnaryExpressionTest.java @@ -14,7 +14,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.sql.legacy.expression.core.operator.ScalarOperation; @RunWith(MockitoJUnitRunner.class) diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/model/ExprValueUtilsTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/model/ExprValueUtilsTest.java index d84543956d..15fd72a522 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/model/ExprValueUtilsTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/expression/model/ExprValueUtilsTest.java @@ -12,7 +12,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.sql.legacy.expression.model.ExprValueFactory; import org.opensearch.sql.legacy.expression.model.ExprValueUtils; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/metrics/RollingCounterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/metrics/RollingCounterTest.java index 0ad333a6e2..62fca52eaf 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/metrics/RollingCounterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/metrics/RollingCounterTest.java @@ -14,7 +14,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.sql.legacy.metrics.RollingCounter; @RunWith(MockitoJUnitRunner.class) diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java index 1260b551fb..5cb0bcf124 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java @@ -7,7 +7,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -20,7 +20,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.mockito.stubbing.Answer; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java index 4cda101ae4..521b225893 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java @@ -6,7 +6,7 @@ package org.opensearch.sql.legacy.unittest.planner; import static java.util.Collections.emptyList; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/converter/SQLAggregationParserTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/converter/SQLAggregationParserTest.java index 855ed9e346..d6911ac2fc 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/converter/SQLAggregationParserTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/converter/SQLAggregationParserTest.java @@ -26,7 +26,7 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.sql.legacy.domain.ColumnTypeProvider; import org.opensearch.sql.legacy.expression.core.Expression; import org.opensearch.sql.legacy.expression.core.ExpressionFactory; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/converter/SQLToOperatorConverterTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/converter/SQLToOperatorConverterTest.java index 578fb9bcff..b9e48b27e4 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/converter/SQLToOperatorConverterTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/converter/SQLToOperatorConverterTest.java @@ -14,7 +14,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.client.Client; import org.opensearch.sql.legacy.domain.ColumnTypeProvider; import org.opensearch.sql.legacy.expression.domain.BindingTuple; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/physical/SearchAggregationResponseHelperTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/physical/SearchAggregationResponseHelperTest.java index 630ea840cf..a456dc2a81 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/physical/SearchAggregationResponseHelperTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/physical/SearchAggregationResponseHelperTest.java @@ -20,7 +20,7 @@ import org.hamcrest.Matcher; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.sql.legacy.expression.domain.BindingTuple; import org.opensearch.sql.legacy.query.planner.physical.node.scroll.BindingTupleRow; import org.opensearch.sql.legacy.query.planner.physical.node.scroll.SearchAggregationResponseHelper; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/query/DefaultQueryActionTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/query/DefaultQueryActionTest.java index 11e14e9b48..755d604a65 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/query/DefaultQueryActionTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/query/DefaultQueryActionTest.java @@ -6,8 +6,8 @@ package org.opensearch.sql.legacy.unittest.query; import static org.hamcrest.Matchers.equalTo; -import static org.mockito.Matchers.anyString; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.any; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java index 9c13e1fc71..badddd53a5 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/RewriteRuleExecutorTest.java @@ -16,7 +16,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.sql.legacy.rewriter.RewriteRule; import org.opensearch.sql.legacy.rewriter.RewriteRuleExecutor; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java index 0fdf16e40e..460b045ca0 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/rewriter/parent/SQLExprParentSetterRuleTest.java @@ -11,7 +11,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import org.opensearch.sql.legacy.rewriter.parent.SQLExprParentSetterRule; @RunWith(MockitoJUnitRunner.class) diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/util/MultipleIndexClusterUtils.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/MultipleIndexClusterUtils.java index c3513e2a01..42620c11a6 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/util/MultipleIndexClusterUtils.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/MultipleIndexClusterUtils.java @@ -5,8 +5,8 @@ package org.opensearch.sql.legacy.util; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.opensearch.sql.legacy.util.CheckScriptContents.createParser; diff --git a/opensearch/build.gradle b/opensearch/build.gradle index 2261a1b4a9..92cc92ac72 100644 --- a/opensearch/build.gradle +++ b/opensearch/build.gradle @@ -26,6 +26,7 @@ plugins { id 'java-library' id "io.freefair.lombok" id 'jacoco' + id 'com.diffplug.spotless' version '6.22.0' } dependencies { @@ -39,10 +40,14 @@ dependencies { compileOnly group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" implementation group: 'org.opensearch', name:'opensearch-ml-client', version: "${opensearch_build}" - testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') + testImplementation('org.junit.jupiter:junit-jupiter-api:5.9.3') + testImplementation('org.junit.jupiter:junit-jupiter-params:5.9.3') + testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.9.3') + testRuntimeOnly('org.junit.platform:junit-platform-launcher:1.9.3') + testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.7.0' testImplementation group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" testImplementation group: 'org.opensearch.test', name: 'framework', version: "${opensearch_version}" } @@ -57,8 +62,8 @@ test { jacocoTestReport { reports { - html.enabled true - xml.enabled true + html.required = true + xml.required = true } afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect { diff --git a/plugin/build.gradle b/plugin/build.gradle index 39a7b8341f..af47c843ac 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -27,6 +27,7 @@ plugins { id "io.freefair.lombok" id 'jacoco' id 'opensearch.opensearchplugin' + id 'com.diffplug.spotless' version '6.22.0' } apply plugin: 'opensearch.pluginzip' @@ -130,11 +131,11 @@ dependencies { api project(':datasources') api project(':spark') - testImplementation group: 'net.bytebuddy', name: 'byte-buddy-agent', version: '1.12.13' + testImplementation group: 'net.bytebuddy', name: 'byte-buddy-agent', version: '1.14.9' testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' 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.6.2' + testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3' } test { @@ -183,7 +184,7 @@ testingConventions.enabled = false thirdPartyAudit.enabled = false -apply plugin: 'nebula.ospackage' +apply plugin: 'com.netflix.nebula.ospackage' validateNebulaPom.enabled = false // This is afterEvaluate because the bundlePlugin ZIP task is updated afterEvaluate and changes the ZIP name to match the plugin name @@ -225,9 +226,9 @@ afterEvaluate { task renameRpm(type: Copy) { from("$buildDir/distributions") into("$buildDir/distributions") - include archiveName - rename archiveName, "${packageName}-${version}.rpm" - doLast { delete file("$buildDir/distributions/$archiveName") } + include "$archiveFileName" + rename "$archiveFileName", "${packageName}-${version}.rpm" + doLast { delete file("$buildDir/distributions/$archiveFileName") } } } @@ -238,9 +239,9 @@ afterEvaluate { task renameDeb(type: Copy) { from("$buildDir/distributions") into("$buildDir/distributions") - include archiveName - rename archiveName, "${packageName}-${version}.deb" - doLast { delete file("$buildDir/distributions/$archiveName") } + include "$archiveFileName" + rename "$archiveFileName", "${packageName}-${version}.deb" + doLast { delete file("$buildDir/distributions/$archiveFileName") } } } } diff --git a/ppl/build.gradle b/ppl/build.gradle index 6d0a67c443..cb27cacd7a 100644 --- a/ppl/build.gradle +++ b/ppl/build.gradle @@ -27,6 +27,7 @@ plugins { id "io.freefair.lombok" id 'jacoco' id 'antlr' + id 'com.diffplug.spotless' version '6.22.0' } generateGrammarSource { @@ -56,7 +57,7 @@ dependencies { testImplementation group: 'junit', name: 'junit', version: '4.13.2' testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0' testImplementation(testFixtures(project(":core"))) } @@ -69,8 +70,8 @@ test { jacocoTestReport { reports { - html.enabled true - xml.enabled true + html.required = true + xml.required = true } afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect { diff --git a/prometheus/build.gradle b/prometheus/build.gradle index c2878ab1b4..7a3b3f7af6 100644 --- a/prometheus/build.gradle +++ b/prometheus/build.gradle @@ -24,11 +24,11 @@ dependencies { implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${versions.jackson}" implementation group: 'org.json', name: 'json', version: '20231013' - testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') + testImplementation('org.junit.jupiter:junit-jupiter:5.9.3') testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' - testImplementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '4.9.3' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.7.0' + testImplementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '4.12.0' } test { @@ -45,8 +45,8 @@ configurations.all { jacocoTestReport { reports { - html.enabled true - xml.enabled true + html.required = true + xml.required = true } afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect { diff --git a/protocol/build.gradle b/protocol/build.gradle index 92a1aa0917..765a9874ed 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -26,6 +26,7 @@ plugins { id 'java' id "io.freefair.lombok" id 'jacoco' + id 'com.diffplug.spotless' version '6.22.0' } dependencies { @@ -37,10 +38,10 @@ dependencies { implementation project(':core') implementation project(':opensearch') - testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') + testImplementation('org.junit.jupiter:junit-jupiter:5.9.3') testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.7.0' } configurations.all { @@ -57,8 +58,8 @@ test { jacocoTestReport { reports { - html.enabled true - xml.enabled true + html.required = true + xml.required = true } afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect { diff --git a/spark/build.gradle b/spark/build.gradle index bed355b9d2..9ebd18d1f9 100644 --- a/spark/build.gradle +++ b/spark/build.gradle @@ -53,11 +53,11 @@ dependencies { api group: 'com.amazonaws', name: 'aws-java-sdk-emrserverless', version: '1.12.545' implementation group: 'commons-io', name: 'commons-io', version: '2.8.0' - testImplementation(platform("org.junit:junit-bom:5.6.2")) + testImplementation(platform("org.junit:junit-bom:5.9.3")) - testImplementation('org.junit.jupiter:junit-jupiter') - testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.2.0' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.2.0' + testCompileOnly('org.junit.jupiter:junit-jupiter') + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.7.0' testCompileOnly('junit:junit:4.13.1') { exclude group: 'org.hamcrest', module: 'hamcrest-core' @@ -65,6 +65,9 @@ dependencies { testRuntimeOnly("org.junit.vintage:junit-vintage-engine") { exclude group: 'org.hamcrest', module: 'hamcrest-core' } + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") { + exclude group: 'org.hamcrest', module: 'hamcrest-core' + } testRuntimeOnly("org.junit.platform:junit-platform-launcher") { because 'allows tests to run from IDEs that bundle older version of launcher' } @@ -96,8 +99,8 @@ jacocoTestReport { dependsOn test, junit4 executionData test, junit4 reports { - html.enabled true - xml.enabled true + html.required = true + xml.required = true } afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect { diff --git a/sql/build.gradle b/sql/build.gradle index a9e1787c27..834220baa5 100644 --- a/sql/build.gradle +++ b/sql/build.gradle @@ -27,6 +27,7 @@ plugins { id "io.freefair.lombok" id 'jacoco' id 'antlr' + id 'com.diffplug.spotless' version '6.22.0' } generateGrammarSource { @@ -51,10 +52,10 @@ dependencies { implementation project(':core') api project(':protocol') - testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') + testImplementation('org.junit.jupiter:junit-jupiter:5.9.3') testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.12.4' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.7.0' + testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.7.0' testImplementation(testFixtures(project(":core"))) } @@ -68,8 +69,8 @@ test { jacocoTestReport { reports { - html.enabled true - xml.enabled true + html.required = true + xml.required = true } afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect {