mirror of https://github.com/sbt/sbt.git
Merge pull request #4733 from smarter/update-zinc
Replace usages of deprecated ScalaInstance#libraryJar
This commit is contained in:
commit
3ebd01b4f3
|
|
@ -3426,7 +3426,7 @@ object Classpaths {
|
|||
|
||||
def unmanagedScalaLibrary: Initialize[Task[Seq[File]]] = Def.taskDyn {
|
||||
if (autoScalaLibrary.value && scalaHome.value.isDefined)
|
||||
Def.task { scalaInstance.value.libraryJar :: Nil } else
|
||||
Def.task { scalaInstance.value.libraryJars } else
|
||||
Def.task { Nil }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ lazy val root = (project in file("."))
|
|||
artifact in (Compile, packageBin) := mainArtifact,
|
||||
libraryDependencies ++= (if (baseDirectory.value / "retrieve" exists) publishedID :: Nil else Nil),
|
||||
// needed to add a jar with a different type to the managed classpath
|
||||
unmanagedClasspath in Compile += scalaInstance.map(_.libraryJar).value,
|
||||
unmanagedClasspath in Compile ++= scalaInstance.value.libraryJars.toSeq,
|
||||
classpathTypes := Set(tpe),
|
||||
check := checkTask(dependencyClasspath).value,
|
||||
checkFull := checkTask(fullClasspath).value
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ mainClass := Some("jartest.Main")
|
|||
packageOptions in (Compile, packageBin) := {
|
||||
def manifestExtra = {
|
||||
val mf = new Manifest
|
||||
mf.getMainAttributes.put(Attributes.Name.CLASS_PATH, makeString(scalaInstance.value.libraryJar :: Nil))
|
||||
mf.getMainAttributes.put(Attributes.Name.CLASS_PATH, makeString(scalaInstance.value.libraryJars))
|
||||
mf
|
||||
}
|
||||
(packageOptions in (Compile, packageBin)).value :+ Package.JarManifest(manifestExtra)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import Path.makeString
|
||||
|
||||
name := "Main Resources Test"
|
||||
|
||||
version := "0.1"
|
||||
|
|
@ -8,7 +10,7 @@ packageOptions := {
|
|||
def manifestExtra = {
|
||||
import java.util.jar._
|
||||
val mf = new Manifest
|
||||
mf.getMainAttributes.put(Attributes.Name.CLASS_PATH, scalaInstance.value.libraryJar.getAbsolutePath)
|
||||
mf.getMainAttributes.put(Attributes.Name.CLASS_PATH, makeString(scalaInstance.value.libraryJars))
|
||||
mf
|
||||
}
|
||||
Package.JarManifest(manifestExtra) +: packageOptions.value
|
||||
|
|
|
|||
Loading…
Reference in New Issue