mirror of https://github.com/sbt/sbt.git
Merge 61faf2650a into 25dd9b7363
This commit is contained in:
commit
955e8f31c2
|
|
@ -140,6 +140,7 @@ jobs:
|
|||
./sbt -v --client doc
|
||||
./sbt -v --client publishLocal
|
||||
./sbt -v --client test
|
||||
./sbt -v --client lmCoursierShaded/test
|
||||
./sbt -v --client "serverTestProj/test"
|
||||
./sbt -v --client "all $UTIL_TESTS"
|
||||
- name: Build and test (2)
|
||||
|
|
|
|||
16
build.sbt
16
build.sbt
|
|
@ -1316,6 +1316,8 @@ lazy val lmCoursier = project
|
|||
)
|
||||
.dependsOn(lmCore)
|
||||
|
||||
lazy val checkLmcoursierPackage = taskKey[Unit]("")
|
||||
|
||||
lazy val lmCoursierShaded = project
|
||||
.in(file("lm-coursier/target/shaded-module"))
|
||||
.settings(
|
||||
|
|
@ -1332,6 +1334,20 @@ lazy val lmCoursierShaded = project
|
|||
),
|
||||
assembly / assemblyOption ~= { _.withIncludeScala(false) },
|
||||
conflictWarning := ConflictWarning.disable,
|
||||
checkLmcoursierPackage := {
|
||||
val jarFile = assembly.value
|
||||
IO.withTemporaryDirectory { tmp =>
|
||||
val notLmcoursierPackageClasses = IO
|
||||
.unzip(jarFile, tmp, _.endsWith(".class"))
|
||||
.toSeq
|
||||
.map(f => IO.relativize(tmp, f).getOrElse(sys.error(s"invalid path ${f}")))
|
||||
.filterNot(f => f.startsWith("lmcoursier") || f.startsWith("META-INF"))
|
||||
.sorted
|
||||
notLmcoursierPackageClasses.foreach(println)
|
||||
assert(notLmcoursierPackageClasses.isEmpty)
|
||||
}
|
||||
},
|
||||
Test / test := (Test / test).dependsOn(checkLmcoursierPackage).value,
|
||||
Utils.noPublish,
|
||||
assemblyShadeRules := {
|
||||
val namespacesToShade = Seq(
|
||||
|
|
|
|||
Loading…
Reference in New Issue