mirror of https://github.com/sbt/sbt.git
183 lines
5.4 KiB
Scala
183 lines
5.4 KiB
Scala
|
|
import Settings._
|
|
|
|
inThisBuild(List(
|
|
organization := "io.get-coursier",
|
|
homepage := Some(url("https://github.com/coursier/sbt-coursier")),
|
|
licenses := Seq("Apache 2.0" -> url("http://opensource.org/licenses/Apache-2.0")),
|
|
developers := List(
|
|
Developer(
|
|
"alexarchambault",
|
|
"Alexandre Archambault",
|
|
"",
|
|
url("https://github.com/alexarchambault")
|
|
)
|
|
)
|
|
))
|
|
|
|
val coursierVersion0 = "2.0.0-RC6-10"
|
|
|
|
lazy val `lm-coursier` = project
|
|
.in(file("modules/lm-coursier"))
|
|
.settings(
|
|
shared,
|
|
Mima.settings,
|
|
Mima.lmCoursierFilters,
|
|
libraryDependencies ++= Seq(
|
|
"io.get-coursier" %% "coursier" % coursierVersion0,
|
|
"io.github.alexarchambault" %% "data-class" % "0.2.1" % Provided,
|
|
// We depend on librarymanagement-ivy rather than just
|
|
// librarymanagement-core to handle the ModuleDescriptor passed
|
|
// to DependencyResolutionInterface.update, which is an
|
|
// IvySbt#Module (seems DependencyResolutionInterface.moduleDescriptor
|
|
// is ignored).
|
|
"org.scala-sbt" %% "librarymanagement-ivy" % "1.3.1",
|
|
"org.scalatest" %% "scalatest" % "3.1.1" % Test
|
|
)
|
|
)
|
|
|
|
lazy val `lm-coursier-shaded` = project
|
|
.in(file("modules/lm-coursier/target/shaded-module"))
|
|
.enablePlugins(ShadingPlugin)
|
|
.settings(
|
|
shared,
|
|
Mima.settings,
|
|
Mima.lmCoursierFilters,
|
|
Mima.lmCoursierShadedFilters,
|
|
unmanagedSourceDirectories.in(Compile) := unmanagedSourceDirectories.in(Compile).in(`lm-coursier`).value,
|
|
shading,
|
|
shadingNamespace := "lmcoursier.internal.shaded",
|
|
shadeNamespaces ++= Set(
|
|
"coursier",
|
|
"shapeless",
|
|
"argonaut",
|
|
"org.fusesource",
|
|
"macrocompat",
|
|
"io.github.alexarchambault.windowsansi"
|
|
),
|
|
libraryDependencies ++= Seq(
|
|
"io.get-coursier" %% "coursier" % coursierVersion0 % "shaded",
|
|
"io.github.alexarchambault" %% "data-class" % "0.2.1" % Provided,
|
|
"org.scala-lang.modules" %% "scala-xml" % "1.2.0", // depending on that one so that it doesn't get shaded
|
|
"org.scala-sbt" %% "librarymanagement-ivy" % "1.3.1",
|
|
"org.scalatest" %% "scalatest" % "3.1.1" % Test
|
|
),
|
|
packageBin.in(Shading) := {
|
|
val jar = packageBin.in(Shading).value
|
|
Check.onlyNamespace("lmcoursier", jar)
|
|
jar
|
|
}
|
|
)
|
|
|
|
lazy val `sbt-coursier-shared` = project
|
|
.in(file("modules/sbt-coursier-shared"))
|
|
.disablePlugins(MimaPlugin)
|
|
.dependsOn(`lm-coursier`)
|
|
.settings(
|
|
plugin,
|
|
generatePropertyFile,
|
|
libraryDependencies += "com.lihaoyi" %% "utest" % "0.7.4" % Test,
|
|
testFrameworks += new TestFramework("utest.runner.Framework")
|
|
)
|
|
|
|
lazy val `sbt-coursier-shared-shaded` = project
|
|
.in(file("modules/sbt-coursier-shared/target/shaded-module"))
|
|
.disablePlugins(MimaPlugin)
|
|
.dependsOn(`lm-coursier-shaded`)
|
|
.settings(
|
|
plugin,
|
|
generatePropertyFile,
|
|
unmanagedSourceDirectories.in(Compile) := unmanagedSourceDirectories.in(Compile).in(`sbt-coursier-shared`).value
|
|
)
|
|
|
|
lazy val `sbt-lm-coursier` = project
|
|
.in(file("modules/sbt-lm-coursier"))
|
|
.enablePlugins(ScriptedPlugin)
|
|
.disablePlugins(MimaPlugin)
|
|
.dependsOn(`sbt-coursier-shared-shaded`)
|
|
.settings(
|
|
plugin,
|
|
sbtTestDirectory := sbtTestDirectory.in(`sbt-coursier`).value,
|
|
scriptedDependencies := {
|
|
scriptedDependencies.value
|
|
|
|
// TODO Get those automatically
|
|
// (but shouldn't scripted itself handle that…?)
|
|
publishLocal.in(`lm-coursier-shaded`).value
|
|
publishLocal.in(`sbt-coursier-shared-shaded`).value
|
|
}
|
|
)
|
|
|
|
lazy val `sbt-coursier` = project
|
|
.in(file("modules/sbt-coursier"))
|
|
.enablePlugins(ScriptedPlugin)
|
|
.disablePlugins(MimaPlugin)
|
|
.dependsOn(`sbt-coursier-shared`)
|
|
.settings(
|
|
plugin,
|
|
scriptedDependencies := {
|
|
scriptedDependencies.value
|
|
|
|
// TODO Get dependency projects automatically
|
|
// (but shouldn't scripted itself handle that…?)
|
|
publishLocal.in(`lm-coursier`).value
|
|
publishLocal.in(`sbt-coursier-shared`).value
|
|
}
|
|
)
|
|
|
|
lazy val `sbt-pgp-coursier` = project
|
|
.in(file("modules/sbt-pgp-coursier"))
|
|
.enablePlugins(ScriptedPlugin)
|
|
.disablePlugins(MimaPlugin)
|
|
.dependsOn(`sbt-coursier`)
|
|
.settings(
|
|
plugin,
|
|
libraryDependencies += {
|
|
val sbtv = CrossVersion.binarySbtVersion(sbtVersion.in(pluginCrossBuild).value)
|
|
val sv = scalaBinaryVersion.value
|
|
val ver = "1.1.2-1"
|
|
Defaults.sbtPluginExtra("com.jsuereth" % "sbt-pgp" % ver, sbtv, sv)
|
|
},
|
|
scriptedDependencies := {
|
|
scriptedDependencies.value
|
|
// TODO Get dependency projects automatically
|
|
scriptedDependencies.in(`sbt-coursier`).value
|
|
}
|
|
)
|
|
|
|
lazy val `sbt-shading` = project
|
|
.in(file("modules/sbt-shading"))
|
|
.enablePlugins(ScriptedPlugin)
|
|
.disablePlugins(MimaPlugin)
|
|
.dependsOn(`sbt-coursier`)
|
|
.settings(
|
|
plugin,
|
|
libraryDependencies += ("ch.epfl.scala" % "jarjar" % "1.7.2-patched")
|
|
.exclude("org.apache.maven", "maven-plugin-api")
|
|
.exclude("org.apache.ant", "ant"),
|
|
scriptedDependencies := {
|
|
scriptedDependencies.value
|
|
// TODO Get dependency projects automatically
|
|
scriptedDependencies.in(`sbt-coursier`).value
|
|
}
|
|
)
|
|
|
|
lazy val `sbt-coursier-root` = project
|
|
.in(file("."))
|
|
.disablePlugins(MimaPlugin)
|
|
.aggregate(
|
|
`lm-coursier`,
|
|
`lm-coursier-shaded`,
|
|
`sbt-coursier`,
|
|
`sbt-coursier-shared`,
|
|
`sbt-coursier-shared-shaded`,
|
|
`sbt-lm-coursier`,
|
|
`sbt-pgp-coursier`,
|
|
`sbt-shading`
|
|
)
|
|
.settings(
|
|
shared,
|
|
skip.in(publish) := true
|
|
)
|
|
|