Skip to content

Commit c3faed2

Browse files
author
Michel Davit
committed
Update build for new plugin
1 parent 43885f7 commit c3faed2

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-22.04]
3131
scala: [2.13]
32-
java: [corretto@17]
32+
java: [corretto@21]
3333
runs-on: ${{ matrix.os }}
3434
timeout-minutes: 60
3535
steps:
@@ -41,24 +41,24 @@ jobs:
4141
- name: Setup sbt
4242
uses: sbt/setup-sbt@v1
4343

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

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

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

6363
- name: Check that workflows are up to date
6464
run: sbt githubWorkflowCheck
@@ -88,7 +88,7 @@ jobs:
8888
strategy:
8989
matrix:
9090
os: [ubuntu-22.04]
91-
java: [corretto@17]
91+
java: [corretto@21]
9292
runs-on: ${{ matrix.os }}
9393
steps:
9494
- name: Checkout current branch (full)
@@ -99,24 +99,24 @@ jobs:
9999
- name: Setup sbt
100100
uses: sbt/setup-sbt@v1
101101

102-
- name: Setup Java (corretto@17)
103-
id: setup-java-corretto-17
104-
if: matrix.java == 'corretto@17'
102+
- name: Setup Java (corretto@21)
103+
id: setup-java-corretto-21
104+
if: matrix.java == 'corretto@21'
105105
uses: actions/setup-java@v4
106106
with:
107107
distribution: corretto
108-
java-version: 17
108+
java-version: 21
109109
cache: sbt
110110

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

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

121121
- name: Download target directories (2.13)
122122
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.1-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.15"
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)