-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4dd923b
commit 5bb3166
Showing
1 changed file
with
58 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,42 @@ | ||
// ***************************************************************************** | ||
// Build settings | ||
// ***************************************************************************** | ||
|
||
inThisBuild( | ||
Seq( | ||
organization := "de.heikoseeberger", | ||
organizationName := "Heiko Seeberger", | ||
startYear := Some(2015), | ||
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")), | ||
homepage := Some(url("https://github.com/sbt/sbt-header")), | ||
scmInfo := Some( | ||
ScmInfo( | ||
url("https://github.com/sbt/sbt-header"), | ||
"[email protected]:sbt/sbt-header.git" | ||
) | ||
), | ||
developers := List( | ||
Developer( | ||
"hseeberger", | ||
"Heiko Seeberger", | ||
"[email protected]", | ||
url("https://github.com/hseeberger") | ||
) | ||
), | ||
// scalaVersion defined by sbt | ||
scalacOptions ++= Seq( | ||
"-unchecked", | ||
"-deprecation", | ||
"-language:_", | ||
"-encoding", | ||
"UTF-8", | ||
"-Ywarn-unused:imports", | ||
), | ||
scalafmtOnCompile := true, | ||
dynverSeparator := "_", // the default `+` is not compatible with docker tags | ||
) | ||
) | ||
|
||
// ***************************************************************************** | ||
// Projects | ||
// ***************************************************************************** | ||
|
@@ -6,13 +45,30 @@ lazy val `sbt-header` = | |
project | ||
.in(file(".")) | ||
.enablePlugins(AutomateHeaderPlugin, SbtPlugin) | ||
.settings(settings) | ||
.settings(commonSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
library.scalaTest % Test, | ||
) | ||
), | ||
scriptedLaunchOpts ++= Seq( | ||
"-Xmx1024M", | ||
s"-Dplugin.version=${version.value}", | ||
), | ||
) | ||
|
||
// ***************************************************************************** | ||
// Project settings | ||
// ***************************************************************************** | ||
|
||
lazy val commonSettings = | ||
Seq( | ||
// Also (automatically) format build definition together with sources | ||
Compile / scalafmt := { | ||
val _ = (Compile / scalafmtSbt).value | ||
(Compile / scalafmt).value | ||
}, | ||
) | ||
|
||
// ***************************************************************************** | ||
// Library dependencies | ||
// ***************************************************************************** | ||
|
@@ -24,47 +80,3 @@ lazy val library = | |
} | ||
val scalaTest = "org.scalatest" %% "scalatest" % Version.scalaTest | ||
} | ||
|
||
// ***************************************************************************** | ||
// Settings | ||
// ***************************************************************************** | | ||
|
||
lazy val settings = | ||
commonSettings ++ | ||
scalafmtSettings ++ | ||
sbtScriptedSettings | ||
|
||
lazy val commonSettings = | ||
Seq( | ||
// scalaVersion from .travis.yml via sbt-travisci | ||
// scalaVersion := "2.12.3", | ||
organization := "de.heikoseeberger", | ||
organizationName := "Heiko Seeberger", | ||
startYear := Some(2015), | ||
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")), | ||
scalacOptions ++= Seq( | ||
"-unchecked", | ||
"-deprecation", | ||
"-language:_", | ||
"-target:jvm-1.8", | ||
"-encoding", | ||
"UTF-8", | ||
"-Ywarn-unused:imports", | ||
), | ||
Compile / unmanagedSourceDirectories := Seq((Compile / scalaSource).value), | ||
Test / unmanagedSourceDirectories := Seq((Test / scalaSource).value), | ||
) | ||
|
||
lazy val scalafmtSettings = | ||
Seq( | ||
scalafmtOnCompile := true, | ||
) | ||
|
||
lazy val sbtScriptedSettings = | ||
Seq( | ||
scriptedLaunchOpts ++= Seq( | ||
"-Xmx1024M", | ||
s"-Dplugin.version=${version.value}", | ||
), | ||
scriptedBufferLog := false, | ||
) |