sbt/build.sbt

71 lines
2.5 KiB
Plaintext
Raw Normal View History

2015-08-19 09:56:08 +02:00
import Dependencies._
import com.typesafe.tools.mima.core._, ProblemFilters._
2015-08-19 09:56:08 +02:00
def baseVersion = "0.1.0"
2015-08-19 09:56:08 +02:00
def internalPath = file("internal")
def commonSettings: Seq[Setting[_]] = Seq(
scalaVersion := scala210,
2015-08-19 09:56:08 +02:00
// publishArtifact in packageDoc := false,
resolvers += Resolver.typesafeIvyRepo("releases"),
resolvers += Resolver.sonatypeRepo("snapshots"),
2015-09-02 09:03:20 +02:00
resolvers += Resolver.bintrayRepo("sbt", "maven-releases"),
2015-08-19 09:56:08 +02:00
// concurrentRestrictions in Global += Util.testExclusiveRestriction,
testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-w", "1"),
javacOptions in compile ++= Seq("-target", "6", "-source", "6", "-Xlint", "-Xlint:-serial"),
2015-09-02 08:59:00 +02:00
incOptions := incOptions.value.withNameHashing(true),
2015-09-02 09:03:20 +02:00
crossScalaVersions := Seq(scala210, scala211),
2015-09-07 10:40:23 +02:00
resolvers += Resolver.sonatypeRepo("public"),
scalacOptions ++= Seq(
"-encoding", "utf8",
"-deprecation",
"-feature",
"-unchecked",
"-Xlint",
"-language:higherKinds",
"-language:implicitConversions",
"-Xfuture",
"-Yinline-warnings",
"-Xfatal-warnings",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard"),
previousArtifact := None, // Some(organization.value %% moduleName.value % "1.0.0"),
publishArtifact in Compile := true,
publishArtifact in Test := true
2015-08-19 09:56:08 +02:00
)
lazy val root = (project in file(".")).
aggregate(lm).
settings(
2015-09-02 08:59:00 +02:00
inThisBuild(Seq(
homepage := Some(url("https://github.com/sbt/librarymanagement")),
description := "Library management module for sbt",
scmInfo := Some(ScmInfo(url("https://github.com/sbt/librarymanagement"), "git@github.com:sbt/librarymanagement.git")),
bintrayPackage := "librarymanagement",
git.baseVersion := baseVersion
2015-09-02 08:59:00 +02:00
)),
2015-08-19 09:56:08 +02:00
commonSettings,
name := "LM Root",
2015-08-19 09:56:08 +02:00
publish := {},
2015-09-02 09:25:37 +02:00
publishLocal := {},
2015-09-07 10:40:23 +02:00
publishArtifact in Compile := false,
publishArtifact in Test := false,
2015-09-02 09:25:37 +02:00
publishArtifact := false
2015-08-19 09:56:08 +02:00
)
lazy val lm = (project in file("librarymanagement")).
settings(
commonSettings,
libraryDependencies ++= Seq(
utilLogging, (utilLogging % Test).classifier("tests"),
sbtIO, (sbtIO % Test).classifier("tests"),
utilTesting % Test,
Implement static launcher for sbt This is a combination of 13 commits. I squashed these 13 commits to make forward porting those changes easier, since some commit undo the changes of other commits. The PRs that include these changes can be found at https://github.com/sbt/sbt/pull/2564 and https://github.com/sbt/sbt/pull/2576. Static launcher, get bridge sources from resources This commit introduces a new "static" launcher that does not use Ivy to gather all the artifacts that it requires, but rather expect them to be immediately available. To be able to use sbt without Internet access, we add a new `ComponentCompiler` that is able to retrieve the bridge sources from the resources on classpath and compile it. Fix classpath issues in static launcher The launcher defines a top classloader that willbe used by all `ScalaInstance`s. Previously, this top classloader had a parent that contained the scala library 2.10, which prevented the correct compilation of the compiler bridge for scala 2.11. Also, we no longer need the scala-reflect JAR. Tests for FakeResolver Add `scala-reflect.jar` to JARs of `StaticScalaProvider` It turns out we need to have `scala-reflect.jar` on classpath to compile the compiler bridge for the static scala instance of the launcher. Comply to Ivy's specification in `FakeResolver` Remove `CompilerBridgeProvider` and `ResourceBridgeProvider` It turns out that we can leverage the`FakeResolver` that has been implemented to use with the static launcher, and resolve a "fake compiler bridge" using it, rather than copying it from the resources. This also has the advantage of not requiring to change the build definition. Fix NPE in FakeResolver Add compiler bridge sources to fake resolver This allows sbt to resolve the compiler bridge sources when using the static launcher Don't hardcode sbt version in static launcher Add scala compiler and library to fake resolver This allows us to still resolve them if we have no other resolver configured. Add `RepositoriesParser` This parser is used by the static launcher to parse the definition of resolvers that override the build resolvers. Support repositories override in static launcher The static launcher will now parse user-defined repositories like the usual launcher does. Specifically, the static launcher now uses the following configuration: - `sbt.boot.directory`: specifies the boot directory that sbt will use. Defaults to `~/.sbt/boot`. - `sbt.override.build.repos`: indicate whether we want to override the build resolvers. Defaults to false. - `sbt.repository.config`: specifies the path to the files that contains repositories definition. Defaults to `${sbt.boot.directory}/repositories`. Notes for sbt/sbt#2564 & sbt/sbt#2576
2016-04-06 11:52:51 +02:00
utilCollection, utilCompletion, ivy, jsch, sbtSerialization, scalaReflect.value, launcherInterface),
2015-09-02 09:03:20 +02:00
resourceGenerators in Compile <+= (version, resourceManaged, streams, compile in Compile) map Util.generateVersionFile,
name := "librarymanagement",
binaryIssueFilters ++= Seq(
)
2015-08-19 09:56:08 +02:00
)