Skip to content

Commit

Permalink
Updated SBT to 1.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
domaspoliakas committed Jul 27, 2023
1 parent 3c261c2 commit 5428dde
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 31 deletions.
2 changes: 1 addition & 1 deletion artifact/src/main/scala/precog/SbtPrecog.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object SbtPrecog extends SbtPrecogBase {
object autoImport extends autoImport {

lazy val noPublishSettings =
Seq(publish := {}, publishLocal := {}, publishArtifact := false, skip in publish := true)
Seq(publish := {}, publishLocal := {}, publishArtifact := false, publish / skip := true)
}

import GitHubPackagesPlugin.autoImport._
Expand Down
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
description := "Common build configuration for SBT projects"

ThisBuild / sbtVersion := "1.3.13"
ThisBuild / scalaVersion := "2.12.12"
ThisBuild / sbtVersion := "1.9.3"
ThisBuild / scalaVersion := "2.12.18"

ThisBuild / githubOwner := "precog"
ThisBuild / githubRepository := "sbt-precog"
ThisBuild / githubTokenSource := TokenSource.Environment("GITHUB_TOKEN")

lazy val root = project
.in(file("."))
Expand Down
8 changes: 1 addition & 7 deletions core/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@ scalacOptions += "-Ypartial-unification"
Test / testOptions += Tests.Argument("tmpdir", (target.value / "tests" / "tmp").getPath)

enablePlugins(GraphQLCodegenPlugin)

libraryDependencies ++= Seq(
compilerPlugin("com.github.ghik" % "silencer-plugin" % "1.7.0" cross CrossVersion.full),
"com.github.ghik" % "silencer-lib" % "1.7.0" % Provided cross CrossVersion.full
)

scalacOptions += s"-P:silencer:pathFilters=${sourceManaged.value}/.*"
scalacOptions += "-Wconf:src=src_managed/.*:silent"

graphqlCodegenSchema := (Compile / resourceDirectory).value / "core" / "schema.graphql"
graphqlCodegenJson := JsonCodec.Circe
2 changes: 1 addition & 1 deletion core/src/main/resources/core/isRevision
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ IFS=$'\n\t' # http://redsymbol.net/articles/unofficial-bash-strict-mode/

if [ -f version.sbt ]; then
change=$(git diff HEAD^ -- version.sbt | \
grep 'version in ThisBuild' | \
grep 'ThisBuild / version' | \
sed 's/.*"\(.*\)"/\1/' | \
sed 's/\.[0-9]*$//' | \
uniq | \
Expand Down
7 changes: 1 addition & 6 deletions core/src/main/scala/precog/ManagedVersions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,15 @@ import java.nio.file.Path
import sbt.internal.util.codec.JValueFormats
import sbt.util.FileBasedStore
import sjsonnew.BasicJsonProtocol
import sjsonnew.IsoString
import sjsonnew.shaded.scalajson.ast.unsafe.JField
import sjsonnew.shaded.scalajson.ast.unsafe.JObject
import sjsonnew.shaded.scalajson.ast.unsafe.JString
import sjsonnew.shaded.scalajson.ast.unsafe.JValue
import sjsonnew.support.scalajson.unsafe.Converter
import sjsonnew.support.scalajson.unsafe.Parser
import sjsonnew.support.scalajson.unsafe.PrettyPrinter

final class ManagedVersions private (path: Path) extends BasicJsonProtocol with JValueFormats {

private[this] lazy val store: FileBasedStore[JValue] =
new FileBasedStore(path.toFile, Converter)(
IsoString.iso(PrettyPrinter.apply, Parser.parseUnsafe))
new FileBasedStore(path.toFile)

def apply(key: String): String =
get(key).getOrElse(sys.error(s"unable to find string -> string mapping for key '$key'"))
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/scala/precog/SbtPrecogBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ abstract class SbtPrecogBase extends AutoPlugin {
outputStrategy := Some(StdoutOutput),
autoCompilerPlugins := true,
autoAPIMappings := true,
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.1" cross CrossVersion.full),
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full),
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1"),

// default to true
Expand All @@ -129,7 +129,7 @@ abstract class SbtPrecogBase extends AutoPlugin {
val strict = scalacStrictMode.value
if (strict) Seq() else Seq("-Xfatal-warnings")
},
scalacOptions in (Compile, doc) -= "-Xfatal-warnings",
Compile / doc / scalacOptions -= "-Xfatal-warnings",
unsafeEvictionsCheck := unsafeEvictionsCheckTask.value
) ++ scalafmtSettings ++ headerLicenseSettings

Expand Down Expand Up @@ -271,7 +271,7 @@ abstract class SbtPrecogBase extends AutoPlugin {
organizationHomepage := Some(url("https://precog.com")),
managedVersions := ManagedVersions(
((LocalRootProject / baseDirectory).value / VersionsPath).toPath),
resolvers := Seq(Resolver.sonatypeRepo("releases")),
resolvers := Resolver.sonatypeOssRepos("releases"),
checkLocalEvictions := {
if (foundLocalEvictions.nonEmpty) {
sys.error(
Expand Down Expand Up @@ -370,7 +370,7 @@ abstract class SbtPrecogBase extends AutoPlugin {
val module = ivyModule.value
val isFatal = unsafeEvictionsFatal.value
val conf = unsafeEvictionsConf.value
val ewo = (evictionWarningOptions in unsafeEvictionsCheck).value
val ewo = (unsafeEvictionsCheck / evictionWarningOptions).value
val report = (updateFull tag (Tags.Update, Tags.Network)).value
val log = streams.value.log
precog.UnsafeEvictions.check(currentProject, module, isFatal, conf, ewo, report, log)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package precog.interpreters

import cats.effect.Sync
import cats.implicits._
import com.github.ghik.silencer.silent
import github4s.GHResponse
import github4s.domain._
import github4s.http.HttpClient
Expand All @@ -27,6 +26,7 @@ import graphql.codegen.markReadyForReview.MarkForReview
import precog.algebras._
import precog.domain.DraftPullRequest._
import precog.domain._
import scala.annotation.nowarn

class DraftPullRequestsInterpreter[F[_]: Sync](
client: HttpClient[F],
Expand Down Expand Up @@ -123,7 +123,7 @@ object DraftPullRequestsInterpreter {
object GithubQuery {
implicit def encodeGraphQLQuery[A <: GraphQLQuery]: Encoder[A] =
Encoder.encodeString.contramap[A](_.document.renderCompact)
@silent // varsEnc used by macro
@nowarn
implicit def encodeGithubQuery[A <: GraphQLQuery](
implicit varsEnc: Encoder[A#Variables]): Encoder[GithubQuery[A]] =
deriveEncoder[GithubQuery[A]]
Expand All @@ -134,7 +134,7 @@ object DraftPullRequestsInterpreter {
*/
final case class GithubResponse[A <: GraphQLQuery](data: A#Data)
object GithubResponse {
@silent // dataDec used by macro
@nowarn
implicit def decodeGithubResponse[A <: GraphQLQuery](
implicit dataDec: Decoder[A#Data]): Decoder[GithubResponse[A]] =
deriveDecoder[GithubResponse[A]]
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/main/scala/precog/SbtPrecogPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object SbtPrecogPlugin extends SbtPrecogBase {
object autoImport extends autoImport {

lazy val noPublishSettings =
Seq(publish := {}, publishLocal := {}, publishArtifact := false, skip in publish := true)
Seq(publish := {}, publishLocal := {}, publishArtifact := false, publish / skip := true)
}

import autoImport._
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.13
sbt.version=1.9.3
4 changes: 2 additions & 2 deletions project/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ThisBuild / scalaVersion := "2.12.12"
ThisBuild / scalaVersion := "2.12.18"

addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.11.3" cross CrossVersion.full)
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full)
addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("rocks.muki" % "sbt-graphql" % "0.14.0")
addSbtPlugin("rocks.muki" % "sbt-graphql" % "0.16.0")
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "5.1.1"
ThisBuild / version := "5.1.1"

0 comments on commit 5428dde

Please sign in to comment.