diff --git a/.gitignore b/.gitignore index ed5eb84..042d35f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # sbt target/ +.bsp/ # IntelliJ .idea diff --git a/build.sbt b/build.sbt index a0ff78f..448a639 100644 --- a/build.sbt +++ b/build.sbt @@ -1,8 +1,8 @@ name := "Scala-IRC-bot" -version := "1.0.1" +version := "1.1.0" -scalaVersion := "2.13.4" +scalaVersion := "2.13.5" // Recommended flags from https://tpolecat.github.io/2017/04/25/scalac-flags.html (Removed scala 2.13 deprecated flags) scalacOptions ++= Seq( @@ -47,19 +47,19 @@ scalacOptions ++= Seq( lazy val ircBot = project.in(file(".")) .settings( resolvers += "jitpack" at "https://jitpack.io", - libraryDependencies ++= Seq( "com.github.pircbotx" % "pircbotx" % "master-SNAPSHOT", // Use snapshot to prevent an issue with incompatible transitive dependencies. - "com.github.pureconfig" %% "pureconfig" % "0.14.0", + "com.github.pureconfig" %% "pureconfig" % "0.14.1", "ch.qos.logback" % "logback-classic" % "1.2.3", - "com.typesafe.akka" %% "akka-http" % "10.2.1", - "com.typesafe.akka" %% "akka-actor" % "2.6.10", - "com.typesafe.akka" %% "akka-stream" % "2.6.10", + "com.typesafe.akka" %% "akka-http" % "10.2.4", + "com.typesafe.akka" %% "akka-actor" % "2.6.13", + "com.typesafe.akka" %% "akka-stream" % "2.6.13", "org.apache.commons" % "commons-text" % "1.9", "com.danielasfregola" %% "twitter4s" % "7.0", - "com.google.api-client" % "google-api-client" % "1.31.1", - "com.google.apis" % "google-api-services-youtube" % "v3-rev20200618-1.30.9", - "org.scalatest" %% "scalatest" % "3.2.3" % "test", + "com.google.api-client" % "google-api-client" % "1.31.3", + "com.google.apis" % "google-api-services-youtube" % "v3-rev20210210-1.31.0", + "org.scalatest" %% "scalatest" % "3.2.7" % "test", + "com.typesafe.akka" %% "akka-stream" % "2.6.13", ), ) .settings(test in assembly := {}) diff --git a/project/assembly.sbt b/project/assembly.sbt index e6e6dd5..0e9a678 100644 --- a/project/assembly.sbt +++ b/project/assembly.sbt @@ -1,2 +1,2 @@ -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0") -addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.1") \ No newline at end of file +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0") +addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.2") diff --git a/project/build.properties b/project/build.properties index efae80e..f17a59c 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.4.4 \ No newline at end of file +sbt.version=1.4.9 \ No newline at end of file diff --git a/src/main/scala/codes/co2/ircbot/listeners/links/LinkListener.scala b/src/main/scala/codes/co2/ircbot/listeners/links/LinkListener.scala index 343f4bd..c594faf 100644 --- a/src/main/scala/codes/co2/ircbot/listeners/links/LinkListener.scala +++ b/src/main/scala/codes/co2/ircbot/listeners/links/LinkListener.scala @@ -10,7 +10,7 @@ import com.danielasfregola.twitter4s.TwitterRestClient import com.danielasfregola.twitter4s.entities.enums.TweetMode import com.danielasfregola.twitter4s.exceptions.TwitterException import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport -import com.google.api.client.json.jackson2.JacksonFactory +import com.google.api.client.json.gson.GsonFactory import com.google.api.services.youtube.YouTube import org.pircbotx.hooks.events.{ActionEvent, MessageEvent} import org.pircbotx.hooks.types.GenericMessageEvent @@ -23,14 +23,16 @@ import scala.util.control.NonFatal class LinkListener(httpClient: HttpClient, config: LinkListenerConfig, generalConfig: GeneralConfig)(implicit ec: ExecutionContext, - system: ActorSystem + system: ActorSystem, ) extends GenericListener(generalConfig) { val log: Logger = LoggerFactory.getLogger(getClass) implicit val httpSettings: ConnectionPoolSettings = if (config.useHttpProxy.getOrElse(false)) { - ConnectionPoolSettings(system) - .withConnectionSettings(ClientConnectionSettings(system) - .withTransport(ClientTransport.httpsProxy())) + ConnectionPoolSettings(system) + .withConnectionSettings( + ClientConnectionSettings(system) + .withTransport(ClientTransport.httpsProxy()) + ) } else ConnectionPoolSettings(system) val twitterClientOpt: Option[TwitterRestClient] = @@ -46,7 +48,7 @@ class LinkListener(httpClient: HttpClient, config: LinkListenerConfig, generalCo log.info("Starting youtube client.") val httpTransport = GoogleNetHttpTransport.newTrustedTransport - YoutubeClient(new YouTube.Builder(httpTransport, JacksonFactory.getDefaultInstance, null).build, youtubeKey) + YoutubeClient(new YouTube.Builder(httpTransport, GsonFactory.getDefaultInstance, null).build, youtubeKey) } }