Created
January 26, 2016 19:04
-
-
Save kermitas/fa127c742ddbd60080af to your computer and use it in GitHub Desktop.
File that holds Project settings (in SBT project structure).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
import Implicits._ | |
import SettingsScala.{ v210, v211 } | |
object ProjectLiftProblemMain { | |
val subProjectName = "main" | |
val mainClassFullyQualifiedName: Option[String] = Some("org.lift.problem.Main") | |
def apply(dependsOn: Project*)(implicit artifactConfig: ArtifactConfig) = settings(dependsOn: _*)(artifactConfig.copy(name = artifactConfig.name + "-" + subProjectName)) | |
protected def settings(dependsOn: Project*)(implicit artifactConfig: ArtifactConfig) = | |
Project( | |
id = artifactConfig.name, | |
base = file(artifactConfig.name), | |
aggregate = dependsOn, | |
dependencies = dependsOn, | |
delegates = dependsOn, | |
settings = SettingsCommon(artifactConfig, v211, v210) ++ | |
mainClassSettings(mainClassFullyQualifiedName) ++ | |
SettingsScalaLoggingSlf4J() ++ | |
SettingsLogback() | |
) | |
protected def mainClassSettings(mainClassFullyQualifiedName: Option[String]) = Seq( | |
mainClass in(Compile, run) := mainClassFullyQualifiedName | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment