Skip to content

Commit 5b2434d

Browse files
author
Michel Davit
committed
Update build for new plugin
1 parent 4805e32 commit 5b2434d

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

.github/workflows/ci.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
matrix:
3030
os: [ubuntu-latest]
3131
scala: [2.13]
32-
java: [corretto@17]
32+
java: [corretto@21]
3333
runs-on: ${{ matrix.os }}
3434
timeout-minutes: 60
3535
steps:
@@ -42,24 +42,24 @@ jobs:
4242
with:
4343
fetch-depth: 0
4444

45-
- name: Setup Java (corretto@17)
46-
id: setup-java-corretto-17
47-
if: matrix.java == 'corretto@17'
45+
- name: Setup Java (corretto@21)
46+
id: setup-java-corretto-21
47+
if: matrix.java == 'corretto@21'
4848
uses: actions/setup-java@v4
4949
with:
5050
distribution: corretto
51-
java-version: 17
51+
java-version: 21
5252
cache: sbt
5353

5454
- name: sbt update
55-
if: matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false'
55+
if: matrix.java == 'corretto@21' && steps.setup-java-corretto-21.outputs.cache-hit == 'false'
5656
run: sbt +update
5757

5858
- name: Cache
5959
uses: actions/cache@v4
6060
with:
6161
path: ~/.scio-ideaPluginIC
62-
key: idea-2022.3.1
62+
key: idea-242.2
6363

6464
- name: Check that workflows are up to date
6565
run: sbt githubWorkflowCheck
@@ -89,7 +89,7 @@ jobs:
8989
strategy:
9090
matrix:
9191
os: [ubuntu-latest]
92-
java: [corretto@17]
92+
java: [corretto@21]
9393
runs-on: ${{ matrix.os }}
9494
steps:
9595
- name: Install sbt
@@ -101,24 +101,24 @@ jobs:
101101
with:
102102
fetch-depth: 0
103103

104-
- name: Setup Java (corretto@17)
105-
id: setup-java-corretto-17
106-
if: matrix.java == 'corretto@17'
104+
- name: Setup Java (corretto@21)
105+
id: setup-java-corretto-21
106+
if: matrix.java == 'corretto@21'
107107
uses: actions/setup-java@v4
108108
with:
109109
distribution: corretto
110-
java-version: 17
110+
java-version: 21
111111
cache: sbt
112112

113113
- name: sbt update
114-
if: matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false'
114+
if: matrix.java == 'corretto@21' && steps.setup-java-corretto-21.outputs.cache-hit == 'false'
115115
run: sbt +update
116116

117117
- name: Cache
118118
uses: actions/cache@v4
119119
with:
120120
path: ~/.scio-ideaPluginIC
121-
key: idea-2022.3.1
121+
key: idea-242.2
122122

123123
- name: Download target directories (2.13)
124124
uses: actions/download-artifact@v4

build.sbt

+9-8
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,19 @@ lazy val Guava = "com.google.guava" % "guava" % "33.3.0-jre"
2323
lazy val Scalatest = "org.scalatest" %% "scalatest" % "3.2.19"
2424

2525
// idea settings
26-
lazy val intelliJVersion = "2022.3.1"
26+
// https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#platformVersions
27+
lazy val intellijBranchNumber = "242.2"
28+
// https://www.jetbrains.com/idea/download/other.html
29+
ThisBuild / intellijBuild := "242.20224.300"
2730
ThisBuild / intellijPluginName := "scio-idea"
2831
ThisBuild / intellijPlatform := IntelliJPlatform.IdeaCommunity
29-
ThisBuild / intellijBuild := intelliJVersion
3032

3133
// project
3234
ThisBuild / tlBaseVersion := "0.1"
3335
ThisBuild / scalaVersion := "2.13.14"
3436
ThisBuild / githubWorkflowTargetBranches := Seq("main")
35-
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.corretto("17"))
36-
ThisBuild / tlJdkRelease := Some(17)
37+
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.corretto("21"))
38+
ThisBuild / tlJdkRelease := Some(21)
3739
ThisBuild / tlFatalWarnings := true
3840
ThisBuild / tlCiHeaderCheck := true
3941
ThisBuild / tlCiScalafmtCheck := true
@@ -60,7 +62,7 @@ ThisBuild / githubWorkflowGeneratedCacheSteps := Seq(
6062
ref = cache,
6163
params = Map(
6264
"path" -> "~/.scio-ideaPluginIC",
63-
"key" -> s"idea-$intelliJVersion"
65+
"key" -> s"idea-$intellijBranchNumber"
6466
)
6567
)
6668
)
@@ -76,14 +78,13 @@ lazy val scioIdeaPlugin: Project = project
7678
intellijPlugins += "org.intellij.scala".toPlugin,
7779
patchPluginXml := pluginXmlOptions { xml =>
7880
xml.version = version.value
79-
// https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#platformVersions
80-
xml.sinceBuild = "223" // for 2022.3
81+
xml.sinceBuild = intellijBuild.value
8182
},
8283
pluginVerifierOptions := pluginVerifierOptions.value.copy(
8384
// verify against latest IntelliJ IDEA Community
8485
overrideIDEs = Seq(
8586
intellijBaseDirectory.value.toString,
86-
"[latest-IC]"
87+
"[latest-release-IC]"
8788
),
8889
// allow experimental API usages
8990
failureLevels = FailureLevel.ALL.asScala

0 commit comments

Comments
 (0)