diff --git a/bbb-fsesl-client/build.gradle b/bbb-fsesl-client/build.gradle deleted file mode 100755 index ad7449677b1d7cfcb3a84f1b5ad1a2b3524472c1..0000000000000000000000000000000000000000 --- a/bbb-fsesl-client/build.gradle +++ /dev/null @@ -1,72 +0,0 @@ -apply plugin: 'java' -apply plugin: 'eclipse' - -version = '0.9.0' -jar.enabled = true - -def appName = 'fs-esl-client' - -archivesBaseName = appName - -task resolveDeps(type: Copy) { - into('lib') - from configurations.default - from configurations.default.allArtifacts.file -} - - -artifacts { - archives jar -} - -repositories { - add(new org.apache.ivy.plugins.resolver.ChainResolver()) { - name = 'remote' - returnFirst = true - add(new org.apache.ivy.plugins.resolver.URLResolver()) { - name = "googlecode" - addArtifactPattern "http://red5.googlecode.com/svn/repository/[artifact](-[revision]).[ext]" - addArtifactPattern "http://red5.googlecode.com/svn/repository/[organisation]/[artifact](-[revision]).[ext]" - } - add(new org.apache.ivy.plugins.resolver.URLResolver()) { - name = "blindside-repos" - addArtifactPattern "http://blindside.googlecode.com/svn/repository/[artifact](-[revision]).[ext]" - addArtifactPattern "http://blindside.googlecode.com/svn/repository/[organisation]/[artifact](-[revision]).[ext]" - } - add(new org.apache.ivy.plugins.resolver.URLResolver()) { - name = "maven2-central" - m2compatible = true - addArtifactPattern "http://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact](-[revision]).[ext]" - addArtifactPattern "http://repo1.maven.org/maven2/[organisation]/[artifact]/[revision]/[artifact](-[revision]).[ext]" - } - add(new org.apache.ivy.plugins.resolver.URLResolver()) { - name = "netty-dependency" - m2compatible = true - addArtifactPattern "http://repository.jboss.org/nexus/content/groups/public-jboss/[organisation]/[module]/[revision]/[artifact](-[revision]).[ext]" - addArtifactPattern "http://repo1.maven.org/maven2/[organisation]/[artifact]/[revision]/[artifact](-[revision]).[ext]" - } - } - flatDir name: 'fileRepo', dirs: "/home/firstuser/dev/repo" -} - -dependencies { - // Logging - compile 'ch.qos.logback:logback-core:1.2.3@jar' - compile 'ch.qos.logback:logback-classic:1.2.3@jar' - compile 'org.slf4j:log4j-over-slf4j:1.7.25@jar' - compile 'org.slf4j:jcl-over-slf4j:1.7.25@jar' - compile 'org.slf4j:jul-to-slf4j:1.7.25@jar' - compile 'org.slf4j:slf4j-api:1.7.25@jar' - - testRuntime 'junit:junit:4.8.1.@jar' - compile 'org.jboss.netty:netty:3.2.10.Final@jar' -} - - -uploadArchives { - uploadDescriptor = false - repositories { - add project.repositories.fileRepo - } -} - diff --git a/bbb-fsesl-client/build.sbt b/bbb-fsesl-client/build.sbt index 6cc930898e0964d5da423f80eab0781b35b9b812..b3d4b559bbdbc3aa67f07e6152ba7ca96d604c07 100755 --- a/bbb-fsesl-client/build.sbt +++ b/bbb-fsesl-client/build.sbt @@ -1,10 +1,26 @@ -name := "bbb-fsesl-client" +import org.bigbluebutton.build._ description := "BigBlueButton custom FS-ESL client built on top of FS-ESL Java library." -organization := "org.bigbluebutton" - -version := "0.0.6" +version := "0.0.7" + +val compileSettings = Seq( + organization := "org.bigbluebutton", + + scalacOptions ++= List( + "-unchecked", + "-deprecation", + "-Xlint", + "-Ywarn-dead-code", + "-language:_", + "-target:jvm-1.8", + "-encoding", "UTF-8" + ), + javacOptions ++= List( + "-Xlint:unchecked", + "-Xlint:deprecation" + ) +) // We want to have our jar files in lib_managed dir. // This way we'll have the right path when we import @@ -15,14 +31,8 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console", testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports") -libraryDependencies ++= { - Seq( - "org.jboss.netty" % "netty" % "3.2.10.Final", - "junit" % "junit" % "4.12", - "ch.qos.logback" % "logback-classic" % "1.2.3" - )} - -seq(Revolver.settings: _*) +Seq(Revolver.settings: _*) +lazy val commonMessage = (project in file(".")).settings(name := "bbb-fsesl-client", libraryDependencies ++= Dependencies.runtime).settings(compileSettings) //----------- // Packaging diff --git a/bbb-fsesl-client/deploy.sh b/bbb-fsesl-client/deploy.sh index a5f14b0d75d69db2a5f3bfb38226a0f1f643c13d..fdfce32665453b90bcea6d522bcaf673fb56f93b 100644 --- a/bbb-fsesl-client/deploy.sh +++ b/bbb-fsesl-client/deploy.sh @@ -1,2 +1 @@ -sbt clean -sbt publish publishLocal +sbt clean publish publishLocal diff --git a/bbb-fsesl-client/project/Build.scala b/bbb-fsesl-client/project/Build.scala deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/bbb-fsesl-client/project/Dependencies.scala b/bbb-fsesl-client/project/Dependencies.scala new file mode 100644 index 0000000000000000000000000000000000000000..9da6506153827201f161ef66183863558c91b4f2 --- /dev/null +++ b/bbb-fsesl-client/project/Dependencies.scala @@ -0,0 +1,40 @@ +package org.bigbluebutton.build + +import sbt._ +import Keys._ + +object Dependencies { + + object Versions { + // Scala + val scala = "2.12.7" + + // Libraries + val netty = "3.2.10.Final" + val logback = "1.2.3" + + // Test + val junit = "4.12" + } + + object Compile { + val scalaLibrary = "org.scala-lang" % "scala-library" % Versions.scala + val scalaCompiler = "org.scala-lang" % "scala-compiler" % Versions.scala + + val netty = "org.jboss.netty" % "netty" % Versions.netty + val logback = "ch.qos.logback" % "logback-classic" % Versions.logback + } + + object Test { + val junit = "junit" % "junit" % Versions.junit % "test" + } + + val testing = Seq( + Test.junit) + + val runtime = Seq( + Compile.scalaLibrary, + Compile.scalaCompiler, + Compile.netty, + Compile.logback) ++ testing +} diff --git a/bbb-fsesl-client/project/build.properties b/bbb-fsesl-client/project/build.properties index a6e117b61042ee81c62ba3a0fc5210d9502944df..2e6e3d24608ee15e892ed3b16d84224f7667e808 100755 --- a/bbb-fsesl-client/project/build.properties +++ b/bbb-fsesl-client/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.8 +sbt.version=1.2.6 \ No newline at end of file diff --git a/bbb-fsesl-client/project/plugins.sbt b/bbb-fsesl-client/project/plugins.sbt index 5ab7b095f69a2b3d8a3bf5350fa7e7e1a64f8f2f..3559bf68d62ef19f25fa810533bbe596eb022d02 100755 --- a/bbb-fsesl-client/project/plugins.sbt +++ b/bbb-fsesl-client/project/plugins.sbt @@ -2,8 +2,8 @@ addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4") -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1") -addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7") +addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.8") addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") diff --git a/bbb-fsesl-client/src/test/java/org/freeswitch/esl/client/inbound/ClientTest.java b/bbb-fsesl-client/src/test/java/org/freeswitch/esl/client/inbound/ClientTest.java index e3577e52fd6de92f692f7531c168fecbaf4ab252..fb15b27bd2cd7c0b16219291cc0451d43e58ed01 100644 --- a/bbb-fsesl-client/src/test/java/org/freeswitch/esl/client/inbound/ClientTest.java +++ b/bbb-fsesl-client/src/test/java/org/freeswitch/esl/client/inbound/ClientTest.java @@ -17,12 +17,11 @@ package org.freeswitch.esl.client.inbound; import java.util.Map.Entry; -import org.freeswitch.esl.client.IEslEventListener; -import org.freeswitch.esl.client.inbound.Client; -import org.freeswitch.esl.client.inbound.InboundConnectionFailure; +import org.freeswitch.esl.client.example.EslEventListener; import org.freeswitch.esl.client.transport.event.EslEvent; -import org.freeswitch.esl.client.transport.message.EslMessage; import org.freeswitch.esl.client.transport.message.EslHeaders.Name; +import org.freeswitch.esl.client.transport.message.EslMessage; +import org.jboss.netty.channel.ExceptionEvent; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,7 +39,7 @@ public class ClientTest { Client client = new Client(); - client.addEventListener( new IEslEventListener() + client.addEventListener( new EslEventListener() { public void eventReceived( EslEvent event ) {