Format the build

This commit is contained in:
Dale Wijnand 2017-06-23 17:58:00 +01:00
parent 58956d1c58
commit f63306140e
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
2 changed files with 42 additions and 36 deletions

View File

@ -247,12 +247,14 @@ lazy val commandProj = (project in file("main-command"))
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats
)
.configure(addSbtCompilerInterface,
addSbtIO,
addSbtUtilLogging,
addSbtUtilCompletion,
addSbtCompilerClasspath,
addSbtLm)
.configure(
addSbtCompilerInterface,
addSbtIO,
addSbtUtilLogging,
addSbtUtilCompletion,
addSbtCompilerClasspath,
addSbtLm
)
// The core macro project defines the main logic of the DSL, abstracted
// away from several sbt implementators (tasks, settings, et cetera).
@ -315,12 +317,14 @@ lazy val mainProj = (project in file("main"))
baseDirectory.value / "src" / "main" / "contraband-scala",
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala"
)
.configure(addSbtCompilerInterface,
addSbtIO,
addSbtUtilLogging,
addSbtUtilLogic,
addSbtLm,
addSbtZincCompile)
.configure(
addSbtCompilerInterface,
addSbtIO,
addSbtUtilLogging,
addSbtUtilLogic,
addSbtLm,
addSbtZincCompile
)
// Strictly for bringing implicits and aliases from subsystems into the top-level sbt namespace through a single package object
// technically, we need a dependency on all of mainProj's dependencies, but we don't do that since this is strictly an integration project
@ -406,16 +410,14 @@ def otherRootSettings =
aggregate in bintrayRelease := false
) ++ inConfig(Scripted.RepoOverrideTest)(
Seq(
scriptedPrescripted := { _ =>
()
},
scriptedLaunchOpts := {
List("-Xmx1500M",
"-Xms512M",
"-server",
"-Dsbt.override.build.repos=true",
s"""-Dsbt.repository.config=${scriptedSource.value / "repo.config"}""")
},
scriptedPrescripted := (_ => ()),
scriptedLaunchOpts := List(
"-Xmx1500M",
"-Xms512M",
"-server",
"-Dsbt.override.build.repos=true",
s"""-Dsbt.repository.config=${scriptedSource.value / "repo.config"}"""
),
scripted := scriptedTask.evaluated,
scriptedUnpublished := scriptedUnpublishedTask.evaluated,
scriptedSource := (sourceDirectory in sbtProj).value / "repo-override-test"
@ -449,15 +451,17 @@ lazy val safeProjects: ScopeFilter = ScopeFilter(
)
lazy val otherUnitTests = taskKey[Unit]("Unit test other projects")
lazy val otherProjects: ScopeFilter = ScopeFilter(
inProjects(testingProj,
testAgentProj,
taskProj,
scriptedSbtProj,
scriptedPluginProj,
commandProj,
mainSettingsProj,
mainProj,
sbtProj),
inProjects(
testingProj,
testAgentProj,
taskProj,
scriptedSbtProj,
scriptedPluginProj,
commandProj,
mainSettingsProj,
mainProj,
sbtProj
),
inConfigurations(Test)
)

View File

@ -57,11 +57,13 @@ object Dependencies {
lazy val sbtLmPath = getSbtModulePath("sbtlm.path", "sbt/lm")
lazy val sbtZincPath = getSbtModulePath("sbtzinc.path", "sbt/zinc")
def addSbtModule(p: Project,
path: Option[String],
projectName: String,
m: ModuleID,
c: Option[Configuration] = None) =
def addSbtModule(
p: Project,
path: Option[String],
projectName: String,
m: ModuleID,
c: Option[Configuration] = None
) =
path match {
case Some(f) =>
p dependsOn c.fold[ClasspathDep[ProjectReference]](ProjectRef(file(f), projectName))(