-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathbuild.sbt
212 lines (178 loc) · 7.73 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
val nlpcraftVer = "1.0.0"
// Common libraries.
val scalaMajVer = "3"
val scalaMinVer = "2.2"
val log4jVer = "2.24.3"
val scalaLoggingVer = "3.9.5"
val orgAntlr4Ver = "4.13.0"
val jlineVer = "3.29.0"
val commonsIoVer = "2.18.0"
val commonsLang3Ver = "3.17.0"
val commonsCodecVer = "1.17.2"
val commonsCollectionsVer = "4.4"
val gsonVer = "2.12.1"
val apacheOpennlpVer = "2.5.3"
val jacksonVer = "2.18.2"
// Stanford project libraries.
val stanfordCoreNLPVer = "4.5.8"
// Examples libraries.
val languagetoolVer = "6.0"
val luceneAnalyzersCommonVer = "8.11.2"
ThisBuild / scalaVersion := s"$scalaMajVer.$scalaMinVer"
ThisBuild / version := nlpcraftVer
ThisBuild / organization := "org.apache"
ThisBuild / organizationName := "nlpcraft"
ThisBuild / description := "An open source API to convert natural language into actions."
ThisBuild / licenses := List("Apache-2.0" -> url("https://github.com/sbt/sbt/blob/develop/LICENSE"))
ThisBuild / homepage := Some(url("https://nlpcraft.apache.org/"))
ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/apache/incubator-nlpcraft"), "scm:[email protected]/apache/incubator-nlpcraft.git"))
ThisBuild / autoAPIMappings := true
ThisBuild / developers ++= List(
"aradzinski" -> "Aaron Radzinski ",
"skhdl" -> "Sergey Kamov"
).map {
case (username, fullName) => Developer(username, fullName, s"@$username", url(s"https://github.com/$username"))
}
lazy val libs = Seq(
"com.typesafe.scala-logging" % s"scala-logging_$scalaMajVer" % scalaLoggingVer,
"com.google.code.gson" % "gson" % gsonVer,
"commons-io" % "commons-io" % commonsIoVer,
"commons-codec" % "commons-codec" % commonsCodecVer,
"org.apache.commons" % "commons-collections4" % commonsCollectionsVer,
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % jacksonVer,
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVer,
"com.fasterxml.jackson.module" % "jackson-module-scala_3" % jacksonVer,
"org.antlr" % "antlr4-runtime" % orgAntlr4Ver,
"org.apache.opennlp" % "opennlp-tools" % apacheOpennlpVer,
"org.apache.logging.log4j" % "log4j-slf4j-impl" % log4jVer,
"org.apache.logging.log4j" % "log4j-api" % log4jVer,
"org.jline" % "jline-terminal" % jlineVer,
"org.scalatest" %% "scalatest" % "3.2.19" % "test"
)
val commonScalaDoc = Seq(
"-skip-by-regex:org.apache.nlpcraft.internal",
"-skip-by-regex:org.apache.nlpcraft.nlp.enrichers.tools",
"-project-footer", "Apache NLPCraft",
"-project-version", nlpcraftVer,
"-siteroot", ".",
"-doc-root-content", "scaladoc/docroot.md",
"-source-links:github://apache/incubator-nlpcraft/master",
"-social-links:github::https://github.com/apache/incubator-nlpcraft"
)
lazy val nlpcraft = (project in file("nlpcraft"))
.settings(
name := "NLPCraft",
version := nlpcraftVer,
// Scaladoc config.
Compile / doc / scalacOptions ++= commonScalaDoc,
// Dependencies.
libraryDependencies ++= libs,
libraryDependencies += "org.apache.commons" % "commons-lang3" % commonsLang3Ver
)
lazy val nlpcraftStanford = (project in file("nlpcraft-stanford"))
.dependsOn(nlpcraft)
.settings(
name := "NLPCraft Stanford",
version := nlpcraftVer,
// Scaladoc config.
Compile / doc / scalacOptions ++= commonScalaDoc,
// Dependencies.
libraryDependencies ++= libs,
libraryDependencies += "edu.stanford.nlp" % "stanford-corenlp" % stanfordCoreNLPVer,
libraryDependencies += "edu.stanford.nlp" % "stanford-corenlp" % stanfordCoreNLPVer classifier "models"
)
lazy val timeExample = (project in file("nlpcraft-examples/time"))
.dependsOn(nlpcraft)
.settings(
name := "NLPCraft Time Example",
version := nlpcraftVer,
// Scaladoc config.
Compile / doc / scalacOptions ++= commonScalaDoc,
// Dependencies.
libraryDependencies ++= libs
)
lazy val lightSwitchExample = (project in file("nlpcraft-examples/lightswitch"))
.dependsOn(nlpcraft)
.settings(
name := "NLPCraft LightSwitch Example",
version := nlpcraftVer,
// Scaladoc config.
Compile / doc / scalacOptions ++= commonScalaDoc,
// Dependencies.
libraryDependencies ++= libs
)
lazy val lightSwitchRuExample = (project in file("nlpcraft-examples/lightswitch-ru"))
.dependsOn(nlpcraft)
.settings(
name := "NLPCraft LightSwitch RU Example",
version := nlpcraftVer,
// Scaladoc config.
Compile / doc / scalacOptions ++= commonScalaDoc,
// Dependencies.
libraryDependencies ++= libs,
libraryDependencies += "org.apache.lucene" % "lucene-analyzers-common" % luceneAnalyzersCommonVer,
libraryDependencies += "org.languagetool" % "languagetool-core" % languagetoolVer,
libraryDependencies += "org.languagetool" % "language-ru" % languagetoolVer
)
lazy val lightSwitchFrExample = (project in file("nlpcraft-examples/lightswitch-fr"))
.dependsOn(nlpcraft)
.settings(
name := "NLPCraft LightSwitch FR Example",
version := nlpcraftVer,
// Scaladoc config.
Compile / doc / scalacOptions ++= commonScalaDoc,
// Dependencies.
libraryDependencies ++= libs,
libraryDependencies += "org.apache.lucene" % "lucene-analyzers-common" % luceneAnalyzersCommonVer,
libraryDependencies += "org.languagetool" % "languagetool-core" % languagetoolVer,
libraryDependencies += "org.languagetool" % "language-fr" % languagetoolVer
)
lazy val pizzeriaExample = (project in file("nlpcraft-examples/pizzeria"))
.dependsOn(nlpcraft, nlpcraftStanford)
.settings(
name := "NLPCraft Pizzeria Example",
version := nlpcraftVer,
// Scaladoc config.
Compile / doc / scalacOptions ++= commonScalaDoc,
// Dependencies.
libraryDependencies ++= libs
)
lazy val calculatorExample = (project in file("nlpcraft-examples/calculator"))
.dependsOn(nlpcraft, nlpcraftStanford)
.settings(
name := "NLPCraft Calculator Example",
version := nlpcraftVer,
// Scaladoc config.
Compile / doc / scalacOptions ++= commonScalaDoc,
// Dependencies.
libraryDependencies ++= libs
)
lazy val nlpcraftWithStanford = (project in file("."))
.enablePlugins(ScalaUnidocPlugin)
.aggregate(nlpcraft, nlpcraftStanford)
.settings(
name := "NLPCraft",
version := nlpcraftVer,
ScalaUnidoc / unidoc / unidocProjectFilter := inAnyProject -- inProjects(timeExample, lightSwitchExample, lightSwitchRuExample, lightSwitchFrExample, pizzeriaExample, calculatorExample),
// Scaladoc config.
Compile / doc / scalacOptions ++= commonScalaDoc,
libraryDependencies ++= libs,
libraryDependencies += "edu.stanford.nlp" % "stanford-corenlp" % stanfordCoreNLPVer,
libraryDependencies += "edu.stanford.nlp" % "stanford-corenlp" % stanfordCoreNLPVer classifier "models"
)