Skip to content

Commit

Permalink
Merge pull request #239 from ihostage/header-plugin
Browse files Browse the repository at this point in the history
Change copyright
  • Loading branch information
mkurz authored Nov 1, 2023
2 parents 8d7ca67 + 1810174 commit b688346
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!--- Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com> -->

# Play File Watch Library

[![Twitter Follow](https://img.shields.io/twitter/follow/playframework?label=follow&style=flat&logo=twitter&color=brightgreen)](https://twitter.com/playframework)
Expand Down
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

import com.typesafe.tools.mima.core.DirectMissingMethodProblem

import com.typesafe.tools.mima.core.MissingClassProblem
Expand Down Expand Up @@ -36,12 +38,13 @@ lazy val `play-file-watch` = project
.getOrElse(throw new Error("Unable to determine previous version"))
),
mimaBinaryIssueFilters ++= Seq(
)
),
)

addCommandAlias(
"validateCode",
List(
"headerCheckAll",
"scalafmtSbtCheck",
"scalafmtCheckAll",
).mkString(";")
Expand Down
36 changes: 32 additions & 4 deletions project/Common.scala
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
import Dependencies._
/*
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

import sbt.Keys._
import sbt._
import Dependencies.*
import sbt.Keys.*
import sbt.Def
import sbt.*
import sbt.plugins.JvmPlugin
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport.HeaderPattern.commentBetween
import de.heikoseeberger.sbtheader.CommentStyle
import de.heikoseeberger.sbtheader.FileType
import de.heikoseeberger.sbtheader.HeaderPlugin
import de.heikoseeberger.sbtheader.LineCommentCreator

object Common extends AutoPlugin {

import HeaderPlugin.autoImport._

override def trigger = noTrigger

override def requires = JvmPlugin
override def requires = JvmPlugin && HeaderPlugin

val repoName = "play-file-watch"

Expand Down Expand Up @@ -59,4 +70,21 @@ object Common extends AutoPlugin {
description := "Play File Watch Library. Watch files in a platform independent way."
)

override def projectSettings = Seq(
headerLicense := Some(
HeaderLicense.Custom(
"Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>"
)
),
headerMappings ++= Map(
FileType("sbt") -> HeaderCommentStyle.cppStyleLineComment,
FileType("properties") -> HeaderCommentStyle.hashLineComment,
FileType("md") -> CommentStyle(new LineCommentCreator("<!---", "-->"), commentBetween("<!---", "*", "-->"))
),
(Compile / headerSources) ++=
((baseDirectory.value ** ("*.properties" || "*.md" || "*.sbt"))
--- (baseDirectory.value ** "target" ** "*")).get ++
(baseDirectory.value / "project" ** "*.scala" --- (baseDirectory.value ** "target" ** "*")).get
)

}
1 change: 1 addition & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

import sbt._

object Dependencies {
Expand Down
2 changes: 2 additions & 0 deletions project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

sbt.version=1.9.7
9 changes: 6 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
// Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>

addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.dev.filewatch

import java.io.File
Expand Down
4 changes: 4 additions & 0 deletions src/main/scala/play/dev/filewatch/FileWatchService.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.dev.filewatch

import java.io.File
Expand Down
4 changes: 4 additions & 0 deletions src/main/scala/play/dev/filewatch/GlobalStaticVar.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.dev.filewatch

import scala.reflect.ClassTag
Expand Down
4 changes: 4 additions & 0 deletions src/main/scala/play/dev/filewatch/LoggerProxy.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.dev.filewatch

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.dev.filewatch

import java.io.File
Expand Down
4 changes: 4 additions & 0 deletions src/test/scala/play/dev/filewatch/FileWatchServiceSpec.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.dev.filewatch

import better.files._
Expand Down
4 changes: 4 additions & 0 deletions src/test/scala/play/dev/filewatch/GlobalStaticVarSpec.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (C) from 2022 The Play Framework Contributors <https://github.com/playframework>, 2011-2021 Lightbend Inc. <https://www.lightbend.com>
*/

package play.dev.filewatch

package play.runsupport
Expand Down

0 comments on commit b688346

Please sign in to comment.