1- name := " Json Logic Scala "
1+ name := " json-logic-scala "
22
33organization := " com.github.celadari"
44
55homepage := Some (url(" https://github.com/celadari/json-logic-scala" ))
66
7- version := " 0 .0.1-SNAPSHOT "
7+ version := " 1 .0.0 "
88
9- scalaVersion := " 2.11.12 "
9+ scalaVersion := " 2.10.7 "
1010
11- crossScalaVersions := Seq (" 2.10.3 " , " 2.11.12" , " 2.12.6" )
11+ crossScalaVersions := Seq (" 2.10.7 " , " 2.11.12" , " 2.12.6" , " 2.13.1 " )
1212
1313resolvers ++= Seq (
14- " sonatype-snapshots" at " http ://oss.sonatype.org/content/repositories/snapshots" ,
15- " sonatype-releases" at " http ://oss.sonatype.org/content/repositories/releases"
14+ " sonatype-snapshots" at " https ://oss.sonatype.org/content/repositories/snapshots" ,
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" )
19+ def resolveVersion (scalaV : String , versionsResolver : Map [String , String ]): String = versionsResolver(scalaV.slice(0 , 4 ))
20+
1821libraryDependencies ++= {
1922 Seq (
2023 " org.scala-lang" % " scala-compiler" % scalaVersion.value,
21- " com.typesafe.play" %% " play-json" % " 2.7.2"
22- // "org.scalatest" %% "scalatest" % "1.9.1" % "test",
23- // "org.scalacheck" %% "scalacheck" % "1.10.1" % "test"
24+ " com.typesafe.play" %% " play-json" % resolveVersion(scalaVersion.value, typeSafeVersions)
2425 )
2526}
2627
27- scalacOptions <<= scalaVersion map { v : String =>
28- val opts = " -deprecation" :: " -unchecked" :: Nil
29- if (v.startsWith(" 2.9." )) opts
30- else opts ++ (" -feature" :: " -language:postfixOps" :: " -language:implicitConversions" :: Nil )
31- }
28+ scalacOptions ++= (" -feature" :: " -language:postfixOps" :: " -language:implicitConversions" :: Nil )
3229
3330// Publishing stuff for sonatype
34- publishTo <<= version { _.endsWith(" SNAPSHOT" ) match {
35- case true => Some (" snapshots" at " https://oss.sonatype.org/content/repositories/snapshots" )
36- case false => Some (" releases" at " https://oss.sonatype.org/service/local/staging/deploy/maven2" )
37- }
31+ publishTo := {
32+ if (version.value.endsWith(" SNAPSHOT" )) Some (" snapshots" at " https://oss.sonatype.org/content/repositories/snapshots" )
33+ else Some (" releases" at " https://oss.sonatype.org/service/local/staging/deploy/maven2" )
3834}
3935
40- credentials += Credentials ( file(" sonatype.credentials" ) )
41-
42- publishMavenStyle := true
36+ credentials += Credentials (Path .userHome / " .sbt" / " .credentials" )
4337
4438publishArtifact in Test := false
4539
40+ publishMavenStyle := true
41+
4642pomIncludeRepository := { _ => false }
4743
4844pomExtra := (
@@ -61,36 +57,7 @@ pomExtra := (
6157
6258licenses += (" MIT" , url(" http://mit-license.org/" ))
6359
64- // OSGi Bundle stuff
65- osgiSettings
66-
67- OsgiKeys .bundleSymbolicName := " com.github.celadari.jsonlogicscala"
68-
69- OsgiKeys .exportPackage := Seq (" com.github.celadari.jsonlogicscala" ,
70- " com.github.celadari.jsonlogicscala.core" ,
71- " com.github.celadari.jsonlogicscala.operators"
72- )
73-
74- OsgiKeys .privatePackage := Seq ()
75-
76- OsgiKeys .bundleActivator := None
77-
78- // Scala bundle versions require special handling becuase of binary compatibility issues.
79- // This is a bit tricky because the published jars are versioned with more than just the Scala version.
80- // For example, 2.10.1 is versioned as 2.10.1.v20130302-092018-VFINAL-33e32179fd
81- OsgiKeys .requireBundle <<= (scalaVersion, crossScalaVersions) { (ver, crossVers) =>
82- val nextVer = crossVers.zip(crossVers.tail).find(_._1 == ver).map(_._2)
83- val langBundleVer =
84- if (ver.startsWith(" 2.10" )) " [2.10,2.11)" // All 2.10.x versions are binary-compatible
85- else " [" + ver+ " ," + nextVer.get+ " )" // The current version, up to but excluding the next version
86- Seq (" scala-library;bundle-version=\" " + langBundleVer+ " \" " )
87- }
88-
8960// Scaladoc publishing stuff
90- site.settings
91-
92- ghpages.settings
93-
94- git.remoteRepo := " git@github.com:celadari/json-logic-scala.git"
61+ enablePlugins(GhpagesPlugin , SiteScaladocPlugin )
9562
96- site.includeScaladoc()
63+ git.remoteRepo := " git@github.com:celadari/json-logic-scala.git "
0 commit comments