mirror of
				https://github.com/TheAnachronism/docspell.git
				synced 2025-10-31 09:30:12 +00:00 
			
		
		
		
	Add sbt header plugin
This commit is contained in:
		
							
								
								
									
										25
									
								
								build.sbt
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								build.sbt
									
									
									
									
									
								
							| @@ -2,6 +2,7 @@ import com.github.eikek.sbt.openapi._ | ||||
| import scala.sys.process._ | ||||
| import com.typesafe.sbt.SbtGit.GitKeys._ | ||||
| import docspell.build._ | ||||
| import de.heikoseeberger.sbtheader.CommentBlockCreator | ||||
|  | ||||
| val toolsPackage   = taskKey[Seq[File]]("Package the scripts/extension tools") | ||||
| val elmCompileMode = settingKey[ElmCompileMode]("How to compile elm sources") | ||||
| @@ -20,6 +21,13 @@ val scalafixSettings = Seq( | ||||
| val sharedSettings = Seq( | ||||
|   organization := "com.github.eikek", | ||||
|   scalaVersion := "2.13.6", | ||||
|   organizationName := "Docspell Contributors", | ||||
|   licenses += ("GPL-3.0-or-later", url( | ||||
|     "https://spdx.org/licenses/GPL-3.0-or-later.html" | ||||
|   )), | ||||
|   startYear := Some(2020), | ||||
|   headerLicenseStyle := HeaderLicenseStyle.SpdxSyntax, | ||||
|   headerSources / excludeFilter := HiddenFileFilter || "*.java" || "StringUtil.scala", | ||||
|   scalacOptions ++= Seq( | ||||
|     "-deprecation", | ||||
|     "-encoding", | ||||
| @@ -75,7 +83,13 @@ val elmSettings = Seq( | ||||
|     (Compile / sourceDirectory).value / "elm", | ||||
|     FileFilter.globFilter("*.elm"), | ||||
|     HiddenFileFilter | ||||
|   ) | ||||
|   ), | ||||
|   Compile / unmanagedSourceDirectories += (Compile / sourceDirectory).value / "elm", | ||||
|   headerSources / includeFilter := "*.elm", | ||||
|   headerMappings := headerMappings.value + (HeaderFileType("elm") -> HeaderCommentStyle( | ||||
|     new CommentBlockCreator("{-", " ", "-}"), | ||||
|     HeaderPattern.commentBetween("\\{\\-", " ", "\\-\\}") | ||||
|   )) | ||||
| ) | ||||
| val stylesSettings = Seq( | ||||
|   stylesMode := StylesMode.Dev, | ||||
| @@ -113,7 +127,7 @@ def webjarSettings(queryJS: Project) = Seq( | ||||
|  | ||||
| def debianSettings(cfgFile: String) = | ||||
|   Seq( | ||||
|     maintainer := "Eike Kettner <eike.kettner@posteo.de>", | ||||
|     maintainer := "Eike Kettner <eikek@posteo.de>", | ||||
|     Universal / mappings += { | ||||
|       val conf = (Compile / resourceDirectory).value / "reference.conf" | ||||
|       if (!conf.exists) | ||||
| @@ -788,8 +802,11 @@ addCommandAlias("make-pkg", ";clean ;make ;make-zip ;make-deb ;make-tools") | ||||
| addCommandAlias("ci", "make; lint; test") | ||||
| addCommandAlias( | ||||
|   "lint", | ||||
|   "restapi/openapiLint; joexapi/openapiLint; scalafmtSbtCheck; scalafmtCheckAll; Compile/scalafix --check; Test/scalafix --check" | ||||
|   "restapi/openapiLint; joexapi/openapiLint; headerCheck; scalafmtSbtCheck; scalafmtCheckAll; Compile/scalafix --check; Test/scalafix --check" | ||||
| ) | ||||
| addCommandAlias( | ||||
|   "fix", | ||||
|   "headerCreateAll; Compile/scalafix; Test/scalafix; scalafmtSbt; scalafmtAll" | ||||
| ) | ||||
| addCommandAlias("fix", "Compile/scalafix; Test/scalafix; scalafmtSbt; scalafmtAll") | ||||
| addCommandAlias("make-website", ";website/clean ;website/zolaBuild ;website/zolaCheck") | ||||
| addCommandAlias("publish-website", "website/publishToGitHubPages") | ||||
|   | ||||
| @@ -1,11 +1,12 @@ | ||||
| addSbtPlugin("ch.epfl.scala"      % "sbt-scalafix"             % "0.9.29") | ||||
| addSbtPlugin("com.eed3si9n"       % "sbt-buildinfo"            % "0.10.0") | ||||
| addSbtPlugin("com.github.eikek"   % "sbt-openapi-schema"       % "0.8.1") | ||||
| addSbtPlugin("com.github.sbt"     % "sbt-release"              % "1.1.0") | ||||
| addSbtPlugin("com.github.sbt"     % "sbt-pgp"                  % "2.1.2") | ||||
| addSbtPlugin("io.kevinlee"        % "sbt-github-pages"         % "0.5.0") | ||||
| addSbtPlugin("com.github.sbt"     % "sbt-release"              % "1.1.0") | ||||
| addSbtPlugin("com.typesafe.sbt"   % "sbt-git"                  % "1.0.1") | ||||
| addSbtPlugin("com.typesafe.sbt"   % "sbt-native-packager"      % "1.8.1") | ||||
| addSbtPlugin("de.heikoseeberger"  % "sbt-header"               % "5.6.0") | ||||
| addSbtPlugin("io.kevinlee"        % "sbt-github-pages"         % "0.5.0") | ||||
| addSbtPlugin("io.spray"           % "sbt-revolver"             % "0.9.1") | ||||
| addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") | ||||
| addSbtPlugin("org.scala-js"       % "sbt-scalajs"              % "1.6.0") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user