diff --git a/bbb-common-web/build.sbt b/bbb-common-web/build.sbt index 11ff1b07e84f78a5e330ea98ddf8763bd2cb50aa..4acb056c81380128a5dbd947067cef7c67e33944 100755 --- a/bbb-common-web/build.sbt +++ b/bbb-common-web/build.sbt @@ -1,19 +1,25 @@ -name := "bbb-common-web" - -organization := "org.bigbluebutton" - -version := "0.0.2-SNAPSHOT" - -scalaVersion := "2.12.6" - -scalacOptions ++= Seq( - "-unchecked", - "-deprecation", - "-Xlint", - "-Ywarn-dead-code", - "-language:_", - "-target:jvm-1.8", - "-encoding", "UTF-8" +import org.bigbluebutton.build._ + +version := "0.0.3-SNAPSHOT" + +scalaVersion := "2.12.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. @@ -25,82 +31,8 @@ testOptions in Test += Tests.Argument(TestFrameworks.Specs2, "html", "console", testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/scalatest-reports") -val akkaVersion = "2.5.14" - -// https://mvnrepository.com/artifact/org.scala-lang/scala-library -libraryDependencies += "org.scala-lang" % "scala-library" % scalaVersion.value -// https://mvnrepository.com/artifact/org.scala-lang/scala-compiler -libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value - -// https://mvnrepository.com/artifact/com.typesafe.akka/akka-actor_2.12 -libraryDependencies += "com.typesafe.akka" % "akka-actor_2.12" % akkaVersion -// https://mvnrepository.com/artifact/com.typesafe.akka/akka-slf4j_2.12 -libraryDependencies += "com.typesafe.akka" % "akka-slf4j_2.12" % akkaVersion - -// https://mvnrepository.com/artifact/com.github.etaty/rediscala_2.12 -libraryDependencies += "com.github.etaty" % "rediscala_2.12" % "1.8.0" - -libraryDependencies += "com.softwaremill.quicklens" %% "quicklens" % "1.4.11" - -libraryDependencies += "org.bigbluebutton" % "bbb-common-message_2.12" % "0.0.19-SNAPSHOT" -// https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-scala_2.12 -libraryDependencies += "com.fasterxml.jackson.module" % "jackson-module-scala_2.12" % "2.9.6" - -libraryDependencies += "redis.clients" % "jedis" % "2.9.0" -libraryDependencies += "com.google.code.gson" % "gson" % "2.8.5" - -// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.7" -libraryDependencies += "commons-io" % "commons-io" % "2.6" -libraryDependencies += "org.apache.commons" % "commons-pool2" % "2.6.0" -libraryDependencies += "com.zaxxer" % "nuprocess" % "1.2.4" - -// https://mvnrepository.com/artifact/org.jodconverter/jodconverter-core -libraryDependencies += "org.jodconverter" % "jodconverter-local" % "4.2.0" - -// https://mvnrepository.com/artifact/org.libreoffice/unoil -libraryDependencies += "org.libreoffice" % "unoil" % "5.4.2" - -// https://mvnrepository.com/artifact/org.libreoffice/ridl -libraryDependencies += "org.libreoffice" % "ridl" % "5.4.2" - -// https://mvnrepository.com/artifact/org.libreoffice/juh -libraryDependencies += "org.libreoffice" % "juh" % "5.4.2" - -// https://mvnrepository.com/artifact/org.libreoffice/jurt -libraryDependencies += "org.libreoffice" % "jurt" % "5.4.2" - - -libraryDependencies += "org.apache.poi" % "poi-ooxml" % "3.17" - -libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.25" - -// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.5.6" -// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpasyncclient -libraryDependencies += "org.apache.httpcomponents" % "httpasyncclient" % "4.1.4" - -libraryDependencies += "org.freemarker" % "freemarker" % "2.3.28" -libraryDependencies += "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.9.6" -// https://mvnrepository.com/artifact/org.codehaus.woodstox/woodstox-core-asl -libraryDependencies += "org.codehaus.woodstox" % "woodstox-core-asl" % "4.4.1" - -libraryDependencies += "org.pegdown" % "pegdown" % "1.4.0" % "test" -libraryDependencies += "junit" % "junit" % "4.12" % "test" -libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test" -// https://mvnrepository.com/artifact/org.mockito/mockito-core -libraryDependencies += "org.mockito" % "mockito-core" % "2.7.12" % "test" -libraryDependencies += "org.scalactic" %% "scalactic" % "3.0.1" % "test" -libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test" - -// https://mvnrepository.com/artifact/com.typesafe.akka/akka-testkit_2.12 -libraryDependencies += "com.typesafe.akka" % "akka-testkit_2.12" % akkaVersion % "test" - -// https://mvnrepository.com/artifact/org.scala-lang.modules/scala-xml_2.12 -libraryDependencies += "org.scala-lang.modules" % "scala-xml_2.12" % "1.1.0" - - -seq(Revolver.settings: _*) +Seq(Revolver.settings: _*) +lazy val commonWeb = (project in file(".")).settings(name := "bbb-common-web", libraryDependencies ++= Dependencies.runtime).settings(compileSettings) //----------- // Packaging @@ -120,12 +52,12 @@ crossPaths := false // This forbids including Scala related libraries into the dependency autoScalaLibrary := false -/*************************** -* When developing, change the version above to x.x.x-SNAPSHOT then use the file resolver to -* publish to the local maven repo using "sbt publish" -*/ +/** ************************* + * When developing, change the version above to x.x.x-SNAPSHOT then use the file resolver to + * publish to the local maven repo using "sbt publish" + */ // Uncomment this to publish to local maven repo while commenting out the nexus repo -publishTo := Some(Resolver.file("file", new File(Path.userHome.absolutePath+"/.m2/repository"))) +publishTo := Some(Resolver.file("file", new File(Path.userHome.absolutePath + "/.m2/repository"))) // Comment this out when publishing to local maven repo using SNAPSHOT version. @@ -150,16 +82,14 @@ pomExtra := ( <url>git@github.com:bigbluebutton/bigbluebutton.git</url> <connection>scm:git:git@github.com:bigbluebutton/bigbluebutton.git</connection> </scm> - <developers> - <developer> - <id>ritzalam</id> - <name>Richard Alam</name> - <url>http://www.bigbluebutton.org</url> - </developer> - </developers>) - + <developers> + <developer> + <id>ritzalam</id> + <name>Richard Alam</name> + <url>http://www.bigbluebutton.org</url> + </developer> + </developers>) + licenses := Seq("LGPL-3.0" -> url("http://opensource.org/licenses/LGPL-3.0")) homepage := Some(url("http://www.bigbluebutton.org")) - - diff --git a/bbb-common-web/project/Build.scala b/bbb-common-web/project/Build.scala deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/bbb-common-web/project/Dependencies.scala b/bbb-common-web/project/Dependencies.scala new file mode 100644 index 0000000000000000000000000000000000000000..4dfd075a9dcb5d8d009dd18ac7f2900603d64e3b --- /dev/null +++ b/bbb-common-web/project/Dependencies.scala @@ -0,0 +1,118 @@ +package org.bigbluebutton.build + +import sbt._ +import Keys._ + +object Dependencies { + + object Versions { + // Scala + val scala = "2.12.7" + val junit = "4.12" + val junitInterface = "0.11" + val scalactic = "3.0.3" + val pegdown = "1.6.0" + + // Libraries + val akkaVersion = "2.5.17" + val gson = "2.8.5" + val jackson = "2.9.7" + val freemaker = "2.3.28" + val apacheHttp = "4.5.6" + val apacheHttpAsync = "4.1.4" + + // Office and document conversion + val apacheOffice = "4.0.0" + val jodConverter = "4.2.1" + val apachePoi = "3.17" + val nuProcess = "1.2.4" + val libreOffice = "5.4.2" + + // Apache Commons + val lang = "3.8.1" + val io = "2.6" + val pool = "2.6.0" + + // Redis + val redisScala = "1.8.0" + val jedis = "2.9.0" + + // BigBlueButton + val bbbCommons = "0.0.20-SNAPSHOT" + + // Test + val scalaTest = "3.0.5" + } + + object Compile { + val scalaLibrary = "org.scala-lang" % "scala-library" % Versions.scala + val scalaCompiler = "org.scala-lang" % "scala-compiler" % Versions.scala + + val akkaActor = "com.typesafe.akka" % "akka-actor_2.12" % Versions.akkaVersion + val akkaSl4fj = "com.typesafe.akka" % "akka-slf4j_2.12" % Versions.akkaVersion + + val googleGson = "com.google.code.gson" % "gson" % Versions.gson + val jacksonModule = "com.fasterxml.jackson.module" %% "jackson-module-scala" % Versions.jackson + val jacksonXml = "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % Versions.jackson + val freeMaker = "org.freemarker" % "freemarker" % Versions.freemaker + val apacheHttp = "org.apache.httpcomponents" % "httpclient" % Versions.apacheHttp + val apacheHttpAsync = "org.apache.httpcomponents" % "httpasyncclient" % Versions.apacheHttpAsync + + + val poiXml = "org.apache.poi" % "poi-ooxml" % Versions.apachePoi + val jodConverter = "org.jodconverter" % "jodconverter-local" % Versions.jodConverter + val nuProcess = "com.zaxxer" % "nuprocess" % Versions.nuProcess + + val officeUnoil = "org.libreoffice" % "unoil" % Versions.libreOffice + val officeRidl = "org.libreoffice" % "ridl" % Versions.libreOffice + val officeJuh = "org.libreoffice" % "juh" % Versions.libreOffice + val officejurt = "org.libreoffice" % "jurt" % Versions.libreOffice + + val apacheLang = "org.apache.commons" % "commons-lang3" % Versions.lang + val apacheIo = "commons-io" % "commons-io" % Versions.io + val apachePool2 = "org.apache.commons" % "commons-pool2" % Versions.pool + + val redisScala = "com.github.etaty" % "rediscala_2.12" % Versions.redisScala + val jedis = "redis.clients" % "jedis" % Versions.jedis + + + val bbbCommons = "org.bigbluebutton" % "bbb-common-message_2.12" % Versions.bbbCommons + } + + object Test { + val scalaTest = "org.scalatest" %% "scalatest" % Versions.scalaTest % "test" + val junit = "junit" % "junit" % Versions.junit % "test" + val junitInteface = "com.novocode" % "junit-interface" % Versions.junitInterface % "test" + val scalactic = "org.scalactic" % "scalactic_2.12" % Versions.scalactic % "test" + val pegdown = "org.pegdown" % "pegdown" % Versions.pegdown % "test" + } + + val testing = Seq( + Test.scalaTest, + Test.junit, + Test.junitInteface, + Test.scalactic, + Test.pegdown) + + val runtime = Seq( + Compile.scalaLibrary, + Compile.scalaCompiler, + Compile.akkaActor, + Compile.akkaSl4fj, + Compile.googleGson, + Compile.jacksonModule, + Compile.jacksonXml, + Compile.freeMaker, + Compile.apacheHttp, + Compile.apacheHttpAsync, + Compile.poiXml, + Compile.jodConverter, + Compile.nuProcess, + Compile.apacheLang, + Compile.apacheIo, + Compile.apachePool2, + Compile.redisScala, + Compile.jedis, + Compile.bbbCommons, + ) ++ testing +} diff --git a/bbb-common-web/project/build.properties b/bbb-common-web/project/build.properties index a6e117b61042ee81c62ba3a0fc5210d9502944df..2e6e3d24608ee15e892ed3b16d84224f7667e808 100755 --- a/bbb-common-web/project/build.properties +++ b/bbb-common-web/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-common-web/project/plugins.sbt b/bbb-common-web/project/plugins.sbt index b91f89e4a637ce583af1b0e09615d2f9044e033b..4eb70b26c5aeae53a81b4c122607bda9733ec175 100755 --- a/bbb-common-web/project/plugins.sbt +++ b/bbb-common-web/project/plugins.sbt @@ -2,9 +2,7 @@ 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.artima.supersafe" % "sbtplugin" % "1.1.7") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1") addSbtPlugin("net.vonbuchholtz" % "sbt-dependency-check" % "0.2.7")