|
| 1 | +name := "Json Logic Scala" |
| 2 | + |
| 3 | +organization := "com.github.celadari" |
| 4 | + |
| 5 | +homepage := Some(url("https://github.com/celadari/json-logic-scala")) |
| 6 | + |
| 7 | +version := "0.0.1-SNAPSHOT" |
| 8 | + |
| 9 | +scalaVersion := "2.9.1" |
| 10 | + |
| 11 | +crossScalaVersions := Seq("2.9.1", "2.9.1-1", "2.9.2", "2.9.3", "2.10.3") |
| 12 | + |
| 13 | +resolvers ++= Seq( |
| 14 | + "sonatype-snapshots" at "http://oss.sonatype.org/content/repositories/snapshots", |
| 15 | + "sonatype-releases" at "http://oss.sonatype.org/content/repositories/releases" |
| 16 | +) |
| 17 | + |
| 18 | +libraryDependencies ++= { |
| 19 | + Seq( |
| 20 | +// "org.scalatest" %% "scalatest" % "1.9.1" % "test", |
| 21 | +// "org.scalacheck" %% "scalacheck" % "1.10.1" % "test" |
| 22 | + ) |
| 23 | +} |
| 24 | + |
| 25 | +scalacOptions <<= scalaVersion map { v: String => |
| 26 | + val opts = "-deprecation" :: "-unchecked" :: Nil |
| 27 | + if (v.startsWith("2.9.")) opts |
| 28 | + else opts ++ ("-feature" :: "-language:postfixOps" :: "-language:implicitConversions" :: Nil) |
| 29 | +} |
| 30 | + |
| 31 | +// Publishing stuff for sonatype |
| 32 | +publishTo <<= version { _.endsWith("SNAPSHOT") match { |
| 33 | + case true => Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots") |
| 34 | + case false => Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2") |
| 35 | + } |
| 36 | +} |
| 37 | + |
| 38 | +credentials += Credentials( file("sonatype.credentials") ) |
| 39 | + |
| 40 | +publishMavenStyle := true |
| 41 | + |
| 42 | +publishArtifact in Test := false |
| 43 | + |
| 44 | +pomIncludeRepository := { _ => false } |
| 45 | + |
| 46 | +pomExtra := ( |
| 47 | + <scm> |
| 48 | + <url>git@github.com:celadari/json-logic-scala.git</url> |
| 49 | + <connection>scm:git:git@github.com:celadari/json-logic-scala.git</connection> |
| 50 | + </scm> |
| 51 | + <developers> |
| 52 | + <developer> |
| 53 | + <id>celadari</id> |
| 54 | + <name>Charles-Edouard LADARI</name> |
| 55 | + <url>https://github.com/celadari</url> |
| 56 | + </developer> |
| 57 | + </developers> |
| 58 | + ) |
| 59 | + |
| 60 | +licenses += ("MIT", url("http://mit-license.org/")) |
| 61 | + |
| 62 | +// OSGi Bundle stuff |
| 63 | +osgiSettings |
| 64 | + |
| 65 | +OsgiKeys.bundleSymbolicName := "com.github.celadari.jsonlogicscala" |
| 66 | + |
| 67 | +OsgiKeys.exportPackage := Seq("com.github.celadari.jsonlogicscala") |
| 68 | + |
| 69 | +OsgiKeys.privatePackage := Seq() |
| 70 | + |
| 71 | +OsgiKeys.bundleActivator := None |
| 72 | + |
| 73 | +// Scala bundle versions require special handling becuase of binary compatibility issues. |
| 74 | +// This is a bit tricky because the published jars are versioned with more than just the Scala version. |
| 75 | +// For example, 2.10.1 is versioned as 2.10.1.v20130302-092018-VFINAL-33e32179fd |
| 76 | +OsgiKeys.requireBundle <<= (scalaVersion, crossScalaVersions) { (ver, crossVers) => |
| 77 | + val nextVer = crossVers.zip(crossVers.tail).find(_._1 == ver).map(_._2) |
| 78 | + val langBundleVer = |
| 79 | + if(ver.startsWith("2.10")) "[2.10,2.11)" // All 2.10.x versions are binary-compatible |
| 80 | + else if(ver.startsWith("2.9.3")) "[2.9.3,2.9.4)" // Special case for the last 2.9.x version at this time |
| 81 | + else "["+ver+","+nextVer.get+")" // The current version, up to but excluding the next version |
| 82 | + Seq("scala-library;bundle-version=\""+langBundleVer+"\"") |
| 83 | +} |
| 84 | + |
| 85 | +// Scaladoc publishing stuff |
| 86 | +site.settings |
| 87 | + |
| 88 | +ghpages.settings |
| 89 | + |
| 90 | +git.remoteRepo := "git@github.com:celadari/json-logic-scala.git" |
| 91 | + |
| 92 | +site.includeScaladoc() |
| 93 | + |
| 94 | +// Stuff for publicizing on http://ls.implicit.ly |
| 95 | +seq(lsSettings :_*) |
| 96 | + |
| 97 | +(LsKeys.tags in LsKeys.lsync) := Seq("awesome") |
| 98 | + |
| 99 | +(description in LsKeys.lsync) := "Json Logic Scala is the most awesome scala project available today" |
| 100 | + |
| 101 | +(LsKeys.ghUser in LsKeys.lsync) := Some("celadari") |
| 102 | + |
| 103 | +(LsKeys.ghRepo in LsKeys.lsync) := Some("json-logic-scala") |
| 104 | + |
| 105 | +(LsKeys.ghBranch in LsKeys.lsync) := Some("master") |
0 commit comments