@@ -4,28 +4,51 @@ organization := "com.github.celadari"
44
55homepage := Some (url(" https://github.com/celadari/json-logic-scala" ))
66
7- version := " 1.1 .0"
7+ version := " 2.0 .0"
88
9- scalaVersion := " 2.10.7 "
9+ scalaVersion := " 2.13.2 "
1010
11- crossScalaVersions := Seq (" 2.10.7 " , " 2. 11.12" , " 2.12.6 " , " 2.13.1 " )
11+ crossScalaVersions := Seq (" 2.11.12" , " 2.12.13 " , " 2.13.2 " )
1212
1313resolvers ++= Seq (
1414 " sonatype-snapshots" at " https://oss.sonatype.org/content/repositories/snapshots" ,
15- " sonatype-releases" at " https://oss.sonatype.org/content/repositories/releases"
15+ " sonatype-releases" at " https://oss.sonatype.org/content/repositories/releases" ,
1616)
1717
18- val typeSafeVersions = Map (" 2.10" -> " 2.6.14" , " 2.11" -> " 2.7.4" , " 2.12" -> " 2.8.1" , " 2.13" -> " 2.8.1" )
18+ // This forbids including Scala related libraries into the dependency
19+ autoScalaLibrary := false
20+
21+ // scalastyle:off magic.number
1922def resolveVersion (scalaV : String , versionsResolver : Map [String , String ]): String = versionsResolver(scalaV.slice(0 , 4 ))
2023
21- libraryDependencies ++= {
22- Seq (
23- " org.scala-lang" % " scala-compiler" % scalaVersion.value,
24- " com.typesafe.play" %% " play-json" % resolveVersion(scalaVersion.value, typeSafeVersions)
25- )
26- }
24+ val typeSafeVersions = Map (" 2.10" -> " 2.6.14" , " 2.11" -> " 2.7.4" , " 2.12" -> " 2.8.1" , " 2.13" -> " 2.8.1" )
25+
26+ libraryDependencies ++= Seq (
27+ " com.typesafe.play" %% " play-json" % resolveVersion(scalaVersion.value, typeSafeVersions),
28+ " org.apache.xbean" % " xbean-finder" % " 4.20" ,
29+ " org.apache.xbean" % " xbean-reflect" % " 4.20" ,
30+ " org.scalatest" %% " scalatest" % " 3.2.9" % Test
31+ )
32+
33+ // scalacOptions ++= ("-feature" :: "-language:postfixOps" :: "-language:implicitConversions" :: Nil)
34+ scalacOptions ++= Seq (
35+ " -encoding" , " utf8" ,
36+ " -deprecation" ,
37+ " -feature" ,
38+ " -language:higherKinds" ,
39+ if (Set (" 2.12" , " 2.13" ).contains(scalaVersion.value.slice(0 , 4 ))) " -Ywarn-unused:imports" else " -Ywarn-unused-import" ,
40+ if (Set (" 2.11" , " 2.12" ).contains(scalaVersion.value.slice(0 , 4 ))) " -Xmax-classfile-name" else " " ,
41+ if (Set (" 2.11" , " 2.12" ).contains(scalaVersion.value.slice(0 , 4 ))) " 128" else " " ,
42+ " -language:existentials" ,
43+ if (scalaVersion.value.slice(0 , 4 ) == " 2.11" ) " -Xfatal-warnings"
44+ else if (scalaVersion.value.slice(0 , 4 ) == " 2.12" ) " "
45+ else " -Werror"
46+ )
2747
28- scalacOptions ++= (" -feature" :: " -language:postfixOps" :: " -language:implicitConversions" :: Nil )
48+ Test / testOptions += Tests .Argument (" -oGK" )
49+
50+ // scalastyle unit test configuration
51+ Test / scalastyleConfig := baseDirectory.value / " scalastyle-test-config.xml"
2952
3053// Publishing stuff for sonatype
3154publishTo := {
@@ -37,13 +60,13 @@ publishConfiguration := publishConfiguration.value.withOverwrite(true)
3760
3861credentials += Credentials (Path .userHome / " .sbt" / " .credentials" )
3962
40- publishArtifact in Test := false
63+ Test / publishArtifact := false
4164
4265publishMavenStyle := true
4366
4467pomIncludeRepository := { _ => false }
4568
46- pomExtra := (
69+ pomExtra :=
4770 <scm >
4871 <url >git@ github.com: celadari/ json- logic- scala.git</url >
4972 <connection >scm: git: git@ github.com: celadari/ json- logic- scala.git</connection >
@@ -55,11 +78,7 @@ pomExtra := (
5578 <url >https:// github.com/ celadari</url >
5679 </developer >
5780 </developers >
58- )
59-
60- licenses += (" MIT" , url(" http://mit-license.org/" ))
6181
62- // Scaladoc publishing stuff
63- enablePlugins(GhpagesPlugin , SiteScaladocPlugin )
82+ licenses += (" MIT" , url(" https://mit-license.org/" ))
6483
65- git.remoteRepo := " git@github.com:celadari/json-logic-scala.git "
84+ // Scaladoc publishing stuff
0 commit comments