Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add headers and move compiler interface #438

Merged
merged 3 commits into from
Nov 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* 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.
*/

package xsbti;

import sbt.internal.inc.ReporterManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* 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.
*/

package sbt.internal.inc

import java.nio.file.Path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* 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.
*/

package sbt.internal.inc

import java.io.{ OutputStreamWriter, PrintStream, PrintWriter }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* 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.
*/

package xsbti.compile;

import sbt.internal.inc.ConcreteAnalysisContents;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* 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.
*/

package xsbti.compile;

import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* 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.
*/

package sbt.internal.inc

import xsbti.compile.{ AnalysisContents, CompileAnalysis, MiniSetup }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* 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.
*/

package xsbti.compile;

import xsbti.compile.analysis.ReadWriteMappers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* 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.
*/

package xsbti.compile.analysis;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
* 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.
*/

package sbt.internal.inc

import java.io.File
Expand Down
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
))
)
}
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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.10")
// addSbtPlugin("de.heikoseeberger" % "sbt-header" % "1.7.0")
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.12")
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