Merge pull request #534 from coursier/topic/foo

Minor things
This commit is contained in:
Alexandre Archambault 2017-05-11 12:52:00 +02:00 committed by GitHub
commit 5af21ca88c
4 changed files with 15 additions and 5 deletions

View File

@ -13,7 +13,12 @@ lazy val core = crossProject
scalaXmlIfNecessary,
libs ++= Seq(
Deps.fastParse % "shaded",
Deps.jsoup
Deps.jsoup % "shaded"
),
shadeNamespaces ++= Set(
"org.jsoup",
"fastparse",
"sourcecode"
),
generatePropertyFile
)

View File

@ -185,7 +185,6 @@ object CoursierSettings {
Seq(
scriptedLaunchOpts ++= Seq(
"-Xmx1024M",
"-XX:MaxPermSize=256M",
"-Dplugin.version=" + version.value,
"-Dsbttest.base=" + (sourceDirectory.value / "sbt-test").getAbsolutePath
),

View File

@ -161,7 +161,7 @@ object Shading {
log.info(s"Found ${toShadeClasses0.length} class(es) in JAR(s) to be shaded")
log.debug(toShadeClasses0.map(" " + _).sorted.mkString("\n"))
shadeNamespaces.toVector.sorted.foldLeft(toShadeClasses0) {
val toShadeClasses = shadeNamespaces.toVector.sorted.foldLeft(toShadeClasses0) {
(toShade, namespace) =>
val prefix = namespace + "."
val (filteredOut, remaining) = toShade.partition(_.startsWith(prefix))
@ -171,6 +171,13 @@ object Shading {
remaining
}
if (shadeNamespaces.nonEmpty) {
log.info(s"${toShadeClasses.length} remaining class(es) to be shaded")
log.debug(toShadeClasses.map(" " + _).sorted.mkString("\n"))
}
toShadeClasses
}
def createPackage(
@ -201,4 +208,4 @@ object Shading {
outputJar
}
}
}

View File

@ -1,5 +1,4 @@
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.11:default
org.scala-lang.modules:scala-xml_2.11:1.0.6:default
org.scalaz:scalaz-core_2.11:7.2.8:default