Skip to content

Commit

Permalink
Befta-fw 9.0.1, ccd-test-definitions 7.22.1, gradle 8.7 (#293)
Browse files Browse the repository at this point in the history
* Befta-fw 9.0.1, ccd-test-definitions 7.22.1, gradle 8.7

* Fix ext and bump spring cloud version

* fix spring cloud

* Bump befta-fw and test-definitions to include fix

---------

Co-authored-by: ankita-srivastava009 <[email protected]>
  • Loading branch information
lang-ben and ankita-srivastava009 authored Jul 10, 2024
1 parent 4ec6e7d commit 4f49372
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 44 deletions.
65 changes: 33 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,26 @@ plugins {
id 'application'
id 'idea'
id 'jacoco'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'io.spring.dependency-management' version '1.1.5'
id 'org.springframework.boot' version '2.7.12'
id 'com.github.ben-manes.versions' version '0.42.0'
id 'org.sonarqube' version '3.3'
id 'com.github.spacialcircumstances.gradle-cucumber-reporting' version '0.1.23'
id 'com.github.hmcts.rse-cft-lib' version '0.19.169'
id 'uk.gov.hmcts.java' version '0.12.41'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'org.sonarqube' version '5.0.0.4638'
id 'com.github.spacialcircumstances.gradle-cucumber-reporting' version '0.1.25'
id 'com.github.hmcts.rse-cft-lib' version '0.19.1214'
id 'uk.gov.hmcts.java' version '0.12.57'
}

group = 'uk.gov.hmcts.reform'
version = '0.0.1'

ext {
set('springCloudVersion', "2021.0.3")
set('springCloudVersion', "2021.0.8")
set('spring-security.version','5.8.11')
set('spring-framework.version','5.3.27')
set('snakeyaml.version','2.0')
set('jackson.version','2.16.0')
}

ext['spring-security.version'] = '5.8.11'
ext['spring-framework.version'] = '5.3.27'
ext['snakeyaml.version'] = '2.0'
ext['jackson.version'] = '2.16.0'

configurations {
functionalTestImplementation.extendsFrom testImplementation
functionalTestRuntimeOnly.extendsFrom runtimeOnly

integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom runtimeOnly

cftlibRuntimeClasspath.extendsFrom(runtimeClasspath)
}

java {
toolchain {
Expand Down Expand Up @@ -80,6 +70,16 @@ sourceSets {
}
}

configurations {
functionalTestImplementation.extendsFrom testImplementation
functionalTestRuntimeOnly.extendsFrom runtimeOnly

integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom runtimeOnly

cftlibRuntimeClasspath.extendsFrom(runtimeClasspath)
}

idea {
module {
// config to allow Intellij to mark test source and resource files correctly to help linting tools
Expand Down Expand Up @@ -125,10 +125,9 @@ task smoke(type: JavaExec) {
group = "Verification"

generateCucumberReports.enabled = false
main = "uk.gov.hmcts.reform.translate.TranslationServiceBeftaMain"
mainClass = "uk.gov.hmcts.reform.translate.TranslationServiceBeftaMain"
classpath += sourceSets.functionalTest.runtimeClasspath + sourceSets.main.output + sourceSets.test.output
args = [
'--strict',
'--threads', '10',
'--plugin', "json:${rootDir}/target/cucumber.json",
'--plugin', "junit:${buildDir}/test-results/smoke/cucumber.xml",
Expand Down Expand Up @@ -159,10 +158,9 @@ task functional(type: JavaExec) {
group = "Verification"

generateCucumberReports.enabled = false
main = "uk.gov.hmcts.reform.translate.TranslationServiceBeftaMain"
mainClass = "uk.gov.hmcts.reform.translate.TranslationServiceBeftaMain"
classpath += sourceSets.functionalTest.runtimeClasspath + sourceSets.main.output + sourceSets.test.output
args = [
'--strict',
'--threads', '10',
'--plugin', "json:${rootDir}/target/cucumber.json",
'--plugin', "junit:${buildDir}/test-results/functional/cucumber.xml",
Expand Down Expand Up @@ -213,7 +211,7 @@ jacocoTestReport {
reports {
xml.required = true
csv.required = false
xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
xml.outputLocation = file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
}
}

Expand All @@ -231,9 +229,11 @@ dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-oauth2-client'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-cache'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-oauth2-resource-server'

implementation group: 'org.springframework.cloud', name: 'spring-cloud-config-server', version: '4.0.5'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-config', version: '4.0.5'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-config-client', version: '4.0.5'

implementation group: 'org.springframework.security', name: 'spring-security-web'
implementation group: 'org.springframework.security', name: 'spring-security-oauth2-jose'
implementation group: 'org.springframework.security', name: 'spring-security-config'
Expand Down Expand Up @@ -287,14 +287,13 @@ dependencies {
functionalTestImplementation group: 'commons-lang', name: 'commons-lang', version: '2.6'

implementation group: 'commons-fileupload', name: 'commons-fileupload', version: '1.5'
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
implementation group: 'commons-io', name: 'commons-io', version: '2.14.0'

testImplementation (group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.17.0') {
testImplementation (group: 'com.github.hmcts', name: 'ccd-test-definitions', version: '7.22.2') {
exclude group: 'io.rest-assured', module : 'rest-assured'
exclude group: 'com.github.hmcts.befta-fw', module: 'befta-fw'
}

testImplementation group: 'com.github.hmcts', name: 'befta-fw', version: '8.7.11'
testImplementation group: 'com.github.hmcts', name: 'befta-fw', version: '9.0.2'

cftlibImplementation group: 'org.springframework.boot', name: 'spring-boot-devtools'

Expand Down Expand Up @@ -329,7 +328,7 @@ sonarqube {
properties {
property "sonar.projectName", "Reform :: ts-translation-service"
property "sonar.projectKey", "uk.gov.hmcts.reform:ts-translation-service"
property "sonar.coverage.jacoco.xmlReportPaths", "${jacocoTestReport.reports.xml.destination.path}"
property "sonar.coverage.jacoco.xmlReportPaths", "${jacocoTestReport.reports.xml.outputLocation}"
property "sonar.exclusions",
"src/main/java/uk/gov/hmcts/reform/translate/Application.java," +
"src/main/java/uk/gov/hmcts/reform/translate/config/SecurityConfiguration.java"
Expand Down Expand Up @@ -369,7 +368,9 @@ jacocoTestReport {
}
}

mainClassName = 'uk.gov.hmcts.reform.translate.Application'
application {
mainClass = 'uk.gov.hmcts.reform.translate.Application'
}

bootJar {
archiveFileName = "ts-translation-service.jar"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 14 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# 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"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
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
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -205,6 +209,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
15 changes: 9 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
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!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@RunWith(Cucumber.class)
@CucumberOptions(plugin = "json:target/cucumber.json",
glue = {"uk.gov.hmcts.befta.player"},
features = {"classpath:features"}, tags = {"(not @Ignore) or (not @elasticsearch)"})
features = {"classpath:features"}, tags = "(not @Ignore) or (not @elasticsearch)")
public final class TranslationServiceBeftaRunner {

private TranslationServiceBeftaRunner() {
Expand Down

0 comments on commit 4f49372

Please sign in to comment.