Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ val asmDep = "org.scala-lang.modules" % "scala-asm"
val jlineDep = "org.jline" % "jline" % versionProps("jline.version")
val jnaDep = "net.java.dev.jna" % "jna" % versionProps("jna.version")
val jlineDeps = Seq(jlineDep, jnaDep)
val directories = "dev.dirs" % "directories" % "26"
val testInterfaceDep = "org.scala-sbt" % "test-interface" % "1.0"
val diffUtilsDep = "io.github.java-diff-utils" % "java-diff-utils" % "4.12"
val compilerInterfaceDep = "org.scala-sbt" % "compiler-interface" % "1.9.5"
Expand Down Expand Up @@ -491,6 +492,7 @@ lazy val compiler = configureAsSubproject(project)
// These are only needed for the POM:
// TODO: jline dependency is only needed for the REPL shell, which should move to its own jar
libraryDependencies ++= jlineDeps,
libraryDependencies += directories,
buildCharacterPropertiesFile := (Compile / resourceManaged).value / "scala-buildcharacter.properties",
Compile / resourceGenerators += generateBuildCharacterPropertiesFile.map(file => Seq(file)).taskValue,
// this a way to make sure that classes from interactive and scaladoc projects
Expand Down Expand Up @@ -548,6 +550,7 @@ lazy val compiler = configureAsSubproject(project)
|org.jline.terminal.spi;resolution:=optional
|org.jline.utils;resolution:=optional
|org.jline.builtins;resolution:=optional
|dev.dirs;resolution:=optional
|scala.*;version="$${range;[==,=+);$${ver}}"
|*""".stripMargin.linesIterator.mkString(","),
"Class-Path" -> "scala-reflect.jar scala-library.jar"
Expand Down Expand Up @@ -590,6 +593,7 @@ lazy val replFrontend = configureAsSubproject(project, srcdir = Some("repl-front
.settings(publish / skip := true)
.settings(
libraryDependencies ++= jlineDeps,
libraryDependencies += directories,
name := "scala-repl-frontend",
Compile / scalacOptions ++= Seq("-Xlint"),
)
Expand Down Expand Up @@ -1105,6 +1109,7 @@ lazy val scalaDist = Project("scalaDist", file(".") / "target" / "scala-dist-dis
}.taskValue,
Compile / managedResourceDirectories := Seq((Compile / resourceManaged).value),
libraryDependencies ++= jlineDeps,
libraryDependencies += directories,
apiURL := None,
fixPom(
"/project/name" -> <name>Scala Distribution Artifacts</name>,
Expand Down Expand Up @@ -1267,6 +1272,7 @@ lazy val dist = (project in file("dist"))
.settings(
bspEnabled := false,
libraryDependencies ++= jlineDeps,
libraryDependencies += directories,
mkBin := mkBinImpl.value,
mkQuick := Def.task {
val cp = (testP / IntegrationTest / fullClasspath).value
Expand All @@ -1280,12 +1286,11 @@ lazy val dist = (project in file("dist"))
target := (ThisBuild / target).value / projectFolder.value,
Compile / packageBin := {
val targetDir = (ThisBuild / buildDirectory).value / "pack" / "lib"
val jlineJAR = findJar((Compile / dependencyClasspath).value, jlineDep).get.data
val jnaJAR = findJar((Compile / dependencyClasspath).value, jnaDep).get.data
val mappings = Seq(
(jlineJAR, targetDir / "jline.jar"),
(jnaJAR, targetDir / "jna.jar"),
)
val dcp = (Compile / dependencyClasspath).value
val jars = List("jline.jar" -> jlineDep, "jna.jar" -> jnaDep, "directories.jar" -> directories)
val mappings = jars.map {
case (filename, dep) => (findJar(dcp, dep).get.data, targetDir / filename)
}
IO.copy(mappings, CopyOptions() withOverwrite true)
targetDir
},
Expand Down
5 changes: 5 additions & 0 deletions doc/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ This license is used by the following third-party libraries:
This license is used by the following third-party libraries:

* jQuery

### [Mozilla Public License](https://opensource.org/license/mpl-2-0/)
This license is used by the following third-party libraries:

* directories-jvm
10 changes: 10 additions & 0 deletions doc/License.rtf
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,14 @@ ASM\
\pard\tx220\tx720\pardeftab720\li720\fi-720\sl360\partightenfactor0
\ls4\ilvl0\cf2 \kerning1\expnd0\expndtw0 {\listtext \uc0\u8226 }\expnd0\expndtw0\kerning0
jQuery\

\f1\b \cf3 \
\pard\pardeftab720\sl360\sa320\partightenfactor0
{\field{\*\fldinst{HYPERLINK "https://opensource.org/license/mpl-2-0/"}}{\fldrslt \cf3 Mozilla Public License}}\cf2 \
\pard\pardeftab720\sl360\sa320\partightenfactor0

\f0\b0 \cf2 This license is used by the following third-party libraries:\
\pard\tx220\tx720\pardeftab720\li720\fi-720\sl360\partightenfactor0
\ls4\ilvl0\cf2 \kerning1\expnd0\expndtw0 {\listtext \uc0\u8226 }\expnd0\expndtw0\kerning0
directories-jvm\
}
Loading