Skip to content

Commit

Permalink
Bump to sbt 0.13.13 (closes #106)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFradet committed Jan 20, 2017
1 parent 4600be4 commit 1496cdb
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 93 deletions.
33 changes: 33 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2012-2017 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the Apache License Version 2.0 is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Apache License Version 2.0 for the specific language governing permissions and
* limitations there under.
*/

lazy val root = project.in(file("."))
.settings(
name := "scala-forex",
version := "0.4.0",
description := "High-performance Scala library for performing currency conversions using Open Exchange Rates"
)
.settings(BuildSettings.buildSettings)
.settings(
libraryDependencies ++= Seq(
Dependencies.Libraries.jodaTime,
Dependencies.Libraries.jodaConvert,
Dependencies.Libraries.jodaMoney,
Dependencies.Libraries.jackson,
Dependencies.Libraries.collUtil,
Dependencies.Libraries.mockito,
Dependencies.Libraries.specs2
)
)
31 changes: 20 additions & 11 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,35 @@ object BuildSettings {

// Basic settings for our app
lazy val basicSettings = Seq[Setting[_]](
organization := "com.snowplowanalytics",
version := "0.4.0",
description := "High-performance Scala library for performing currency conversions using Open Exchange Rates",
scalaVersion := "2.10.6",
crossScalaVersions := Seq("2.10.6", "2.11.8"),
scalacOptions := Seq("-deprecation", "-encoding", "utf8"),
organization := "com.snowplowanalytics",
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.10.6", "2.11.8"),
scalacOptions := compilerOptions,
resolvers ++= Dependencies.resolutionRepos
)

lazy val compilerOptions = Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfuture",
"-Xlint"
)

// Publish settings
// TODO: update with ivy credentials etc when we start using Nexus
lazy val publishSettings = Seq[Setting[_]](
// Enables publishing to maven repo
publishMavenStyle := true,

publishTo <<= version { version =>
val basePath = "target/repo/%s".format {
if (version.trim.endsWith("SNAPSHOT")) "snapshots/" else "releases/"
}
publishTo := {
val basePath = "target/repo/%s".format { if (isSnapshot.value) "snapshots/" else "releases/" }
Some(Resolver.file("Local Maven repository", file(basePath)) transactional())
}
)
Expand Down
51 changes: 13 additions & 38 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,58 +29,33 @@ object Dependencies {
val jodaMoney = "0.9"
val jodaConvert = "1.2"
val jackson = "1.9.7"

// Scala
val scalaUtil = "0.1.0"
object collUtil {
val _29 = "5.3.10"
val _210 = "6.3.4"
val _211 = "6.23.0"
}
val scalaUtil = "0.1.0"
val collUtil = "6.34.0"

// Java (test only)
val mockito = "1.9.5"

// Scala (test only)
object specs2 {
val _29 = "1.12.4.1"
val _210 = "2.3.13"
val _211 = "2.3.13"
}
val specs2 = "2.3.13"
}

object Libraries {
// Java
val jodaTime = "joda-time" % "joda-time" % V.jodaTime
val jodaMoney = "org.joda" % "joda-money" % V.jodaMoney
val jodaConvert = "org.joda" % "joda-convert" % V.jodaConvert
val jackson = "org.codehaus.jackson" % "jackson-mapper-asl" % V.jackson
val jodaTime = "joda-time" % "joda-time" % V.jodaTime
val jodaMoney = "org.joda" % "joda-money" % V.jodaMoney
val jodaConvert = "org.joda" % "joda-convert" % V.jodaConvert
val jackson = "org.codehaus.jackson" % "jackson-mapper-asl" % V.jackson

// Scala
val scalaUtil = "com.snowplowanalytics" % "scala-util" % V.scalaUtil
object collUtil {
val _29 = "com.twitter" % "util-collection" % V.collUtil._29
val _210 = "com.twitter" %% "util-collection" % V.collUtil._210
val _211 = "com.twitter" %% "util-collection" % V.collUtil._211
}
val scalaUtil = "com.snowplowanalytics" %% "scala-util" % V.scalaUtil
val collUtil = "com.twitter" %% "util-collection" % V.collUtil

// Java (test only)
val mockito = "org.mockito" % "mockito-all" % V.mockito % "test"
val mockito = "org.mockito" % "mockito-all" % V.mockito % "test"

// Scala (test only)
object specs2 {
val _29 = "org.specs2" %% "specs2" % V.specs2._29 % "test"
val _210 = "org.specs2" %% "specs2" % V.specs2._210 % "test"
val _211 = "org.specs2" %% "specs2" % V.specs2._211 % "test"
}
val specs2 = "org.specs2" %% "specs2" % V.specs2 % "test"
}

def onVersion[A](all: Seq[A] = Seq(), on29: => Seq[A] = Seq(), on210: => Seq[A] = Seq(), on211: => Seq[A] = Seq()) =
scalaVersion(v => all ++ (if (v.contains("2.9.")) {
on29
} else if (v.contains("2.10.")) {
on210
} else {
on211
}))
}
}
43 changes: 0 additions & 43 deletions project/ScalaForexBuild.scala

This file was deleted.

2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.13.2
sbt.version=0.13.13

0 comments on commit 1496cdb

Please sign in to comment.