diff --git a/.circleci/config.yml b/.circleci/config.yml index 8bc01c9a..67c402a1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - codacy: codacy/base@10.11.0 + codacy: codacy/base@12.0.0 slack: circleci/slack@3.3.0 references: @@ -146,8 +146,18 @@ workflows: write_sbt_version: true - codacy/sbt: name: compile - install_sbt_version: 1.8.2 - cmd: sbt coverage +test:compile + install_sbt_version: 1.10.0 + cache_prefix: *cache_prefix + persist_to_workspace: true + steps: + - run: + name: Compile + command: sbt compile + requires: + - codacy/checkout_and_version + - codacy/sbt: + name: test + install_sbt_version: 1.10.0 cache_prefix: *cache_prefix persist_to_workspace: true steps_before_sbt: @@ -155,18 +165,6 @@ workflows: name: Enable coverage command: echo "ThisBuild / coverageEnabled := true" > coverage.sbt steps: - - run: - name: Check formatting Sbt files - command: sbt scalafmtSbtCheck - - run: - name: Check formatting Scala files - command: sbt scalafmtCheckAll - - run: - name: Test compile - command: sbt test:compile - - run: - name: It compile - command: sbt it:compile - run: name: Unit testing command: sbt test @@ -177,33 +175,19 @@ workflows: name: Send coverage report to Codacy command: | bash <(curl -Ls https://coverage.codacy.com/get.sh) - - run: - name: Clean coverage.sbt from cache - command: rm coverage.sbt requires: - - codacy/checkout_and_version + - compile - codacy/sbt: name: lint - install_sbt_version: 1.8.2 + install_sbt_version: 1.10.0 cmd: | sbt "scalafmtCheckAll;scalafmtSbtCheck;scapegoat;scalafixEnable;scalafix --test" cache_prefix: *cache_prefix requires: - compile - - codacy/sbt: - name: test - install_sbt_version: 1.8.2 - cmd: | - git config --global user.email "team@codacy.com" - git config --global user.name "Codacy Team" - sbt coverage +test coverageReport - bash <(curl -Ls https://coverage.codacy.com/get.sh) report --skip - cache_prefix: *cache_prefix - requires: - - compile - codacy/sbt: name: publish_docker_locally - install_sbt_version: 1.8.2 + install_sbt_version: 1.10.0 cmd: | sbt "set codacyAnalysisCli / version := \"dev-snapshot\"; codacyAnalysisCli/stage" @@ -228,7 +212,7 @@ workflows: # - maven_dependencies - codacy/sbt: name: publish_lib - install_sbt_version: 1.8.2 + install_sbt_version: 1.10.0 context: CodacyAWS cmd: | sbt "retrieveGPGKeys; @@ -254,7 +238,7 @@ workflows: - master - codacy/sbt: name: build_cli_jar - install_sbt_version: 1.8.2 + install_sbt_version: 1.10.0 persist_to_workspace: true cmd: | sbt "set codacyAnalysisCli / version := \"$(cat .version)\"; diff --git a/build.sbt b/build.sbt index 03c77d52..6eb82a72 100644 --- a/build.sbt +++ b/build.sbt @@ -16,12 +16,8 @@ val assemblyCommon = Seq( oldStrategy(x) }) -inThisBuild( - Seq( - scalaVersion := Common.scalaVersionNumber, - scalaBinaryVersion := Common.scalaBinaryVersionNumber, - scapegoatDisabledInspections := Seq(), - scapegoatVersion := "1.4.6")) +ThisBuild / scalaVersion := Common.scalaVersionNumber +ThisBuild / scalaBinaryVersion := Common.scalaBinaryVersionNumber val sonatypeInformation = Seq( startYear := Some(2018), @@ -107,9 +103,6 @@ lazy val downloadCodacyToolsSwaggerFile = Def.task[Unit] { } } -val silencerSettings = - Seq(libraryDependencies ++= Dependencies.silencer, scalacOptions += "-P:silencer:pathFilters=src_managed") - lazy val codacyApiClient = project .in(file("codacy-api-client")) .settings(name := "codacy-api-client", description := "Client library for codacy API") @@ -132,4 +125,4 @@ lazy val codacyApiClient = project tracing = false, modules = List("circe", "akka-http"))) }, - silencerSettings) + scalacOptions += "-Wconf:src=src_managed/.*:silent") diff --git a/project/Common.scala b/project/Common.scala index c97231b2..ea11b831 100644 --- a/project/Common.scala +++ b/project/Common.scala @@ -11,10 +11,10 @@ object Common { private val defaultDockerInstallationPath = "/opt/codacy" val scalaBinaryVersionNumber = "2.12" - val scalaVersionNumber = s"$scalaBinaryVersionNumber.12" + val scalaVersionNumber = s"$scalaBinaryVersionNumber.19" val scala213BinaryVersionNumber = "2.13" - val scala213VersionNumber = s"$scala213BinaryVersionNumber.3" + val scala213VersionNumber = s"$scala213BinaryVersionNumber.14" lazy val supportedScalaVersions = List(Common.scalaVersionNumber, Common.scala213VersionNumber) val genericSettings = Seq( diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 86245930..96483e91 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -54,10 +54,6 @@ object Dependencies { val macroParadise = "org.scalamacros" %% "paradise" % "2.1.1" - val silencer = Seq( - compilerPlugin("com.github.ghik" % "silencer-plugin" % silencerVersion cross CrossVersion.full), - "com.github.ghik" % "silencer-lib" % silencerVersion % Provided cross CrossVersion.full) - val scalatest = "org.scalatest" %% "scalatest" % "3.0.8" val betterFiles = "com.github.pathikrit" %% "better-files" % "3.8.0" } diff --git a/project/build.properties b/project/build.properties index 46e43a97..081fdbbc 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.2 +sbt.version=1.10.0 diff --git a/project/plugins.sbt b/project/plugins.sbt index 29374143..d3fc5606 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,10 @@ addSbtPlugin("com.codacy" % "codacy-sbt-plugin" % "25.0.1") // Coverage -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12") // Static Analysis -addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.1.0") +addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.2.4") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.21") // Dependencies