mirror of https://github.com/sbt/sbt.git
Shade fastparse
This commit is contained in:
parent
ab319b164f
commit
112638582f
15
build.sbt
15
build.sbt
|
|
@ -12,11 +12,22 @@ lazy val scalazVersion = "7.2.8"
|
|||
lazy val core = crossProject
|
||||
.settings(commonSettings)
|
||||
.settings(mimaPreviousArtifactSettings)
|
||||
.jvmConfigure(_
|
||||
.enablePlugins(_root_.coursier.ShadingPlugin)
|
||||
)
|
||||
.jvmSettings(
|
||||
shadingNamespace := "coursier.shaded",
|
||||
libraryDependencies += "com.lihaoyi" %% "fastparse" % "0.4.2" % "shaded",
|
||||
publish := publish.in(Shading).value,
|
||||
publishLocal := publishLocal.in(Shading).value
|
||||
)
|
||||
.jsSettings(
|
||||
libraryDependencies += "com.lihaoyi" %%% "fastparse" % "0.4.2"
|
||||
)
|
||||
.settings(
|
||||
name := "coursier",
|
||||
libraryDependencies ++= Seq(
|
||||
"org.scalaz" %%% "scalaz-core" % scalazVersion,
|
||||
"com.lihaoyi" %%% "fastparse" % "0.4.2"
|
||||
"org.scalaz" %%% "scalaz-core" % scalazVersion
|
||||
),
|
||||
mimaBinaryIssueFilters ++= {
|
||||
import com.typesafe.tools.mima.core._
|
||||
|
|
|
|||
|
|
@ -8,3 +8,28 @@ addSbtPlugin("io.get-coursier" % "sbt-shading" % "1.0.0-M15-2")
|
|||
addSbtPlugin("com.typesafe.sbt" % "sbt-proguard" % "0.2.2")
|
||||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.13")
|
||||
libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value
|
||||
|
||||
// temporary, until sbt-shading 1.0.0-M15-3 (that will pull a fine jarjar version)
|
||||
resolvers += Resolver.mavenLocal
|
||||
libraryDependencies += {
|
||||
|
||||
def jarjarVersion = {
|
||||
val coursierJarjarVersion = "1.0.1-coursier-SNAPSHOT"
|
||||
val fallbackJarjarVersion = "1.0.0"
|
||||
def coursierJarjarFoundInM2 = (file(sys.props("user.home")) / s".m2/repository/org/anarres/jarjar/jarjar-core/$coursierJarjarVersion").exists()
|
||||
|
||||
if (sys.env.contains("CI") || coursierJarjarFoundInM2)
|
||||
coursierJarjarVersion
|
||||
else {
|
||||
scala.Console.err.println(
|
||||
"Ad hoc jarjar version not found. Run\n" +
|
||||
" git clone https://github.com/alexarchambault/jarjar.git && cd jarjar && git checkout 249c8dbb970f8 && ./gradlew install\n" +
|
||||
s"to install it. Using version $fallbackJarjarVersion, that doesn't properly\n" +
|
||||
"shade Scala JARs."
|
||||
)
|
||||
fallbackJarjarVersion
|
||||
}
|
||||
}
|
||||
|
||||
"org.anarres.jarjar" % "jarjar-core" % jarjarVersion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,4 +14,5 @@ plugins = [
|
|||
|
||||
dependencies = [
|
||||
"org.scala-sbt:scripted-plugin:"${sbt.version}
|
||||
"org.anarres.jarjar:jarjar-core:1.0.1-coursier-SNAPSHOT"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ runSbtCoursierTests() {
|
|||
}
|
||||
|
||||
runSbtShadingTests() {
|
||||
setupCustomJarjar
|
||||
sbt ++$SCALA_VERSION sbt-coursier/publishLocal sbt-shading/scripted
|
||||
}
|
||||
|
||||
|
|
@ -144,6 +143,8 @@ publish() {
|
|||
|
||||
# TODO Add coverage once https://github.com/scoverage/sbt-scoverage/issues/111 is fixed
|
||||
|
||||
setupCustomJarjar
|
||||
|
||||
setupCoursierBinDir
|
||||
downloadInstallSbtExtras
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
com.lihaoyi:fastparse-utils_2.11:0.4.2:default
|
||||
com.lihaoyi:fastparse_2.11:0.4.2:default
|
||||
com.lihaoyi:sourcecode_2.11:0.1.3:default
|
||||
io.get-coursier:coursier_2.11:1.0.0-SNAPSHOT:compile
|
||||
org.jsoup:jsoup:1.10.2:default
|
||||
org.scala-lang:scala-library:2.11.8:default
|
||||
|
|
|
|||
Loading…
Reference in New Issue