From 27f453ede418ac2de952e0b034e972b6807acacd Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 26 Dec 2023 22:10:57 +0100 Subject: [PATCH 1/2] use sbt-pekko-build to allow testing with pekko/pekko-http snapshots --- build.sbt | 8 ++++++++ project/Dependencies.scala | 9 +++++---- project/plugins.sbt | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index dace6e6b..baaa9b82 100644 --- a/build.sbt +++ b/build.sbt @@ -313,3 +313,11 @@ lazy val root = Project(id = "pekko-grpc", base = file(".")) crossScalaVersions := Nil, scalaVersion := scala212) .enablePlugins(NoPublish) + +Global / onLoad := (Global / onLoad).value.andThen { s => + val v = version.value + val log = sLog.value + log.info( + s"Building Pekko gRPC $v against Pekko ${Dependencies.Versions.pekko} and Pekko HTTP ${Dependencies.Versions.pekkoHttp}") + s +} diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 27ee41f8..b307d0fa 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -12,6 +12,7 @@ package org.apache.pekko.grpc import sbt._ import sbt.Keys._ import buildinfo.BuildInfo +import com.github.pjfanning.pekkobuild.{ PekkoDependency, PekkoHttpDependency } object Dependencies { object Versions { @@ -27,10 +28,10 @@ object Dependencies { // We don't force Pekko updates because downstream projects can upgrade // themselves. For more information see // https://pekko.apache.org//docs/pekko/current/project/downstream-upgrade-strategy.html - val pekko = "1.0.2" - val pekkoBinary = "1.0" - val pekkoHttp = "1.0.0" - val pekkoHttpBinary = "1.0" + val pekko = PekkoDependency.pekkoVersion + val pekkoBinary = pekko.take(3) + val pekkoHttp = PekkoHttpDependency.pekkoHttpVersion + val pekkoHttpBinary = pekkoHttp.take(3) val grpc = "1.54.2" // checked synced by VersionSyncCheckPlugin // Even referenced explicitly in the sbt-plugin's sbt-tests diff --git a/project/plugins.sbt b/project/plugins.sbt index bedb9c5b..f52247a7 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -26,6 +26,7 @@ addSbtPlugin("net.bzzt" % "sbt-reproducible-builds" % "0.31") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3") addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") addSbtPlugin("org.mdedetrich" % "sbt-apache-sonatype" % "0.1.10") +addSbtPlugin("com.github.pjfanning" % "sbt-pekko-build" % "0.2.0") addSbtPlugin("com.github.pjfanning" % "sbt-source-dist" % "0.1.11") addSbtPlugin("com.github.sbt" % "sbt-license-report" % "1.6.1") From 58031b630885dd1f80c785e7107f10fae3779357 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 26 Dec 2023 22:42:05 +0100 Subject: [PATCH 2/2] Update build.sbt --- build.sbt | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sbt b/build.sbt index baaa9b82..63539774 100644 --- a/build.sbt +++ b/build.sbt @@ -20,6 +20,7 @@ ThisBuild / apacheSonatypeProjectProfile := "pekko" sourceDistName := "apache-pekko-grpc" sourceDistIncubating := true ThisBuild / versionScheme := Some(VersionScheme.SemVerSpec) +ThisBuild / resolvers += Resolver.ApacheMavenSnapshotsRepo commands := commands.value.filterNot { command => command.nameOption.exists { name =>