mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-05 22:55:58 +00:00
ScalafmtAll to sbt files
This commit is contained in:
parent
3018fbc0b6
commit
9db3c70e3f
@ -38,7 +38,6 @@ object Dependencies {
|
|||||||
val JQueryVersion = "3.5.1"
|
val JQueryVersion = "3.5.1"
|
||||||
val ViewerJSVersion = "0.5.8"
|
val ViewerJSVersion = "0.5.8"
|
||||||
|
|
||||||
|
|
||||||
val calevCore = Seq(
|
val calevCore = Seq(
|
||||||
"com.github.eikek" %% "calev-core" % CalevVersion
|
"com.github.eikek" %% "calev-core" % CalevVersion
|
||||||
)
|
)
|
||||||
@ -59,10 +58,12 @@ object Dependencies {
|
|||||||
val poi = Seq(
|
val poi = Seq(
|
||||||
"org.apache.poi" % "poi" % PoiVersion,
|
"org.apache.poi" % "poi" % PoiVersion,
|
||||||
"org.apache.poi" % "poi-ooxml" % PoiVersion,
|
"org.apache.poi" % "poi-ooxml" % PoiVersion,
|
||||||
"org.apache.poi" % "poi-scratchpad" % PoiVersion,
|
"org.apache.poi" % "poi-scratchpad" % PoiVersion
|
||||||
).map(_.excludeAll(
|
).map(
|
||||||
|
_.excludeAll(
|
||||||
ExclusionRule("commons-logging")
|
ExclusionRule("commons-logging")
|
||||||
)) ++ jclOverSlf4j
|
)
|
||||||
|
) ++ jclOverSlf4j
|
||||||
|
|
||||||
// https://github.com/vsch/flexmark-java
|
// https://github.com/vsch/flexmark-java
|
||||||
// BSD 2-Clause
|
// BSD 2-Clause
|
||||||
@ -70,10 +71,12 @@ object Dependencies {
|
|||||||
"com.vladsch.flexmark" % "flexmark" % FlexmarkVersion,
|
"com.vladsch.flexmark" % "flexmark" % FlexmarkVersion,
|
||||||
"com.vladsch.flexmark" % "flexmark-ext-tables" % FlexmarkVersion,
|
"com.vladsch.flexmark" % "flexmark-ext-tables" % FlexmarkVersion,
|
||||||
"com.vladsch.flexmark" % "flexmark-ext-gfm-strikethrough" % FlexmarkVersion
|
"com.vladsch.flexmark" % "flexmark-ext-gfm-strikethrough" % FlexmarkVersion
|
||||||
).map(_.excludeAll(
|
).map(
|
||||||
|
_.excludeAll(
|
||||||
ExclusionRule("junit"),
|
ExclusionRule("junit"),
|
||||||
ExclusionRule("hamcrest-core")
|
ExclusionRule("hamcrest-core")
|
||||||
))
|
)
|
||||||
|
)
|
||||||
|
|
||||||
val twelvemonkeys = Seq(
|
val twelvemonkeys = Seq(
|
||||||
"com.twelvemonkeys.imageio" % "imageio-jpeg" % TwelveMonkeysVersion,
|
"com.twelvemonkeys.imageio" % "imageio-jpeg" % TwelveMonkeysVersion,
|
||||||
@ -81,30 +84,30 @@ object Dependencies {
|
|||||||
)
|
)
|
||||||
|
|
||||||
val pdfbox = Seq(
|
val pdfbox = Seq(
|
||||||
"org.apache.pdfbox" % "pdfbox" % PdfboxVersion excludeAll (
|
("org.apache.pdfbox" % "pdfbox" % PdfboxVersion).excludeAll(
|
||||||
ExclusionRule("org.bouncycastle"),
|
ExclusionRule("org.bouncycastle"),
|
||||||
ExclusionRule("commons-logging")
|
ExclusionRule("commons-logging")
|
||||||
)
|
)
|
||||||
) ++ jclOverSlf4j
|
) ++ jclOverSlf4j
|
||||||
|
|
||||||
val emilCommon = Seq(
|
val emilCommon = Seq(
|
||||||
"com.github.eikek" %% "emil-common" % EmilVersion,
|
"com.github.eikek" %% "emil-common" % EmilVersion
|
||||||
)
|
)
|
||||||
val emil = Seq(
|
val emil = Seq(
|
||||||
"com.github.eikek" %% "emil-common" % EmilVersion,
|
"com.github.eikek" %% "emil-common" % EmilVersion,
|
||||||
"com.github.eikek" %% "emil-javamail" % EmilVersion
|
"com.github.eikek" %% "emil-javamail" % EmilVersion
|
||||||
)
|
)
|
||||||
val emilDoobie = Seq(
|
val emilDoobie = Seq(
|
||||||
"com.github.eikek" %% "emil-doobie" % EmilVersion,
|
"com.github.eikek" %% "emil-doobie" % EmilVersion
|
||||||
)
|
)
|
||||||
val emilTnef = Seq(
|
val emilTnef = Seq(
|
||||||
"com.github.eikek" %% "emil-tnef" % EmilVersion,
|
"com.github.eikek" %% "emil-tnef" % EmilVersion
|
||||||
)
|
)
|
||||||
val emilMarkdown = Seq(
|
val emilMarkdown = Seq(
|
||||||
"com.github.eikek" %% "emil-markdown" % EmilVersion,
|
"com.github.eikek" %% "emil-markdown" % EmilVersion
|
||||||
)
|
)
|
||||||
val emilJsoup = Seq(
|
val emilJsoup = Seq(
|
||||||
"com.github.eikek" %% "emil-jsoup" % EmilVersion,
|
"com.github.eikek" %% "emil-jsoup" % EmilVersion
|
||||||
)
|
)
|
||||||
|
|
||||||
val jsoup = Seq(
|
val jsoup = Seq(
|
||||||
@ -112,7 +115,7 @@ object Dependencies {
|
|||||||
)
|
)
|
||||||
|
|
||||||
val stanfordNlpCore = Seq(
|
val stanfordNlpCore = Seq(
|
||||||
"edu.stanford.nlp" % "stanford-corenlp" % StanfordNlpVersion excludeAll(
|
("edu.stanford.nlp" % "stanford-corenlp" % StanfordNlpVersion).excludeAll(
|
||||||
ExclusionRule("com.io7m.xom", "xom"),
|
ExclusionRule("com.io7m.xom", "xom"),
|
||||||
ExclusionRule("javax.servlet", "javax.servlet-api"),
|
ExclusionRule("javax.servlet", "javax.servlet-api"),
|
||||||
ExclusionRule("org.apache.lucene", "lucene-queryparser"),
|
ExclusionRule("org.apache.lucene", "lucene-queryparser"),
|
||||||
@ -130,8 +133,11 @@ object Dependencies {
|
|||||||
)
|
)
|
||||||
|
|
||||||
val stanfordNlpModels = Seq(
|
val stanfordNlpModels = Seq(
|
||||||
"edu.stanford.nlp" % "stanford-corenlp" % StanfordNlpVersion classifier "models-german",
|
("edu.stanford.nlp" % "stanford-corenlp" % StanfordNlpVersion)
|
||||||
"edu.stanford.nlp" % "stanford-corenlp" % StanfordNlpVersion classifier "models-english"
|
.classifier("models-german"),
|
||||||
|
("edu.stanford.nlp" % "stanford-corenlp" % StanfordNlpVersion).classifier(
|
||||||
|
"models-english"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
val tika = Seq(
|
val tika = Seq(
|
||||||
@ -156,7 +162,7 @@ object Dependencies {
|
|||||||
val http4s = Seq(
|
val http4s = Seq(
|
||||||
"org.http4s" %% "http4s-blaze-server" % Http4sVersion,
|
"org.http4s" %% "http4s-blaze-server" % Http4sVersion,
|
||||||
"org.http4s" %% "http4s-circe" % Http4sVersion,
|
"org.http4s" %% "http4s-circe" % Http4sVersion,
|
||||||
"org.http4s" %% "http4s-dsl" % Http4sVersion,
|
"org.http4s" %% "http4s-dsl" % Http4sVersion
|
||||||
)
|
)
|
||||||
|
|
||||||
val http4sClient = Seq(
|
val http4sClient = Seq(
|
||||||
|
@ -27,21 +27,25 @@ object NerModelsPlugin extends AutoPlugin {
|
|||||||
|
|
||||||
import autoImport._
|
import autoImport._
|
||||||
|
|
||||||
def nerModelSettings: Seq[Setting[_]] = Seq(
|
def nerModelSettings: Seq[Setting[_]] =
|
||||||
|
Seq(
|
||||||
nerModelsFilter := (_ => false),
|
nerModelsFilter := (_ => false),
|
||||||
nerModelsRunFilter := {
|
nerModelsRunFilter := {
|
||||||
filterArtifacts(streams.value.log
|
filterArtifacts(
|
||||||
, Classpaths.managedJars(NerModels, Set("jar", "zip"), update.value)
|
streams.value.log,
|
||||||
, nerModelsFilter.value
|
Classpaths.managedJars(NerModels, Set("jar", "zip"), update.value),
|
||||||
, (Compile/resourceManaged).value)
|
nerModelsFilter.value,
|
||||||
|
(Compile / resourceManaged).value
|
||||||
|
)
|
||||||
},
|
},
|
||||||
Compile / resourceGenerators += nerModelsRunFilter.taskValue
|
Compile / resourceGenerators += nerModelsRunFilter.taskValue
|
||||||
)
|
)
|
||||||
|
|
||||||
def nerClassifierSettings: Seq[Setting[_]] = Seq(
|
def nerClassifierSettings: Seq[Setting[_]] =
|
||||||
|
Seq(
|
||||||
libraryDependencies ++= Dependencies.stanfordNlpModels.map(_ % NerModels),
|
libraryDependencies ++= Dependencies.stanfordNlpModels.map(_ % NerModels),
|
||||||
nerModelsFilter := {
|
nerModelsFilter := { name =>
|
||||||
name => nerModels.exists(name.endsWith)
|
nerModels.exists(name.endsWith)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -51,11 +55,16 @@ object NerModelsPlugin extends AutoPlugin {
|
|||||||
override def projectSettings: Seq[Setting[_]] =
|
override def projectSettings: Seq[Setting[_]] =
|
||||||
nerModelSettings
|
nerModelSettings
|
||||||
|
|
||||||
def filterArtifacts(logger: Logger, cp: Classpath, nameFilter: NameFilter, out: File): Seq[File] = {
|
def filterArtifacts(
|
||||||
|
logger: Logger,
|
||||||
|
cp: Classpath,
|
||||||
|
nameFilter: NameFilter,
|
||||||
|
out: File
|
||||||
|
): Seq[File] = {
|
||||||
logger.info(s"NerModels: Filtering artifacts...")
|
logger.info(s"NerModels: Filtering artifacts...")
|
||||||
cp.files.flatMap(f => {
|
cp.files.flatMap { f =>
|
||||||
IO.unzip(f, out, nameFilter)
|
IO.unzip(f, out, nameFilter)
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val nerModels = List(
|
private val nerModels = List(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user