Skip to content

Commit

Permalink
Merge pull request #438 from scalacenter/add-headers-restructure-dir
Browse files Browse the repository at this point in the history
Add headers and move compiler interface
  • Loading branch information
eed3si9n committed Nov 16, 2017
2 parents d361251 + 0816162 commit f3d2b73
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 26 deletions.
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

0 comments on commit f3d2b73

Please sign in to comment.