mirror of https://github.com/sbt/sbt.git
fix project/flatten
This commit is contained in:
parent
c424b7440b
commit
2480fd838c
|
|
@ -1,26 +1,23 @@
|
||||||
lazy val root = (project in file(".")).
|
val unpackage = TaskKey[Unit]("unpackage")
|
||||||
settings(
|
|
||||||
|
ThisBuild / scalaVersion := "2.12.8"
|
||||||
|
|
||||||
|
lazy val root = (project in file("."))
|
||||||
|
.settings(
|
||||||
forConfig(Compile, "src"),
|
forConfig(Compile, "src"),
|
||||||
forConfig(Test, "test-src"),
|
forConfig(Test, "test-src"),
|
||||||
baseSettings
|
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.0" % Test,
|
||||||
|
unmanagedSources / includeFilter := "*.java" | "*.scala"
|
||||||
)
|
)
|
||||||
|
|
||||||
def baseSettings = Seq(
|
|
||||||
scalaVersion := "2.11.8",
|
|
||||||
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.11.4" % Test,
|
|
||||||
includeFilter in unmanagedSources := "*.java" | "*.scala"
|
|
||||||
)
|
|
||||||
|
|
||||||
def forConfig(conf: Configuration, name: String) = Project.inConfig(conf)( unpackageSettings(name) )
|
def forConfig(conf: Configuration, name: String) = Project.inConfig(conf)( unpackageSettings(name) )
|
||||||
|
|
||||||
def unpackageSettings(name: String) = Seq(
|
def unpackageSettings(name: String) = Seq(
|
||||||
unmanagedSourceDirectories := (baseDirectory.value / name) :: Nil,
|
unmanagedSourceDirectories := (baseDirectory.value / name) :: Nil,
|
||||||
excludeFilter in unmanagedResources := (includeFilter in unmanagedSources).value,
|
unmanagedResources / excludeFilter := (unmanagedSources / includeFilter).value,
|
||||||
unmanagedResourceDirectories := unmanagedSourceDirectories.value,
|
unmanagedResourceDirectories := unmanagedSourceDirectories.value,
|
||||||
unpackage := {
|
unpackage := {
|
||||||
IO.unzip(artifactPath in packageSrc value, baseDirectory.value / name)
|
IO.unzip((packageSrc / artifactPath).value, baseDirectory.value / name)
|
||||||
IO.delete(baseDirectory.value / name / "META-INF")
|
IO.delete(baseDirectory.value / name / "META-INF")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
val unpackage = TaskKey[Unit]("unpackage")
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue