-
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.
* dropping Spark 2.4 support * strict use of sbt projectmatrix plugin, tohave cross-builds * basic settings moved to `project/Setup.scala` class * some move or project setup code to fall into logical areas
- Loading branch information
Showing
6 changed files
with
236 additions
and
161 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
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
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
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import sbt.Keys.javacOptions | ||
import sbt.TaskKey | ||
import sbtassembly.AssemblyKeys.assemblyMergeStrategy | ||
import sbtassembly.AssemblyPlugin.autoImport | ||
import sbtassembly.AssemblyPlugin.autoImport.{MergeStrategy, assembly} | ||
import sbtassembly.PathList | ||
|
||
/* | ||
* Copyright 2024 ABSA Group Limited | ||
* | ||
* Licensed 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. | ||
*/ | ||
|
||
|
||
object Setup { | ||
|
||
//supported Scala versions | ||
// val scala212 = Version.asSemVer("2.12.18") TODO | ||
// val scala213 = Version.asSemVer("2.13.11") | ||
val scala212 = "2.12.18" | ||
val scala213 = "2.13.11" | ||
|
||
val serviceScalaVersion: String = scala213 | ||
val clientSupportedScalaVersions: Seq[String] = Seq(scala212, scala213) | ||
|
||
val commonScalacOptions: Seq[String] = Seq("-unchecked", "-deprecation", "-feature", "-Xfatal-warnings") | ||
|
||
val serviceJavacOptions: Seq[String] = Seq("-source", "11", "-target", "11", "-Xlint") | ||
val serviceScalacOptions: Seq[String] = Seq("-release", "11", "-Ymacro-annotations") | ||
|
||
val clientJavacOptions: Seq[String] = Seq("-source", "1.8", "-target", "1.8", "-Xlint") | ||
def clientScalacOptions(scalaVersion: String): Seq[String] = { | ||
if (scalaVersion == scala213) { | ||
Seq("-release", "8", "-Ymacro-annotations") | ||
} else { | ||
Seq("-target", "8", "-release", "8") | ||
} | ||
} | ||
// val clientScalacOptions: Seq[String] = Seq("-Ymacro-annotations") | ||
|
||
val serverMergeStrategy = assembly / assemblyMergeStrategy := { | ||
case PathList("META-INF", "services", xs @ _*) => MergeStrategy.filterDistinctLines | ||
case PathList("META-INF", "maven", "org.webjars", "swagger-ui", "pom.properties") => MergeStrategy.singleOrError | ||
case PathList("META-INF", "resources", "webjars", "swagger-ui", _*) => MergeStrategy.singleOrError | ||
case PathList("META-INF", _*) => MergeStrategy.discard | ||
case PathList("META-INF", "versions", "9", xs@_*) => MergeStrategy.discard | ||
case PathList("module-info.class") => MergeStrategy.discard | ||
case "application.conf" => MergeStrategy.concat | ||
case "reference.conf" => MergeStrategy.concat | ||
case _ => MergeStrategy.first | ||
} | ||
} |
Oops, something went wrong.