File tree 2 files changed +34
-2
lines changed
2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change
1
+ package de .heikoseeberger .sbtheader
2
+
3
+ import sbt ._
4
+ import sbt .Keys ._
5
+ import sbt .plugins .JvmPlugin
6
+
7
+ object HeaderPlugin extends AutoPlugin {
8
+
9
+ final object autoImport {
10
+ class License
11
+ object HeaderLicense {
12
+ case class Custom (s : String ) extends License
13
+ }
14
+ val headerLicense : SettingKey [Option [License ]] = settingKey[Option [License ]](" header License" )
15
+
16
+ val headerSources = taskKey[scala.collection.Seq [File ]](" Sources which need headers checked or created." )
17
+
18
+ val headerResources = taskKey[scala.collection.Seq [File ]](" Resources which need headers checked or created." )
19
+
20
+ def headerSettings (configurations : Configuration * ): Seq [Setting [_]] =
21
+ configurations.foldLeft(List .empty[Setting [_]]) { _ ++ inConfig(_)(toBeScopedSettings) }
22
+ }
23
+
24
+ import autoImport ._
25
+
26
+ override def trigger = allRequirements
27
+
28
+ override def requires = JvmPlugin
29
+
30
+ override def projectSettings = headerSettings(Compile , Test )
31
+
32
+ private def toBeScopedSettings = Vector (headerSources := Nil , headerResources := Nil )
33
+
34
+ }
Original file line number Diff line number Diff line change @@ -29,5 +29,3 @@ libraryDependencies ++= Seq(
29
29
concurrentRestrictions in Global := Seq (
30
30
Tags .limitAll(1 ) // workaround for https://github.com/sbt/sbt/issues/2970
31
31
)
32
-
33
- addSbtPlugin(" de.heikoseeberger" % " sbt-header" % " 5.0.0" )
You can’t perform that action at this time.
0 commit comments