Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sbt-idea-plugin to 4.0.1 #327

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
matrix:
os: [ubuntu-22.04]
scala: [2.13]
java: [corretto@17]
java: [corretto@21]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
Expand All @@ -41,24 +41,24 @@ jobs:
- name: Setup sbt
uses: sbt/setup-sbt@v1

- 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
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
java: [corretto@17]
java: [corretto@21]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand All @@ -99,24 +99,24 @@ jobs:
- name: Setup sbt
uses: sbt/setup-sbt@v1

- 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
Expand Down
17 changes: 9 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,19 @@ lazy val Guava = "com.google.guava" % "guava" % "33.3.1-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.15"
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
Expand All @@ -60,7 +62,7 @@ ThisBuild / githubWorkflowGeneratedCacheSteps := Seq(
ref = cache,
params = Map(
"path" -> "~/.scio-ideaPluginIC",
"key" -> s"idea-$intelliJVersion"
"key" -> s"idea-$intellijBranchNumber"
)
)
)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "3.26.2")
addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "4.0.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.5")