-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add multiple builds for different language and functionality combinat…
…ions
- Loading branch information
Showing
3 changed files
with
162 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
/project/target/ | ||
/target/ | ||
/bin/ | ||
/build/ | ||
/dist/ | ||
/.cache | ||
/.classpath | ||
/.project | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,101 @@ | ||
name := """las""" | ||
|
||
version := "1.5.9" | ||
|
||
scalaVersion := "2.12.3" | ||
|
||
libraryDependencies ++= Seq( | ||
"fi.seco" % "lexicalanalysis" % "1.5.11", | ||
lazy val commonSettings = Seq( | ||
organization := "fi.seco", | ||
version := "1.5.14", | ||
scalaVersion := "2.12.4", | ||
libraryDependencies ++= Seq( | ||
"fi.seco" % "lexicalanalysis" % "1.5.14", | ||
"com.optimaize.languagedetector" % "language-detector" % "0.6", | ||
"com.github.scopt" %% "scopt" % "3.5.0", | ||
"com.typesafe.play" %% "play-json" % "2.6.0-M3", | ||
"com.typesafe.scala-logging" %% "scala-logging" % "3.5.0", | ||
"ch.qos.logback" % "logback-classic" % "1.2.2" % "runtime" | ||
), | ||
resolvers ++= Seq( | ||
"Local Maven Repository" at Path.userHome.asFile.toURI.toURL + ".m2/repository"), | ||
fork in run := true, | ||
) | ||
|
||
lazy val rootSettings = Seq( | ||
publishArtifact := false, | ||
publishArtifact in Test := false, | ||
) | ||
|
||
lazy val assemblySettings = Seq( | ||
test in assembly := {}, | ||
assemblyMergeStrategy in assembly := { | ||
case "is2/util/DB.class" => MergeStrategy.first | ||
case "fi/seco/lexical/hfst/resources.lst" => MergeStrategy.filterDistinctLines | ||
case other: Any => MergeStrategy.defaultMergeStrategy(other) | ||
}, | ||
mainClass in assembly := Some("LASCommandLineTool"), | ||
assemblyOption in assembly := (assemblyOption in assembly).value.copy(prependShellScript = Some(Seq("#!/usr/bin/env sh", """exec java -jar "$0" "$@"""" + "\n"))) | ||
) | ||
resolvers ++= Seq( | ||
"Local Maven Repository" at Path.userHome.asFile.toURI.toURL + ".m2/repository") | ||
|
||
fork in run := true | ||
lazy val main = project.in(file("build/main")) | ||
.settings(commonSettings:_*) | ||
.settings(scalaSource in Compile := baseDirectory.value / "../../src/main/scala") | ||
.disablePlugins(AssemblyPlugin) | ||
|
||
lazy val fiComplete = (project in file("build/las-fi")) | ||
.settings(commonSettings:_*) | ||
.settings(assemblySettings:_*) | ||
.dependsOn(main) | ||
.settings( | ||
name := "las-fi", | ||
libraryDependencies += "fi.seco" % "lexicalanalysis-resources-fi-complete" % "1.5.14", | ||
assemblyOutputPath in assembly := file("dist/las-fi") | ||
) | ||
|
||
lazy val fiSmall = (project in file("build/las-fi-small")) | ||
.settings(commonSettings:_*) | ||
.settings(assemblySettings:_*) | ||
.dependsOn(main) | ||
.settings( | ||
name := "las-fi-small", | ||
libraryDependencies += "fi.seco" % "lexicalanalysis-resources-fi-core" % "1.5.14", | ||
assemblyOutputPath in assembly := file("dist/las-fi-small") | ||
) | ||
|
||
lazy val other = (project in file("build/las-non-fi")) | ||
.settings(commonSettings:_*) | ||
.settings(assemblySettings:_*) | ||
.dependsOn(main) | ||
.settings( | ||
name := "las-non-fi", | ||
libraryDependencies += "fi.seco" % "lexicalanalysis-resources-other" % "1.5.14", | ||
assemblyOutputPath in assembly := file("dist/las-non-fi") | ||
) | ||
|
||
lazy val smallComplete = (project in file("build/las-small")) | ||
.settings(commonSettings:_*) | ||
.settings(assemblySettings:_*) | ||
.dependsOn(main) | ||
.settings( | ||
name := "las-complete", | ||
libraryDependencies ++= Seq( | ||
"fi.seco" % "lexicalanalysis-resources-fi-core" % "1.5.14", | ||
"fi.seco" % "lexicalanalysis-resources-other" % "1.5.14" | ||
), | ||
assemblyOutputPath in assembly := file("dist/las-small") | ||
) | ||
|
||
|
||
assemblyMergeStrategy in assembly := { | ||
case "is2/util/DB.class" => MergeStrategy.first | ||
case x => | ||
val oldStrategy = (assemblyMergeStrategy in assembly).value | ||
oldStrategy(x) | ||
} | ||
lazy val complete = (project in file("build/las-complete")) | ||
.settings(commonSettings:_*) | ||
.settings(assemblySettings:_*) | ||
.dependsOn(main) | ||
.settings( | ||
name := "las-complete", | ||
libraryDependencies ++= Seq( | ||
"fi.seco" % "lexicalanalysis-resources-fi-complete" % "1.5.14", | ||
"fi.seco" % "lexicalanalysis-resources-other" % "1.5.14" | ||
), | ||
assemblyOutputPath in assembly := file("dist/las") | ||
) | ||
|
||
assemblyOption in assembly := (assemblyOption in assembly).value.copy(prependShellScript = Some(Seq("#!/usr/bin/env sh", """exec java -jar -Xmx4G "$0" "$@"""" + "\n"))) | ||
lazy val las = project.in(file(".")) | ||
.settings(commonSettings:_*) | ||
.settings(rootSettings:_*) | ||
.disablePlugins(AssemblyPlugin) | ||
.aggregate(complete,fiSmall,fiComplete,other,smallComplete) | ||
|
||
assemblyJarName in assembly := "las" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters