Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Update dependency versions and cross-compile to Scala 2.12 #88

Open
wants to merge 2 commits into
base: scala2.11
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: scala
script: mvn test
scala:
- 2.11.8
- 2.12.1
jdk:
- oraclejdk8
services:
Expand Down
34 changes: 18 additions & 16 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
name := "amqp-client"

organization := "com.github.sstone"

version := "1.5-SNAPSHOT"

scalaVersion := "2.11.7"

scalacOptions ++= Seq("-feature", "-language:postfixOps")

scalaVersion := "2.12.1"

crossScalaVersions := Seq("2.11.8", "2.12.1")

scalacOptions ++= Seq("-feature", "-language:postfixOps")

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

libraryDependencies <<= scalaVersion { scala_version =>
val akkaVersion = "2.3.11"
Seq(
"com.rabbitmq" % "amqp-client" % "3.5.2",
"com.typesafe.akka" %% "akka-actor" % akkaVersion % "provided",
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion % "test",
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
"org.scalatest" %% "scalatest" % "2.2.5" % "test",
"ch.qos.logback" % "logback-classic" % "1.1.2" % "test",
"junit" % "junit" % "4.12" % "test"
)
libraryDependencies ++= {
val akkaVersion = "2.4.17"
Seq(
"com.rabbitmq" % "amqp-client" % "4.1.0",
"com.typesafe.akka" %% "akka-actor" % akkaVersion % "provided",
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion % "test",
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test",
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"ch.qos.logback" % "logback-classic" % "1.2.1" % "test",
"junit" % "junit" % "4.12" % "test"
)
}
1 change: 1 addition & 0 deletions project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=0.13.13
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositori

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")

addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.8")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.4")
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.github.sstone.amqp.ChannelOwner.NotConnectedError
import scala.concurrent.Await

@RunWith(classOf[JUnitRunner])
class ChannelOwnerSpec extends ChannelSpec {
class ChannelOwnerSpec extends ChannelSpec {
"ChannelOwner" should {

"implement basic error handling" in {
Expand Down
7 changes: 3 additions & 4 deletions src/test/scala/com/github/sstone/amqp/ChannelSpec.scala
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package com.github.sstone.amqp

import akka.testkit.{ImplicitSender, TestKit}
import akka.actor.{ActorRef, Props, ActorSystem}
import akka.actor.{ActorRef, ActorSystem, Props}
import akka.util.Timeout
import akka.pattern.{ask, gracefulStop}
import org.scalatest.{BeforeAndAfter, WordSpecLike}
import org.scalatest.matchers.ShouldMatchers
import org.scalatest.{BeforeAndAfter, Matchers, WordSpecLike}
import java.util.concurrent.TimeUnit
import scala.concurrent.Await
import scala.concurrent.duration._
import com.rabbitmq.client.ConnectionFactory
import com.github.sstone.amqp.Amqp._
import scala.util.Random

class ChannelSpec extends TestKit(ActorSystem("TestSystem")) with WordSpecLike with ShouldMatchers with BeforeAndAfter with ImplicitSender {
class ChannelSpec extends TestKit(ActorSystem("TestSystem")) with WordSpecLike with Matchers with BeforeAndAfter with ImplicitSender {
implicit val timeout = Timeout(5 seconds)
val connFactory = new ConnectionFactory()
val uri = system.settings.config.getString("amqp-client-test.rabbitmq.uri")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.github.sstone.amqp

import org.scalatest.matchers.ShouldMatchers
import org.scalatest.WordSpecLike
import org.scalatest.{Matchers, WordSpecLike}
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import akka.testkit.{ImplicitSender, TestKit, TestProbe}
Expand All @@ -10,13 +9,13 @@ import akka.pattern.gracefulStop
import akka.util.Timeout
import concurrent.duration._
import concurrent.Await
import com.rabbitmq.client.{ConnectionFactory, Address, Channel}
import com.rabbitmq.client.{Address, Channel, ConnectionFactory}
import Amqp._
import ConnectionOwner.{Connected, CreateChannel, Disconnected}
import java.util.concurrent.TimeUnit

@RunWith(classOf[JUnitRunner])
class ConnectionOwnerSpec extends TestKit(ActorSystem("TestSystem")) with WordSpecLike with ShouldMatchers with ImplicitSender {
class ConnectionOwnerSpec extends TestKit(ActorSystem("TestSystem")) with WordSpecLike with Matchers with ImplicitSender {
implicit val timeout = Timeout(5 seconds)

"ConnectionOwner" should {
Expand Down