@@ -4,20 +4,45 @@ import app.softnetwork.*
44// Defaults
55// ///////////////////////////////
66
7+ lazy val scala213 = " 2.13.16"
8+ lazy val javacCompilerVersion = " 17"
9+ lazy val scalacCompilerOptions = Seq (
10+ " -deprecation" ,
11+ " -feature" ,
12+ " -target:jvm-1.8"
13+ )
14+
715ThisBuild / organization := " app.softnetwork"
816
917name := " elastic"
1018
11- ThisBuild / version := Versions .elasticSearch
19+ ThisBuild / version := " 9.0-SNAPSHOT " // Versions.elasticSearch
1220
13- ThisBuild / scalaVersion := " 2.12.18 "
21+ ThisBuild / scalaVersion := scala213
1422
15- ThisBuild / scalacOptions ++= Seq (" -deprecation" , " -feature" , " -target:jvm-1.8" , " -Ypartial-unification" )
23+ ThisBuild / dependencyOverrides ++= Seq (
24+ " com.fasterxml.jackson.module" %% " jackson-module-scala" % Versions .jackson,
25+ " com.github.jnr" % " jnr-ffi" % " 2.2.17" ,
26+ " com.github.jnr" % " jffi" % " 1.3.13" classifier " native" ,
27+ " org.lmdbjava" % " lmdbjava" % " 0.9.1" exclude(" org.slf4j" , " slf4j-api" ),
28+ )
29+
30+ lazy val moduleSettings = Seq (
31+ crossScalaVersions := Seq (scala213),
32+ scalacOptions ++= {
33+ CrossVersion .partialVersion(scalaVersion.value) match {
34+ case Some ((2 , 12 )) => scalacCompilerOptions :+ " -Ypartial-unification"
35+ case Some ((2 , 13 )) => scalacCompilerOptions
36+ case _ => Seq .empty
37+ }
38+ }
39+ )
1640
17- ThisBuild / javacOptions ++= Seq (" -source" , " 1.8 " , " -target" , " 1.8 " )
41+ ThisBuild / javacOptions ++= Seq (" -source" , javacCompilerVersion , " -target" , javacCompilerVersion )
1842
1943ThisBuild / resolvers ++= Seq (
2044 " Softnetwork Server" at " https://softnetwork.jfrog.io/artifactory/releases/" ,
45+ " Softnetwork Snapshots" at " https://softnetwork.jfrog.io/artifactory/snapshots/" ,
2146 " Maven Central Server" at " https://repo1.maven.org/maven2" ,
2247 " Typesafe Server" at " https://repo.typesafe.com/typesafe/releases"
2348)
@@ -32,6 +57,9 @@ val logging = Seq(
3257
3358val jacksonExclusions = Seq (
3459 ExclusionRule (organization = " com.fasterxml.jackson.core" ),
60+ ExclusionRule (organization = " com.fasterxml.jackson.dataformat" ),
61+ ExclusionRule (organization = " com.fasterxml.jackson.datatype" ),
62+ ExclusionRule (organization = " com.fasterxml.jackson.module" ),
3563 ExclusionRule (organization = " org.codehaus.jackson" )
3664)
3765
@@ -41,7 +69,7 @@ val json4s = Seq(
4169).map(_.excludeAll(jacksonExclusions : _* ))
4270
4371ThisBuild / libraryDependencies ++= Seq (
44- " org.scala-lang.modules" %% " scala-parser-combinators" % " 1.1.1 "
72+ " org.scala-lang.modules" %% " scala-parser-combinators" % " 1.1.2 "
4573)// ++ configDependencies ++ json4s ++ logging
4674
4775ThisBuild / libraryDependencySchemes += " org.scala-lang.modules" %% " scala-xml" % VersionScheme .Always
@@ -54,21 +82,30 @@ lazy val sql = project.in(file("sql"))
5482
5583lazy val client = project.in(file(" client" ))
5684 .configs(IntegrationTest )
57- .settings(Defaults .itSettings)
85+ .settings(
86+ Defaults .itSettings,
87+ moduleSettings
88+ )
5889 .dependsOn(
5990 sql % " compile->compile;test->test;it->it"
6091 )
6192
6293lazy val persistence = project.in(file(" persistence" ))
6394 .configs(IntegrationTest )
64- .settings(Defaults .itSettings)
95+ .settings(
96+ Defaults .itSettings,
97+ moduleSettings
98+ )
6599 .dependsOn(
66100 client % " compile->compile;test->test;it->it"
67101 )
68102
69103lazy val java = project.in(file(" java" ))
70104 .configs(IntegrationTest )
71- .settings(Defaults .itSettings)
105+ .settings(
106+ Defaults .itSettings,
107+ moduleSettings
108+ )
72109 .dependsOn(
73110 persistence % " compile->compile;test->test;it->it"
74111 )
@@ -77,7 +114,8 @@ lazy val testKit = project.in(file("testkit"))
77114 .configs(IntegrationTest )
78115 .settings(
79116 Defaults .itSettings,
80- app.softnetwork.Info .infoSettings
117+ app.softnetwork.Info .infoSettings,
118+ moduleSettings
81119 )
82120 .enablePlugins(BuildInfoPlugin )
83121 .dependsOn(
@@ -86,5 +124,9 @@ lazy val testKit = project.in(file("testkit"))
86124
87125lazy val root = project.in(file(" ." ))
88126 .configs(IntegrationTest )
89- .settings(Defaults .itSettings, Publish .noPublishSettings)
127+ .settings(
128+ Defaults .itSettings,
129+ Publish .noPublishSettings,
130+ crossScalaVersions := Nil
131+ )
90132 .aggregate(sql, client, persistence, java, testKit)
0 commit comments