From ea90095bec715af33de359daafc25dde62ca4fd3 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Wed, 12 Jul 2023 16:58:07 +0300 Subject: [PATCH 1/2] Client version update, dependencies version update, Java version update --- CHANGELOG.md | 5 +++++ build.gradle | 19 ++++++++++--------- gradle.properties | 4 ++-- .../cucumber/AbstractReporter.java | 4 ++-- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d206ee5..25a2060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog ## [Unreleased] +### Changed +- Client version updated on [5.1.22](https://github.com/reportportal/client-java/releases/tag/5.1.22), by @HardNorth +- Cucumber version updated on 7.13.0, by @HardNorth +### Removed +- Java 8 support, by @HardNorth ## [5.1.3] ### Changed diff --git a/build.gradle b/build.gradle index 3330114..e4f6d1a 100644 --- a/build.gradle +++ b/build.gradle @@ -29,31 +29,32 @@ project.ext.limits = [ 'class' : 90 ] -sourceCompatibility = JavaVersion.VERSION_1_8 -targetCompatibility = JavaVersion.VERSION_1_8 +sourceCompatibility = JavaVersion.VERSION_11 +targetCompatibility = JavaVersion.VERSION_11 +compileJava.options.encoding = 'UTF-8' +compileTestJava.options.encoding = 'UTF-8' repositories { mavenCentral() - maven { url "https://jitpack.io" } } dependencies { - api 'com.epam.reportportal:client-java:5.1.16' + api 'com.epam.reportportal:client-java:5.1.22' api 'com.epam.reportportal:commons-model:5.0.0' api 'com.google.code.findbugs:jsr305:3.0.2' implementation "io.cucumber:cucumber-gherkin:${project.cucumber_version}" - implementation 'org.slf4j:slf4j-api:1.7.36' + implementation 'org.slf4j:slf4j-api:2.0.4' testImplementation "io.cucumber:cucumber-java:${project.cucumber_version}" - testImplementation 'com.github.reportportal:agent-java-test-utils:236a68c' + testImplementation 'com.epam.reportportal:agent-java-test-utils:0.0.2' testImplementation "io.cucumber:cucumber-testng:${project.cucumber_version}" - testImplementation 'org.aspectj:aspectjweaver:1.9.2' + testImplementation 'org.aspectj:aspectjweaver:1.9.19' testImplementation 'org.hamcrest:hamcrest-core:2.2' testImplementation 'org.mockito:mockito-core:3.3.3' testImplementation 'org.mockito:mockito-junit-jupiter:3.3.3' - testImplementation 'ch.qos.logback:logback-classic:1.2.11' - testImplementation 'com.epam.reportportal:logger-java-logback:5.1.1' + testImplementation 'ch.qos.logback:logback-classic:1.4.5' + testImplementation 'com.epam.reportportal:logger-java-logback:5.1.5' testImplementation ("org.junit.platform:junit-platform-runner:${project.junit_runner_version}") { exclude module: 'junit' } diff --git a/gradle.properties b/gradle.properties index 41d4815..8747042 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ -version=5.1.4-SNAPSHOT +version=5.2.0-SNAPSHOT description=EPAM Report portal. Cucumber JVM version [6.0.0; ) adapter -cucumber_version=7.3.4 +cucumber_version=7.13.0 junit_version=5.6.3 junit_runner_version=1.6.3 scripts_url=https://raw.githubusercontent.com/reportportal/gradle-scripts diff --git a/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java b/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java index ba55443..251400b 100644 --- a/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java +++ b/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java @@ -125,7 +125,7 @@ protected StartLaunchRQ buildStartLaunchRq(Date startTime, ListenerParameters pa return rq; } - private final Supplier launch = new MemoizingSupplier<>(new Supplier() { + private final Supplier launch = new MemoizingSupplier<>(new Supplier<>() { /* should not be lazy */ private final Date startTime = Calendar.getInstance().getTime(); @@ -675,7 +675,7 @@ protected void beforeScenario(@Nonnull Feature feature, @Nonnull TestCase scenar Optional rule = s.getRule(); Optional currentRule = f.getCurrentRule(); if (!currentRule.equals(rule)) { - if (!currentRule.isPresent()) { + if (currentRule.isEmpty()) { rule.ifPresent(r -> { r.setId(startRule(f.getId(), buildStartRuleRequest(r.getRule(), getCodeRef(feature.getUri(), r.getLine())))); f.setCurrentRule(r); From b55f116fa36febc72c6ec597c86480482b2cc43a Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Wed, 12 Jul 2023 17:02:11 +0300 Subject: [PATCH 2/2] Update Java for GitHub workflows --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64fa950..b3262a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,11 +36,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Set up JDK 1.8 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: '8' + java-version: '11' - name: Build with Gradle run: ./gradlew build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4bbdd0a..24d8eec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,11 +45,11 @@ jobs: version-file: ${{ env.VERSION_FILE }} version-file-extraction-pattern: ${{ env.VERSION_EXTRACT_PATTERN }} - - name: Set up JDK 1.8 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: '8' + java-version: '11' - name: Setup git credentials uses: oleksiyrudenko/gha-git-credentials@v2.1.1