From 5571fe19e14d64ee5fc63ddac182ebce0658c7b3 Mon Sep 17 00:00:00 2001 From: ragnar Date: Tue, 3 Sep 2024 15:20:14 +0200 Subject: [PATCH] update dependencies --- .../sync/DataManagerConnectionManager.scala | 4 ++-- project/Dependencies.scala | 4 ++-- project/JarExport.scala | 11 +++++++++-- project/LocalSettings.scala | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Modules/Examples/Misc JVM/src/main/scala/ex2021encfixtodo/sync/DataManagerConnectionManager.scala b/Modules/Examples/Misc JVM/src/main/scala/ex2021encfixtodo/sync/DataManagerConnectionManager.scala index 26d118533..7ea2986cc 100644 --- a/Modules/Examples/Misc JVM/src/main/scala/ex2021encfixtodo/sync/DataManagerConnectionManager.scala +++ b/Modules/Examples/Misc JVM/src/main/scala/ex2021encfixtodo/sync/DataManagerConnectionManager.scala @@ -3,7 +3,7 @@ package ex2021encfixtodo.sync import channels.TCP import com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec import com.google.crypto.tink.aead.AeadConfig -import com.google.crypto.tink.{Aead, CleartextKeysetHandle, JsonKeysetReader, JsonKeysetWriter, KeyTemplates, KeysetHandle} +import com.google.crypto.tink.{Aead, CleartextKeysetHandle, JsonKeysetReader, JsonKeysetWriter, KeyTemplates, KeysetHandle, LegacyKeysetSerialization} import rdts.base.{Bottom, Lattice, LocalUid} import rdts.dotted.{Dotted, HasDots, Obrem} import replication.{DataManager, ProtocolDots} @@ -38,7 +38,7 @@ class DataManagerConnectionManager[State: JsonValueCodec: Lattice: Bottom: HasDo CleartextKeysetHandle.read(JsonKeysetReader.withInputStream(Files.newInputStream(keysetFilePath))) private val aead: Aead = keyset.getPrimitive(classOf[Aead]) - println(keyset.getKeysetInfo) + println(LegacyKeysetSerialization.getKeysetInfo(keyset)) val dataManager: DataManager[State] = DataManager[State]( diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 4246a7b85..0ea70ec8c 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -19,8 +19,8 @@ object Dependencies { def sqliteJdbc = libraryDependencies += "org.xerial" % "sqlite-jdbc" % "3.46.1.0" def jsoniterScala = libraryDependencies ++= Seq( - "com.github.plokhotnyuk.jsoniter-scala" %%% "jsoniter-scala-core" % "2.30.8", - "com.github.plokhotnyuk.jsoniter-scala" %%% "jsoniter-scala-macros" % "2.30.8" % Provided + "com.github.plokhotnyuk.jsoniter-scala" %%% "jsoniter-scala-core" % "2.30.9", + "com.github.plokhotnyuk.jsoniter-scala" %%% "jsoniter-scala-macros" % "2.30.9" % Provided ) object slips { diff --git a/project/JarExport.scala b/project/JarExport.scala index 7efbcf173..3180db50b 100644 --- a/project/JarExport.scala +++ b/project/JarExport.scala @@ -2,7 +2,7 @@ * and may contain unused dependencies */ import sbt.Keys.{crossTarget, fullClasspathAsJars} -import sbt.{Compile, File, IO, Setting, TaskKey} +import sbt.{Compile, File, IO, Setting, TaskKey, SettingKey} // Extending sbt.AutoPlugin causes this plugin to be automatically added to all sbt projects that match the triggers. // And because we don’t really specify any triggers, it is just added everywhere. @@ -14,12 +14,16 @@ object JarExport extends sbt.AutoPlugin { // though, it does not yet define behaviour val packageJars = TaskKey[File]("packageJars", "copies classpath jars to a file in the target dir") + + val writeClasspathPath = SettingKey[File]("writeClasspathPath", "The file to write the classpath to.") // second additional command, same as the above val writeClasspath = TaskKey[File]("writeClasspath", "writes the classpath to a file in the target dir") // This defines settings the plugin makes. // It is essentially the same as if this was in a `.settings()` block in the build.sbt override lazy val projectSettings: Seq[Setting[?]] = Seq( + + // copy all jars required in the class path to a `jars` folder in the target directory packageJars := { val cp = (Compile / fullClasspathAsJars).value @@ -33,6 +37,9 @@ object JarExport extends sbt.AutoPlugin { targetpath.toFile }, + + writeClasspathPath := crossTarget.value.toPath.resolve("classpath.txt").toFile, + // write the classpath into a file that can be passed to java as a commandline argument file writeClasspath := { val cp = (Compile / fullClasspathAsJars).value @@ -40,7 +47,7 @@ object JarExport extends sbt.AutoPlugin { val pathstring = at.data.toString.replace("\\", "/") s"""-cp "${pathstring}"\n""" }.mkString("") - val targetpath = crossTarget.value.toPath.resolve("classpath.txt") + val targetpath = writeClasspathPath.value.toPath IO.write(targetpath.toFile, cpstring) targetpath.toFile } diff --git a/project/LocalSettings.scala b/project/LocalSettings.scala index 32c17a5d7..d3a19b3da 100644 --- a/project/LocalSettings.scala +++ b/project/LocalSettings.scala @@ -6,7 +6,7 @@ import scala.scalanative.build.{LTO, NativeConfig} object LocalSettings { - def tink = libraryDependencies += "com.google.crypto.tink" % "tink" % "1.14.1" + def tink = libraryDependencies += "com.google.crypto.tink" % "tink" % "1.15.0" def scalafx: ModuleID = "org.scalafx" %% "scalafx" % "22.0.0-R33"