start ai module
This commit is contained in:
parent
ae33c50fcf
commit
ed8df40391
19
ai/src/main/Env.scala
Normal file
19
ai/src/main/Env.scala
Normal file
|
@ -0,0 +1,19 @@
|
|||
package lila.ai
|
||||
|
||||
import lila.common.PimpedConfig._
|
||||
|
||||
import akka.actor.ActorRef
|
||||
import com.typesafe.config.Config
|
||||
|
||||
final class Env(config: Config) {
|
||||
|
||||
private val settings = new {
|
||||
}
|
||||
import settings._
|
||||
}
|
||||
|
||||
object Env {
|
||||
|
||||
lazy val current = "[boot] ai" describes new Env(
|
||||
config = lila.common.PlayApp loadConfig "security")
|
||||
}
|
3
ai/src/main/package.scala
Normal file
3
ai/src/main/package.scala
Normal file
|
@ -0,0 +1,3 @@
|
|||
package lila
|
||||
|
||||
package object ai extends PackageObject with WithPlay
|
|
@ -2,6 +2,8 @@ import sbt._
|
|||
import Keys._
|
||||
import play.Project._
|
||||
|
||||
import net.virtualvoid.sbt.graph.{ Plugin ⇒ SbtGraphPlugin }
|
||||
|
||||
object ApplicationBuild extends Build {
|
||||
|
||||
import BuildSettings._
|
||||
|
@ -26,16 +28,20 @@ object ApplicationBuild extends Build {
|
|||
lazy val modules = Seq(
|
||||
chess, common, http, db, user, wiki, hub, websocket,
|
||||
message, notification, i18n, game, bookmark, search,
|
||||
gameSearch, timeline, forum, forumSearch, team, teamSearch)
|
||||
gameSearch, timeline, forum, forumSearch, team, teamSearch,
|
||||
ai)
|
||||
|
||||
lazy val moduleRefs = modules map projectToRef
|
||||
lazy val moduleCPDeps = moduleRefs map classpathDependency
|
||||
|
||||
lazy val api = project("api", moduleCPDeps).settings(
|
||||
libraryDependencies := provided(
|
||||
playApi, hasher, config, apache, csv, jgit,
|
||||
actuarius, scalastic, findbugs, reactivemongo)
|
||||
) aggregate (moduleRefs: _*)
|
||||
lazy val api = project("api", moduleCPDeps)
|
||||
.settings(SbtGraphPlugin.graphSettings: _*)
|
||||
.settings(
|
||||
libraryDependencies := provided(
|
||||
playApi, hasher, config, apache, csv, jgit,
|
||||
actuarius, scalastic, findbugs, reactivemongo),
|
||||
SbtGraphPlugin.filterScalaLibrary := true
|
||||
) aggregate (moduleRefs: _*)
|
||||
|
||||
lazy val common = project("common").settings(
|
||||
libraryDependencies ++= provided(playApi, playTest, reactivemongo, csv)
|
||||
|
@ -73,6 +79,10 @@ object ApplicationBuild extends Build {
|
|||
libraryDependencies ++= provided(playApi, reactivemongo, playReactivemongo, scalastic)
|
||||
)
|
||||
|
||||
lazy val ai = project("ai", Seq(common, hub, chess, game)).settings(
|
||||
libraryDependencies ++= provided(playApi)
|
||||
)
|
||||
|
||||
lazy val http = project("http", Seq(common)).settings(
|
||||
libraryDependencies ++= provided(playApi)
|
||||
)
|
||||
|
|
|
@ -31,6 +31,7 @@ object BuildSettings {
|
|||
file(name),
|
||||
dependencies = deps,
|
||||
settings = Seq(
|
||||
version := "1.0",
|
||||
libraryDependencies := defaultDeps
|
||||
) ++ buildSettings ++ srcMain
|
||||
)
|
||||
|
|
|
@ -1 +1 @@
|
|||
sbt.version=0.12.2
|
||||
sbt.version=0.12.3
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
// Comment to get more information during initialization
|
||||
logLevel := Level.Warn
|
||||
// logLevel := Level.Warn
|
||||
|
||||
// The Typesafe repository
|
||||
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
|
||||
// resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
|
||||
|
||||
// The Typesafe repository
|
||||
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
|
||||
|
||||
// Use the Play sbt plugin for Play projects
|
||||
addSbtPlugin("play" % "sbt-plugin" % "2.2-SNAPSHOT")
|
||||
|
||||
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.1")
|
||||
|
|
Loading…
Reference in a new issue