diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 278d587..0f0e9c3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
- scala: [2.13.14]
+ scala: [2.13.16]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
@@ -64,7 +64,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
- scala: [2.13.14]
+ scala: [2.13.16]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
@@ -84,12 +84,12 @@ jobs:
- name: Setup sbt
uses: sbt/setup-sbt@v1
- - name: Download target directories (2.13.14)
+ - name: Download target directories (2.13.16)
uses: actions/download-artifact@v4
with:
- name: target-${{ matrix.os }}-2.13.14-${{ matrix.java }}
+ name: target-${{ matrix.os }}-2.13.16-${{ matrix.java }}
- - name: Inflate target directories (2.13.14)
+ - name: Inflate target directories (2.13.16)
run: |
tar xf targets.tar
rm targets.tar
diff --git a/build.sbt b/build.sbt
index dc3c009..32a7018 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,16 +1,17 @@
import org.jetbrains.sbtidea.Keys._
-ThisBuild / scalaVersion := "2.13.14"
+ThisBuild / scalaVersion := "2.13.16"
ThisBuild / intellijPluginName := "intellij-hocon"
-ThisBuild / intellijBuild := "242.20224.300"
+ThisBuild / intellijBuild := "251.17181.31"
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
val junitInterfaceVersion = "0.11"
-val commonsTextVersion = "1.12.0"
+val junitVersion = "4.13.2"
+val commonsTextVersion = "1.13.0"
val opentest4jVersion = "1.3.0"
lazy val hocon = project.in(file(".")).enablePlugins(SbtIdeaPlugin).settings(
- version := "2024.2.99-SNAPSHOT",
+ version := "2025.1.99-SNAPSHOT",
Compile / scalaSource := baseDirectory.value / "src",
Test / scalaSource := baseDirectory.value / "test",
Compile / resourceDirectory := baseDirectory.value / "resources",
@@ -22,10 +23,11 @@ lazy val hocon = project.in(file(".")).enablePlugins(SbtIdeaPlugin).settings(
"-Xfatal-warnings",
),
ideBasePackages := Seq("org.jetbrains.plugins.hocon"),
- intellijPlugins := Seq("com.intellij.properties", "com.intellij.java", "com.intellij.java-i18n").map(_.toPlugin),
+ intellijPlugins := Seq("com.intellij.java", "com.intellij.java-i18n", "com.intellij.modules.json").map(_.toPlugin),
libraryDependencies ++= Seq(
"org.apache.commons" % "commons-text" % commonsTextVersion,
"com.novocode" % "junit-interface" % junitInterfaceVersion % Test,
+ "junit" % "junit" % junitVersion % Test,
"org.opentest4j" % "opentest4j" % opentest4jVersion % Test,
),
packageLibraryMappings := Seq.empty, // allow scala-library
diff --git a/project/build.properties b/project/build.properties
index 7af1c95..61f5b98 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1,2 +1,2 @@
# suppress inspection "UnusedProperty" for whole file
-sbt.version=1.10.1
+sbt.version=1.10.7
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 58dde25..c4f9842 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,3 +1,3 @@
-addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "3.26.2")
-addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1")
+addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "4.0.3")
+addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.2")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0")
\ No newline at end of file
diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml
index bdfce66..56ce66b 100644
--- a/resources/META-INF/plugin.xml
+++ b/resources/META-INF/plugin.xml
@@ -3,11 +3,12 @@
org.jetbrains.plugins.hocon
HOCON
Standalone HOCON plugin for IntelliJ IDEA
- 2024.2.99-SNAPSHOT
+ 2025.1.99-SNAPSHOT
Roman Janusz, AVSystem, JetBrains
-
+
com.intellij.modules.platform
com.intellij.modules.lang
+ com.intellij.modules.json
com.intellij.modules.java
diff --git a/test/org/jetbrains/plugins/hocon/HoconActionTest.scala b/test/org/jetbrains/plugins/hocon/HoconActionTest.scala
index 8b228cf..57ae216 100644
--- a/test/org/jetbrains/plugins/hocon/HoconActionTest.scala
+++ b/test/org/jetbrains/plugins/hocon/HoconActionTest.scala
@@ -55,10 +55,10 @@ object HoconActionTest {
private def mockDataContext(file: PsiFile, editor: Editor) = {
val parentContext = DataManager.getInstance().getDataContext(editor.getComponent)
- CustomizedDataContext.withProvider(parentContext, (dataId: String) => {
- if (CommonDataKeys.PROJECT is dataId) file.getProject
- else if (CommonDataKeys.EDITOR is dataId) editor
- else null
+ CustomizedDataContext.withSnapshot(parentContext, (sink: DataSink) => {
+ sink.set(CommonDataKeys.PROJECT, file.getProject)
+ sink.set(CommonDataKeys.EDITOR, editor)
+ sink.set(CommonDataKeys.PSI_FILE, file)
})
}