Skip to content

Commit

Permalink
Introduce core module for logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed May 6, 2024
1 parent c8c7952 commit f71a9ba
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 43 deletions.
101 changes: 58 additions & 43 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,65 +12,80 @@ inThisBuild(
)
)

val commonSettings = Seq(
scalacOptions ++= Seq(
"-explaintypes",
"-feature",
"-language:higherKinds",
"-language:implicitConversions",
"-language:postfixOps",
"-Ymacro-annotations",
// Warnings as errors!
// "-Xfatal-warnings",
// Linting options
"-unchecked",
"-Xcheckinit",
"-Xlint:adapted-args",
"-Xlint:constant",
"-Xlint:delayedinit-select",
"-Xlint:deprecation",
"-Xlint:inaccessible",
"-Xlint:infer-any",
"-Xlint:missing-interpolator",
"-Xlint:nullary-unit",
"-Xlint:option-implicit",
"-Xlint:package-object-classes",
"-Xlint:poly-implicit-overload",
"-Xlint:private-shadow",
"-Xlint:stars-align",
"-Xlint:type-parameter-shadow",
"-Wdead-code",
"-Wextra-implicit",
"-Wnumeric-widen",
"-Wunused:imports",
"-Wunused:locals",
"-Wunused:patvars",
"-Wunused:privates",
"-Wunused:implicits",
"-Wunused:params"
/* "-Wvalue-discard" */
)
)

lazy val core = project
.in(file("core"))
.settings(
commonSettings,
name := "lila-search",
libraryDependencies ++= Seq(
"com.github.ornicar" %% "scalalib" % "7.1.0",
"com.sksamuel.elastic4s" %% "elastic4s-client-esjava" % "7.17.4",
"com.typesafe.play" %% "play-json" % "2.9.4",
"com.typesafe.play" %% "play-json-joda" % "2.9.4"
)
)


lazy val app = project
.in(file("app"))
.enablePlugins(PlayScala)
.disablePlugins(PlayFilters)
.settings(
name := "lila-search",
organization := "org.lichess",
name := "lila-search",
commonSettings,
name := "core",
libraryDependencies ++= Seq(
"com.github.ornicar" %% "scalalib" % "7.1.0",
"com.sksamuel.elastic4s" %% "elastic4s-client-esjava" % "7.17.4",
"com.typesafe.play" %% "play-json" % "2.9.4",
"com.typesafe.play" %% "play-json-joda" % "2.9.4"
),
scalacOptions ++= Seq(
"-explaintypes",
"-feature",
"-language:higherKinds",
"-language:implicitConversions",
"-language:postfixOps",
"-Ymacro-annotations",
// Warnings as errors!
// "-Xfatal-warnings",
// Linting options
"-unchecked",
"-Xcheckinit",
"-Xlint:adapted-args",
"-Xlint:constant",
"-Xlint:delayedinit-select",
"-Xlint:deprecation",
"-Xlint:inaccessible",
"-Xlint:infer-any",
"-Xlint:missing-interpolator",
"-Xlint:nullary-unit",
"-Xlint:option-implicit",
"-Xlint:package-object-classes",
"-Xlint:poly-implicit-overload",
"-Xlint:private-shadow",
"-Xlint:stars-align",
"-Xlint:type-parameter-shadow",
"-Wdead-code",
"-Wextra-implicit",
"-Wnumeric-widen",
"-Wunused:imports",
"-Wunused:locals",
"-Wunused:patvars",
"-Wunused:privates",
"-Wunused:implicits",
"-Wunused:params"
/* "-Wvalue-discard" */
),

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator
)
).dependsOn(core)


lazy val root = project
.in(file("."))
.aggregate(app)
.aggregate(core, app)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f71a9ba

Please sign in to comment.