diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff7288e..72fe938 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.13] - java: [corretto@17] + java: [corretto@21] runs-on: ${{ matrix.os }} timeout-minutes: 60 steps: @@ -42,24 +42,24 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (corretto@17) - id: setup-java-corretto-17 - if: matrix.java == 'corretto@17' + - name: Setup Java (corretto@21) + id: setup-java-corretto-21 + if: matrix.java == 'corretto@21' uses: actions/setup-java@v4 with: distribution: corretto - java-version: 17 + java-version: 21 cache: sbt - name: sbt update - if: matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false' + if: matrix.java == 'corretto@21' && steps.setup-java-corretto-21.outputs.cache-hit == 'false' run: sbt +update - name: Cache uses: actions/cache@v4 with: path: ~/.scio-ideaPluginIC - key: idea-2022.3.1 + key: idea-242.2 - name: Check that workflows are up to date run: sbt githubWorkflowCheck @@ -89,7 +89,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [corretto@17] + java: [corretto@21] runs-on: ${{ matrix.os }} steps: - name: Install sbt @@ -101,24 +101,24 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (corretto@17) - id: setup-java-corretto-17 - if: matrix.java == 'corretto@17' + - name: Setup Java (corretto@21) + id: setup-java-corretto-21 + if: matrix.java == 'corretto@21' uses: actions/setup-java@v4 with: distribution: corretto - java-version: 17 + java-version: 21 cache: sbt - name: sbt update - if: matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false' + if: matrix.java == 'corretto@21' && steps.setup-java-corretto-21.outputs.cache-hit == 'false' run: sbt +update - name: Cache uses: actions/cache@v4 with: path: ~/.scio-ideaPluginIC - key: idea-2022.3.1 + key: idea-242.2 - name: Download target directories (2.13) uses: actions/download-artifact@v4 diff --git a/build.sbt b/build.sbt index a053247..f684485 100644 --- a/build.sbt +++ b/build.sbt @@ -23,17 +23,19 @@ lazy val Guava = "com.google.guava" % "guava" % "33.3.0-jre" lazy val Scalatest = "org.scalatest" %% "scalatest" % "3.2.19" // idea settings -lazy val intelliJVersion = "2022.3.1" +// https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#platformVersions +lazy val intellijBranchNumber = "242.2" +// https://www.jetbrains.com/idea/download/other.html +ThisBuild / intellijBuild := "242.20224.300" ThisBuild / intellijPluginName := "scio-idea" ThisBuild / intellijPlatform := IntelliJPlatform.IdeaCommunity -ThisBuild / intellijBuild := intelliJVersion // project ThisBuild / tlBaseVersion := "0.1" ThisBuild / scalaVersion := "2.13.14" ThisBuild / githubWorkflowTargetBranches := Seq("main") -ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.corretto("17")) -ThisBuild / tlJdkRelease := Some(17) +ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.corretto("21")) +ThisBuild / tlJdkRelease := Some(21) ThisBuild / tlFatalWarnings := true ThisBuild / tlCiHeaderCheck := true ThisBuild / tlCiScalafmtCheck := true @@ -60,7 +62,7 @@ ThisBuild / githubWorkflowGeneratedCacheSteps := Seq( ref = cache, params = Map( "path" -> "~/.scio-ideaPluginIC", - "key" -> s"idea-$intelliJVersion" + "key" -> s"idea-$intellijBranchNumber" ) ) ) @@ -76,14 +78,13 @@ lazy val scioIdeaPlugin: Project = project intellijPlugins += "org.intellij.scala".toPlugin, patchPluginXml := pluginXmlOptions { xml => xml.version = version.value - // https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#platformVersions - xml.sinceBuild = "223" // for 2022.3 + xml.sinceBuild = intellijBuild.value }, pluginVerifierOptions := pluginVerifierOptions.value.copy( // verify against latest IntelliJ IDEA Community overrideIDEs = Seq( intellijBaseDirectory.value.toString, - "[latest-IC]" + "[latest-release-IC]" ), // allow experimental API usages failureLevels = FailureLevel.ALL.asScala diff --git a/project/plugins.sbt b/project/plugins.sbt index 7ecac85..9635470 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,3 @@ -addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "4.0.1") +addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "4.0.1" withSources()) addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.3")