Skip to content

Commit 38aa25e

Browse files
authored
uptake sbt-pekko-build (apache#365)
1 parent d98a489 commit 38aa25e

File tree

6 files changed

+15
-210
lines changed

6 files changed

+15
-210
lines changed

.github/workflows/nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
run: cp .jvmopts-ci .jvmopts
4343

4444
- name: Compile everything
45-
run: sbt -Dpekko.http.build.pekko.version=${{ matrix.PEKKO_VERSION }} "++ ${{ matrix.SCALA_VERSION }}" Test/compile
45+
run: sbt -Dpekko.build.pekko.version=${{ matrix.PEKKO_VERSION }} "++ ${{ matrix.SCALA_VERSION }}" Test/compile
4646

4747
- name: Run all tests JDK ${{ matrix.JDK }}, Scala ${{ matrix.SCALA_VERSION }}, Pekko ${{ matrix.PEKKO_VERSION }}
48-
run: sbt -Dpekko.http.parallelExecution=false -Dpekko.test.timefactor=2 -Dpekko.http.build.pekko.version=${{ matrix.PEKKO_VERSION }} "++ ${{ matrix.SCALA_VERSION }}" mimaReportBinaryIssues test
48+
run: sbt -Dpekko.http.parallelExecution=false -Dpekko.test.timefactor=2 -Dpekko.build.pekko.version=${{ matrix.PEKKO_VERSION }} "++ ${{ matrix.SCALA_VERSION }}" mimaReportBinaryIssues test
4949

5050
- name: Upload test results
5151
uses: actions/upload-artifact@v3 # upload test results

build.sbt

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import ValidatePullRequest._
1111
import net.bzzt.reproduciblebuilds.ReproducibleBuildsPlugin.reproducibleBuildsCheckResolver
12+
import com.github.pjfanning.pekkobuild.PekkoDependency
1213
import PekkoDependency._
1314
import Dependencies.{ h2specExe, h2specName }
1415
import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm
@@ -147,9 +148,7 @@ lazy val httpCore = project("http-core")
147148
.addPekkoModuleDependency(
148149
"pekko-stream-testkit",
149150
"test",
150-
pekko =
151-
if (System.getProperty("pekko.http.test-against-pekko-main", "false") == "true") PekkoDependency.snapshotMain
152-
else PekkoDependency.default)
151+
PekkoDependency.default)
153152
.settings(Dependencies.httpCore)
154153
.settings(VersionGenerator.versionSettings)
155154
.settings(scalaMacroSupport)
@@ -408,11 +407,11 @@ lazy val httpScalafixTests =
408407
lazy val docs = project("docs")
409408
.enablePlugins(ParadoxPlugin, PekkoParadoxPlugin, NoPublish)
410409
.disablePlugins(MimaPlugin)
411-
.addPekkoModuleDependency("pekko-stream", "provided", PekkoDependency.docs)
412-
.addPekkoModuleDependency("pekko-actor-typed", "provided", PekkoDependency.docs)
413-
.addPekkoModuleDependency("pekko-multi-node-testkit", "provided", PekkoDependency.docs)
414-
.addPekkoModuleDependency("pekko-stream-testkit", "provided", PekkoDependency.docs)
415-
.addPekkoModuleDependency("pekko-actor-testkit-typed", "provided", PekkoDependency.docs)
410+
.addPekkoModuleDependency("pekko-stream", "provided")
411+
.addPekkoModuleDependency("pekko-actor-typed", "provided")
412+
.addPekkoModuleDependency("pekko-multi-node-testkit", "provided")
413+
.addPekkoModuleDependency("pekko-stream-testkit", "provided")
414+
.addPekkoModuleDependency("pekko-actor-testkit-typed", "provided")
416415
.dependsOn(
417416
httpCore, http, httpXml, http2Tests, httpMarshallersJava, httpMarshallersScala, httpCaching, httpCors,
418417
httpTests % "compile;test->test", httpTestkit % "compile;test->test", httpScalafixRules % ScalafixConfig)
@@ -442,15 +441,15 @@ lazy val docs = project("docs")
442441
Compile / paradoxProperties ++= Map(
443442
"project.name" -> "Apache Pekko HTTP",
444443
"canonical.base_url" -> "https://pekko.apache.org/docs/pekko-http/current",
445-
"pekko.version" -> PekkoDependency.docs.version,
444+
"pekko.version" -> PekkoDependency.pekkoVersion,
446445
"jackson.xml.version" -> Dependencies.jacksonXmlVersion,
447446
"scalafix.version" -> _root_.scalafix.sbt.BuildInfo.scalafixVersion, // grab from scalafix plugin directly
448447
"extref.pekko-docs.base_url" -> s"https://pekko.apache.org/docs/pekko/current/%s",
449448
"javadoc.java.base_url" -> "https://docs.oracle.com/en/java/javase/11/docs/api/java.base/",
450449
"javadoc.java.link_style" -> "direct",
451-
"javadoc.org.apache.pekko.base_url" -> s"https://pekko.apache.org/japi/pekko/${PekkoDependency.docs.link}",
450+
"javadoc.org.apache.pekko.base_url" -> s"https://pekko.apache.org/japi/pekko/${PekkoDependency.default.link}",
452451
"javadoc.org.apache.pekko.link_style" -> "direct",
453-
"scaladoc.org.apache.pekko.base_url" -> s"https://pekko.apache.org/api/pekko/${PekkoDependency.docs.link}",
452+
"scaladoc.org.apache.pekko.base_url" -> s"https://pekko.apache.org/api/pekko/${PekkoDependency.default.link}",
454453
"scaladoc.org.apache.pekko.link_style" -> "direct",
455454
"javadoc.org.apache.pekko.http.base_url" -> s"https://pekko.apache.org/api/pekko-http/${projectInfoVersion.value}",
456455
"scaladoc.org.apache.pekko.http.base_url" -> s"https://pekko.apache.org/japi/pekko-http/${projectInfoVersion.value}",

project/MiMa.scala

Lines changed: 0 additions & 67 deletions
This file was deleted.

project/PekkoDependency.scala

Lines changed: 0 additions & 129 deletions
This file was deleted.

project/VersionGenerator.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import sbt._
1515
import sbt.Keys._
16+
import com.github.pjfanning.pekkobuild.PekkoDependency
1617

1718
/**
1819
* Generate version.conf and pekko/Version.scala files based on the version setting.
@@ -44,7 +45,7 @@ object VersionGenerator {
4445

4546
def generateVersion(dir: SettingKey[File], locate: File => File, template: String) = Def.task[Seq[File]] {
4647
val file = locate(dir.value)
47-
val content = template.stripMargin.format(version.value, PekkoDependency.minimumExpectedPekkoVersion)
48+
val content = template.stripMargin.format(version.value, PekkoDependency.pekkoVersion)
4849
if (!file.exists || IO.read(file) != content) IO.write(file, content)
4950
Seq(file)
5051
}

project/plugins.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0")
3939
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
4040
addSbtPlugin("org.mdedetrich" % "sbt-apache-sonatype" % "0.1.10")
4141
addSbtPlugin("com.github.pjfanning" % "sbt-source-dist" % "0.1.11")
42+
addSbtPlugin("com.github.pjfanning" % "sbt-pekko-build" % "0.1.0")
4243
addSbtPlugin("net.virtual-void" % "sbt-hackers-digest" % "0.1.2")
4344
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")
4445

0 commit comments

Comments
 (0)