Skip to content

Commit

Permalink
Fix #332: Add sbt-header back to the build
Browse files Browse the repository at this point in the history
  • Loading branch information
jvican committed Nov 14, 2017
1 parent e334903 commit 90da1fb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
46 changes: 22 additions & 24 deletions project/Header.scala
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
// import sbt._
// import Keys._
import sbt._
import Keys._

// import de.heikoseeberger.sbtheader.{ HeaderPlugin, HeaderPattern }
// import HeaderPlugin.autoImport._
import de.heikoseeberger.sbtheader.HeaderPlugin
import de.heikoseeberger.sbtheader.HeaderPlugin.{autoImport => SbtHeaderKeys}

// object CustomHeaderPlugin extends AutoPlugin {
// override def requires = plugins.JvmPlugin && HeaderPlugin
// override def trigger = allRequirements
object CustomHeaderPlugin extends AutoPlugin {
override def requires = plugins.JvmPlugin && HeaderPlugin
override def trigger = allRequirements
import SbtHeaderKeys.{HeaderFileType, HeaderCommentStyle, HeaderLicense}

// override def projectSettings = Seq(
// headers := Map(
// "scala" -> (HeaderPattern.cStyleBlockComment, copyrightText),
// "java" -> (HeaderPattern.cStyleBlockComment, copyrightText)
// )
// )

// val copyrightText =
// """|/*
// | * Zinc - The incremental compiler for Scala.
// | * Copyright 2011 - 2017, Lightbend, Inc.
// | * Copyright 2008 - 2010, Mark Harrah
// | * This software is released under the terms written in LICENSE.
// | */
// |
// |""".stripMargin
// }
override def projectSettings = Seq(
SbtHeaderKeys.headerMappings ++= Map(
HeaderFileType.scala -> HeaderCommentStyle.CStyleBlockComment,
HeaderFileType.java -> HeaderCommentStyle.CStyleBlockComment
),
SbtHeaderKeys.headerLicense := Some(HeaderLicense.Custom(
"""|Zinc - The incremental compiler for Scala.
|Copyright 2011 - 2017, Lightbend, Inc.
|Copyright 2008 - 2010, Mark Harrah
|This software is released under the terms written in LICENSE.
|""".stripMargin
))
)
}
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.27")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0-M1")
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.12")
// addSbtPlugin("de.heikoseeberger" % "sbt-header" % "1.7.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "3.0.2")
addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.3")
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.3.0")
addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.12-rc5")
Expand Down

0 comments on commit 90da1fb

Please sign in to comment.