From 6b1fa4177781f09fa1dfbb15a674790cdf28b2fe Mon Sep 17 00:00:00 2001 From: Ghazi Triki <ghazi.triki@riadvice.tn> Date: Fri, 9 Nov 2018 10:33:45 +0100 Subject: [PATCH] Updated bbb-fsesl-client project to use sbt 1.2.6 and scala 2.12.7 --- bbb-fsesl-client/build.gradle | 72 ------------------- bbb-fsesl-client/build.sbt | 34 +++++---- bbb-fsesl-client/deploy.sh | 3 +- bbb-fsesl-client/project/Build.scala | 0 bbb-fsesl-client/project/Dependencies.scala | 40 +++++++++++ bbb-fsesl-client/project/build.properties | 2 +- bbb-fsesl-client/project/plugins.sbt | 4 +- .../esl/client/inbound/ClientTest.java | 9 ++- 8 files changed, 70 insertions(+), 94 deletions(-) delete mode 100755 bbb-fsesl-client/build.gradle delete mode 100755 bbb-fsesl-client/project/Build.scala create mode 100644 bbb-fsesl-client/project/Dependencies.scala diff --git a/bbb-fsesl-client/build.gradle b/bbb-fsesl-client/build.gradle deleted file mode 100755 index ad7449677b..0000000000 --- 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 6cc930898e..b3d4b559bb 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 a5f14b0d75..fdfce32665 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 e69de29bb2..0000000000 diff --git a/bbb-fsesl-client/project/Dependencies.scala b/bbb-fsesl-client/project/Dependencies.scala new file mode 100644 index 0000000000..9da6506153 --- /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 a6e117b610..2e6e3d2460 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 5ab7b095f6..3559bf68d6 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 e3577e52fd..fb15b27bd2 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 ) { -- GitLab