From b818d13f63d064edc702074ac11fc563d63c7c1b Mon Sep 17 00:00:00 2001 From: Dmitry Baev Date: Fri, 5 Jul 2024 19:26:19 +0100 Subject: [PATCH 1/2] build with java 21 --- .github/workflows/build.yml | 12 ++++-------- .github/workflows/publish.yml | 4 ++-- build.gradle.kts | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad77feb7d..cb14edb6f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,22 +14,18 @@ jobs: build: name: "Build" runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - java-version: [ '17.0.x' ] steps: - uses: actions/checkout@v4.1.1 - - name: Set up JDK ${{ matrix.java-version }} + - name: "Set up JDK" uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: ${{ matrix.java-version }} + java-version: 21 - - name: Build with Gradle + - name: "Build with Gradle" run: ./gradlew build -x test --scan - - name: Run tests + - name: "Run tests" if: always() run: ./gradlew --no-build-cache cleanTest test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 75b78957e..28af62d51 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,11 +10,11 @@ jobs: steps: - uses: actions/checkout@v4.1.1 - - name: "Set up JDK 17.0.x" + - name: "Set up JDK" uses: actions/setup-java@v4 with: distribution: 'zulu' - java-version: '17.0.x' + java-version: '21' - name: Set up GPG run: echo -n "${GPG_PRIVATE_KEY}" | base64 --decode > ${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg diff --git a/build.gradle.kts b/build.gradle.kts index bb4c056e7..8232a0d34 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,7 +27,7 @@ plugins { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(17)) + languageVersion.set(JavaLanguageVersion.of(21)) } } From 6d07d1ed37c077279be8f4d5720e20868ebaf032 Mon Sep 17 00:00:00 2001 From: Dmitry Baev Date: Fri, 5 Jul 2024 20:10:58 +0100 Subject: [PATCH 2/2] bump deps to support build on java 21 --- allure-scalatest/build.gradle.kts | 12 +++++------- allure-spock/build.gradle.kts | 2 +- allure-spock2/build.gradle.kts | 2 +- settings.gradle.kts | 9 +++++---- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/allure-scalatest/build.gradle.kts b/allure-scalatest/build.gradle.kts index 910d28ad2..2aa0f8d31 100644 --- a/allure-scalatest/build.gradle.kts +++ b/allure-scalatest/build.gradle.kts @@ -4,17 +4,15 @@ description = "Allure ScalaTest Integration" apply(plugin = "scala") -val availableScalaVersions = listOf("2.11", "2.12", "2.13") -val defaultScala211Version = "2.11.12" -val defaultScala212Version = "2.12.8" -val defaultScala213Version = "2.13.1" +val availableScalaVersions = listOf("2.12", "2.13") +val defaultScala212Version = "2.12.19" +val defaultScala213Version = "2.13.14" var selectedScalaVersion = defaultScala213Version if (hasProperty("scalaVersion")) { val scalaVersion: String by project selectedScalaVersion = when (scalaVersion) { - "2.11" -> defaultScala211Version "2.12" -> defaultScala212Version "2.13" -> defaultScala213Version else -> scalaVersion @@ -80,8 +78,8 @@ val installAll by tasks.creating { dependencies { api(project(":allure-java-commons")) - implementation("org.scalatest:scalatest_$baseScalaVersion:3.1.1") - implementation("org.scala-lang.modules:scala-collection-compat_$baseScalaVersion:2.1.4") + implementation("org.scalatest:scalatest_$baseScalaVersion:3.2.19") + implementation("org.scala-lang.modules:scala-collection-compat_$baseScalaVersion:2.12.0") testAnnotationProcessor(project(":allure-descriptions-javadoc")) testImplementation("io.github.glytching:junit-extensions") testImplementation("org.assertj:assertj-core") diff --git a/allure-spock/build.gradle.kts b/allure-spock/build.gradle.kts index 9fbbe98ae..f65503f4d 100644 --- a/allure-spock/build.gradle.kts +++ b/allure-spock/build.gradle.kts @@ -3,7 +3,7 @@ description = "Allure Spock Framework Integration" apply(plugin = "groovy") val spockFrameworkVersion = "1.3-groovy-2.5" -val groovyVersion = "2.5.19" +val groovyVersion = "2.5.23" dependencies { api(project(":allure-java-commons")) diff --git a/allure-spock2/build.gradle.kts b/allure-spock2/build.gradle.kts index 50c5c4ba9..fbbe45a55 100644 --- a/allure-spock2/build.gradle.kts +++ b/allure-spock2/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } val spockFrameworkVersion = "2.3-groovy-3.0" -val groovyVersion = "3.0.13" +val groovyVersion = "3.0.22" dependencies { api(project(":allure-java-commons")) diff --git a/settings.gradle.kts b/settings.gradle.kts index 43beb9018..ba6de41ff 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -63,16 +63,17 @@ pluginManagement { } plugins { - id("com.gradle.enterprise") + id("com.gradle.develocity") version "3.17.5" apply false } val isCiServer = System.getenv().containsKey("CI") if (isCiServer) { - gradleEnterprise { + apply(plugin = "com.gradle.develocity") + develocity { buildScan { - termsOfServiceUrl = "https://gradle.com/terms-of-service" - termsOfServiceAgree = "yes" + termsOfUseUrl = "https://gradle.com/terms-of-service" + termsOfUseAgree = "yes" tag("CI") } }