diff --git a/build.sbt b/build.sbt index 9b0abc86f..71b14cfc3 100644 --- a/build.sbt +++ b/build.sbt @@ -1,9 +1,8 @@ import java.io.File import java.nio.charset.Charset -import java.nio.file.Files - +import java.nio.file.{Files, StandardCopyOption} import com.typesafe.sbt.packager.linux.{LinuxPackageMapping, LinuxSymlink} -import sbt.Keys._ +import sbt.Keys.* resolvers ++= Resolver.sonatypeOssRepos("public") @@ -217,7 +216,7 @@ lazy val generateVersionTask = Def.task { */ lazy val buildNpmJsFile = taskKey[Seq[File]]("buildNpmJsFile") lazy val buildNpmJsFileTask = Def.task { - val compiledFile = target.value / "scala-2.12" / s"${name.value}-fastopt.js" + val compiledFile = target.value / "scala-2.13" / s"${name.value}-fastopt.js" println(s"buildNpmJsFile: reading $compiledFile") val compiledFileContents = IO.read(compiledFile, UTF8) @@ -249,8 +248,8 @@ lazy val buildNpmPackageTask = Def.task { val readMeFile = new File("js/npm/README.md") val packageJsonFile = new File("js/npm/package.json") - Files.copy(new File("LICENSE").toPath, licenseFile.toPath) - Files.copy(new File("js/README.md").toPath, readMeFile.toPath) + Files.copy(new File("LICENSE").toPath, licenseFile.toPath, StandardCopyOption.REPLACE_EXISTING) + Files.copy(new File("js/README.md").toPath, readMeFile.toPath, StandardCopyOption.REPLACE_EXISTING) val packageJsonTmpl = IO.read(new File("js/package.json"), UTF8) val packageJsonContents = packageJsonTmpl.replaceFirst( diff --git a/jvm/src/main/scala/io/kaitai/struct/JavaMain.scala b/jvm/src/main/scala/io/kaitai/struct/JavaMain.scala index eb8c3b91d..efd3b3bdb 100644 --- a/jvm/src/main/scala/io/kaitai/struct/JavaMain.scala +++ b/jvm/src/main/scala/io/kaitai/struct/JavaMain.scala @@ -190,13 +190,13 @@ object JavaMain { // we need to decode it as well. // // Linux, from IDE: - // $HOME/git/kaitai_struct/compiler/jvm/target/scala-2.12/classes/ + // $HOME/git/kaitai_struct/compiler/jvm/target/scala-2.13/classes/ // // Linux, from stage: // $HOME/git/kaitai_struct/compiler/jvm/target/universal/stage/lib/io.kaitai.kaitai-struct-compiler-0.10-SNAPSHOT.jar // // Linux, from "sbt compilerJVM/run" - // $HOME/git/kaitai_struct/compiler/jvm/target/scala-2.12/classes/ + // $HOME/git/kaitai_struct/compiler/jvm/target/scala-2.13/classes/ // // Linux, from universal, custom install path: // /tmp/a%20b/kaitai-struct-compiler-0.10-SNAPSHOT/lib/io.kaitai.kaitai-struct-compiler-0.10-SNAPSHOT.jar