Skip to content

Commit

Permalink
build: Akka 2.9.3-M3 and publish to Akka repo (#1850)
Browse files Browse the repository at this point in the history
* and Akka HTTP 10.6.0-M2
* -SNAPSHOT version
  • Loading branch information
patriknw authored Oct 9, 2023
1 parent 3060516 commit 511dbad
Show file tree
Hide file tree
Showing 53 changed files with 198 additions and 53 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:

- name: Publish
run: |-
sbt ci-release
CI_RELEASE=akka-grpc-codegen/publishSigned CI_SNAPSHOT_RELEASE=akka-grpc-codegen/publish sbt ++2.13.10\! ci-release
sbt +publishSigned
CI_RELEASE=akka-grpc-codegen/publishSigned CI_SNAPSHOT_RELEASE=akka-grpc-codegen/publish sbt ++2.13.10\! publishSigned
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}
PUBLISH_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}

gradle-plugin:
name: Release gradle plugin
Expand Down
2 changes: 2 additions & 0 deletions benchmark-java/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ scalaVersion := "2.13.11"

enablePlugins(AkkaGrpcPlugin)

resolvers += "Akka library repository".at("https://repo.akka.io/maven")

run / javaOptions ++= List("-Xms1g", "-Xmx1g", "-XX:+PrintGCDetails", "-XX:+PrintGCTimeStamps")

// generate both client and server (default) in Java
Expand Down
1 change: 1 addition & 0 deletions benchmark-java/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
resolvers += "Akka library repository".at("https://repo.akka.io/maven")
lazy val plugins = project in file(".") dependsOn ProjectRef(file("../../"), "sbt-akka-grpc")
// Use this instead of above when importing to IDEA, after publishLocal and replacing the version here
//addSbtPlugin("com.lightbend.akka.grpc" % "sbt-akka-grpc" % "0.1+32-fd597fcb+20180618-1248")
Expand Down
25 changes: 15 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@ import akka.grpc.ProjectExtensions._
import akka.grpc.build.ReflectiveCodeGen
import com.typesafe.tools.mima.core._
import sbt.Keys.scalaVersion
import com.geirsson.CiReleasePlugin

val akkaGrpcRuntimeName = "akka-grpc-runtime"

lazy val mkBatAssemblyTask = taskKey[File]("Create a Windows bat assembly")

// gradle plugin compatibility (avoid `+` in snapshot versions)
(ThisBuild / dynverSeparator) := "-"
ThisBuild / dynverSeparator := "-"
// append -SNAPSHOT to version when isSnapshot
ThisBuild / dynverSonatypeSnapshots := true

val akkaGrpcCodegenId = "akka-grpc-codegen"
lazy val codegen = Project(id = akkaGrpcCodegenId, base = file("codegen"))
.enablePlugins(SbtTwirl, BuildInfoPlugin)
.enablePlugins(ReproducibleBuildsPlugin)
.disablePlugins(MimaPlugin)
.disablePlugins(MimaPlugin, CiReleasePlugin)
.settings(Dependencies.codegen)
.settings(resolvers += Resolver.sbtPluginRepo("releases"))
.settings(
Expand Down Expand Up @@ -63,6 +66,7 @@ lazy val runtime = Project(id = akkaGrpcRuntimeName, base = file("runtime"))
Test / PB.targets += (scalapb.gen() -> (Test / sourceManaged).value))
.enablePlugins(akka.grpc.build.ReflectiveCodeGen)
.enablePlugins(ReproducibleBuildsPlugin)
.disablePlugins(CiReleasePlugin)

/** This could be an independent project - or does upstream provide this already? didn't find it.. */
val akkaGrpcProtocPluginId = "akka-grpc-scalapb-protoc-plugin"
Expand All @@ -87,11 +91,12 @@ lazy val scalapbProtocPlugin = Project(id = akkaGrpcProtocPluginId, base = file(
.settings(addArtifact((Compile / assembly / artifact), assembly))
.settings(addArtifact(Artifact(akkaGrpcProtocPluginId, "bat", "bat", "bat"), mkBatAssemblyTask))
.enablePlugins(ReproducibleBuildsPlugin)
.disablePlugins(CiReleasePlugin)

lazy val mavenPlugin = Project(id = "akka-grpc-maven-plugin", base = file("maven-plugin"))
.enablePlugins(akka.grpc.SbtMavenPlugin)
.enablePlugins(ReproducibleBuildsPlugin)
.disablePlugins(MimaPlugin)
.disablePlugins(MimaPlugin, CiReleasePlugin)
.settings(Dependencies.mavenPlugin)
.settings(
publishMavenStyle := true,
Expand All @@ -103,7 +108,7 @@ lazy val mavenPlugin = Project(id = "akka-grpc-maven-plugin", base = file("maven
lazy val sbtPlugin = Project(id = "sbt-akka-grpc", base = file("sbt-plugin"))
.enablePlugins(SbtPlugin)
.enablePlugins(ReproducibleBuildsPlugin)
.disablePlugins(MimaPlugin)
.disablePlugins(MimaPlugin, CiReleasePlugin)
.settings(Dependencies.sbtPlugin)
.settings(
/** And for scripted tests: */
Expand All @@ -121,7 +126,7 @@ lazy val sbtPlugin = Project(id = "sbt-akka-grpc", base = file("sbt-plugin"))
.dependsOn(codegen)

lazy val interopTests = Project(id = "akka-grpc-interop-tests", base = file("interop-tests"))
.disablePlugins(MimaPlugin)
.disablePlugins(MimaPlugin, CiReleasePlugin)
.settings(Dependencies.interopTests)
.settings(
crossScalaVersions := Dependencies.Versions.CrossScalaForLib,
Expand Down Expand Up @@ -162,7 +167,7 @@ lazy val interopTests = Project(id = "akka-grpc-interop-tests", base = file("int
lazy val benchmarks = Project(id = "benchmarks", base = file("benchmarks"))
.dependsOn(runtime)
.enablePlugins(JmhPlugin)
.disablePlugins(MimaPlugin)
.disablePlugins(MimaPlugin, CiReleasePlugin)
.settings(
crossScalaVersions := Dependencies.Versions.CrossScalaForLib,
scalaVersion := Dependencies.Versions.CrossScalaForLib.head,
Expand All @@ -173,7 +178,7 @@ lazy val docs = Project(id = "akka-grpc-docs", base = file("docs"))
.dependsOn(pluginTesterScala)
.dependsOn(pluginTesterJava)
.enablePlugins(SitePreviewPlugin, AkkaParadoxPlugin, ParadoxSitePlugin, PreprocessPlugin, PublishRsyncPlugin)
.disablePlugins(MimaPlugin)
.disablePlugins(MimaPlugin, CiReleasePlugin)
.settings(
name := "Akka gRPC",
publish / skip := true,
Expand Down Expand Up @@ -213,7 +218,7 @@ lazy val docs = Project(id = "akka-grpc-docs", base = file("docs"))
scalaVersion := Dependencies.Versions.CrossScalaForLib.head)

lazy val pluginTesterScala = Project(id = "akka-grpc-plugin-tester-scala", base = file("plugin-tester-scala"))
.disablePlugins(MimaPlugin)
.disablePlugins(MimaPlugin, CiReleasePlugin)
.settings(Dependencies.pluginTester)
.settings(
(publish / skip) := true,
Expand All @@ -224,7 +229,7 @@ lazy val pluginTesterScala = Project(id = "akka-grpc-plugin-tester-scala", base
.pluginTestingSettings

lazy val pluginTesterJava = Project(id = "akka-grpc-plugin-tester-java", base = file("plugin-tester-java"))
.disablePlugins(MimaPlugin)
.disablePlugins(MimaPlugin, CiReleasePlugin)
.settings(Dependencies.pluginTester)
.settings(
(publish / skip) := true,
Expand All @@ -236,7 +241,7 @@ lazy val pluginTesterJava = Project(id = "akka-grpc-plugin-tester-java", base =
.pluginTestingSettings

lazy val root = Project(id = "akka-grpc", base = file("."))
.disablePlugins(SitePlugin, MimaPlugin)
.disablePlugins(SitePlugin, MimaPlugin, CiReleasePlugin)
.aggregate(
runtime,
codegen,
Expand Down
6 changes: 3 additions & 3 deletions docs/release-train-issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Variables to be expanded in this template:
- [ ] For recent dependency updates or changes on a minor release branch the Fossa validation can be triggered from the GitHub actions "Dependency License Scanning" (Manually choosing the release branch)
- [ ] Update the revision in Fossa in the Akka Group for the Akka umbrella version, e.g. `22.10`. Note that the revisions for the release is updated by Akka Group > Projects > Edit.
- [ ] Update the [draft release](https://github.com/akka/akka-grpc/releases) with the next tag version `v$VERSION$`, title and release description. Use the `Publish release` button, which will create the tag.
- [ ] Check that GitHub Actions release build has executed successfully (GitHub Actions will start a [CI build](https://github.com/akka/akka-grpc/actions) for the new tag and publish artifacts to Maven central via Sonatype)
- [ ] Check that GitHub Actions release build has executed successfully (GitHub Actions will start a [CI build](https://github.com/akka/akka-grpc/actions) for the new tag and publish artifacts to https://repo.akka.io/maven)

### Check availability

- [ ] Check [API](https://doc.akka.io/api/akka-grpc/$VERSION$/) documentation
- [ ] Check [reference](https://doc.akka.io/docs/akka-grpc/$VERSION$/) documentation. Check that the reference docs were deployed and show a version warning (see section below on how to fix the version warning).
- [ ] Check the release on [Maven central](https://repo1.maven.org/maven2/com/lightbend/akka/grpc/akka-grpc-scalapb-protoc-plugin_2.13/$VERSION$/)
- [ ] Check the release on https://repo.akka.io/maven/com/lightbend/akka/grpc/akka-grpc-scalapb-protoc-plugin_2.13/$VERSION$/akka-grpc-scalapb-protoc-plugin_2.13-$VERSION$.pom

### When everything is on maven central
### When everything is on https://repo.akka.io/maven
- [ ] Log into `gustav.akka.io` as `akkarepo`
- [ ] If this updates the `current` version, run `./update-akka-grpc-current-version.sh $VERSION$`
- [ ] otherwise check changes and commit the new version to the local git repository
Expand Down
18 changes: 14 additions & 4 deletions docs/src/main/paradox/client/walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ sbt
: @@@vars
```scala
// in project/plugins.sbt:
resolvers += "Akka library repository".at("https://repo.akka.io/maven")
addSbtPlugin("com.lightbend.akka.grpc" % "sbt-akka-grpc" % "$project.version$")
//
// in build.sbt:
resolvers += "Akka library repository".at("https://repo.akka.io/maven")
enablePlugins(AkkaGrpcPlugin)
```
@@@
Expand Down Expand Up @@ -49,10 +52,17 @@ Maven
<artifactId>my-grpc-app</artifactId>
<version>0.1-SNAPSHOT</version>
<properties>
<akka.grpc.version>$project.version$</akka.grpc.version>
<grpc.version>$grpc.version$</grpc.version>
<project.encoding>UTF-8</project.encoding>
</properties>
<akka.grpc.version>$project.version$</akka.grpc.version>
<grpc.version>$grpc.version$</grpc.version>
<project.encoding>UTF-8</project.encoding>
</properties>
<repositories>
<repository>
<id>akka-repository</id>
<name>Akka library repository</name>
<url>https://repo.akka.io/maven</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.lightbend.akka.grpc</groupId>
Expand Down
15 changes: 15 additions & 0 deletions docs/src/main/paradox/server/walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ sbt
: @@@vars
```scala
// in project/plugins.sbt:
resolvers += "Akka library repository".at("https://repo.akka.io/maven")
addSbtPlugin("com.lightbend.akka.grpc" % "sbt-akka-grpc" % "$project.version$")
//
// in build.sbt:
resolvers += "Akka library repository".at("https://repo.akka.io/maven")
enablePlugins(AkkaGrpcPlugin)
```
@@@
Expand All @@ -26,6 +28,9 @@ Gradle
repositories {
mavenLocal()
gradlePluginPortal()
maven {
url "https://repo.akka.io/maven"
}
}
dependencies {
// see https://plugins.gradle.org/plugin/com.lightbend.akka.grpc.gradle
Expand All @@ -41,6 +46,9 @@ Gradle
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://repo.akka.io/maven"
}
}
```
@@@
Expand All @@ -59,6 +67,13 @@ Maven
<grpc.version>$grpc.version$</grpc.version>
<project.encoding>UTF-8</project.encoding>
</properties>
<repositories>
<repository>
<id>akka-repository</id>
<name>Akka library repository</name>
<url>https://repo.akka.io/maven</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.lightbend.akka.grpc</groupId>
Expand Down
3 changes: 3 additions & 0 deletions gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jar {

repositories {
mavenCentral()
maven {
url "https://repo.akka.io/maven"
}
}

dependencies {
Expand Down
6 changes: 5 additions & 1 deletion plugin-tester-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ akkaGrpc {

repositories {
mavenLocal()
mavenCentral()
maven {
url "https://repo.akka.io/maven"
}
}

def scalaVersion = org.gradle.util.VersionNumber.parse(System.getenv("TRAVIS_SCALA_VERSION") ?: "2.13")
def scalaBinaryVersion = "${scalaVersion.major}.${scalaVersion.minor}"
def akkaVersion = "2.9.0-M2"
def akkaVersion = "2.9.0-M3"

dependencies {
implementation group: 'ch.megard', name: "akka-http-cors_${scalaBinaryVersion}", version: '1.1.3'
Expand Down
10 changes: 9 additions & 1 deletion plugin-tester-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@
<maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
<maven-exec-plugin.version>3.0.0</maven-exec-plugin.version>
<akka.http.cors.version>1.1.0</akka.http.cors.version>
<akka.version>2.9.0-M2</akka.version>
<akka.version>2.9.0-M3</akka.version>
<grpc.version>1.54.2</grpc.version> <!-- checked synced by VersionSyncCheckPlugin -->
<project.encoding>UTF-8</project.encoding>
<build-helper-maven-plugin>3.3.0</build-helper-maven-plugin>
<protobuf-java.version>3.22.2</protobuf-java.version>
<proto-google-common-protos.version>2.16.0</proto-google-common-protos.version>
</properties>

<repositories>
<repository>
<id>akka-repository</id>
<name>Akka library repository</name>
<url>https://repo.akka.io/maven</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.lightbend.akka.grpc</groupId>
Expand Down
3 changes: 3 additions & 0 deletions plugin-tester-java/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
maven {
url "https://repo.akka.io/maven"
}
}
plugins {
id 'com.lightbend.akka.grpc.gradle' version "${System.getProperty('akka.grpc.project.version')}"
Expand Down
6 changes: 5 additions & 1 deletion plugin-tester-scala/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ akkaGrpc {

repositories {
mavenLocal()
mavenCentral()
maven {
url "https://repo.akka.io/maven"
}
}

def scalaVersion = org.gradle.util.VersionNumber.parse(System.getenv("TRAVIS_SCALA_VERSION") ?: "2.13")
def scalaBinaryVersion = "${scalaVersion.major}.${scalaVersion.minor}"
def akkaVersion = "2.9.0-M2"
def akkaVersion = "2.9.0-M3"

dependencies {
implementation group: 'ch.megard', name: "akka-http-cors_${scalaBinaryVersion}", version: '1.1.3'
Expand Down
10 changes: 9 additions & 1 deletion plugin-tester-scala/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@

<properties>
<maven.compiler.release>11</maven.compiler.release>
<akka.version>2.9.0-M2</akka.version>
<akka.version>2.9.0-M3</akka.version>
<akka.http.cors.version>0.4.2</akka.http.cors.version>
<grpc.version>1.54.2</grpc.version> <!-- checked synced by VersionSyncCheckPlugin -->
<project.encoding>UTF-8</project.encoding>
</properties>

<repositories>
<repository>
<id>akka-repository</id>
<name>Akka library repository</name>
<url>https://repo.akka.io/maven</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.lightbend.akka.grpc</groupId>
Expand Down
3 changes: 3 additions & 0 deletions plugin-tester-scala/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
maven {
url "https://repo.akka.io/maven"
}
}
plugins {
id 'com.lightbend.akka.grpc.gradle' version "${System.getProperty('akka.grpc.project.version')}"
Expand Down
4 changes: 1 addition & 3 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import org.scalafmt.sbt.ScalafmtPlugin.autoImport.scalafmtOnCompile
import com.typesafe.tools.mima.plugin.MimaKeys._
import sbtprotoc.ProtocPlugin.autoImport.PB
import xerial.sbt.Sonatype
import xerial.sbt.Sonatype.autoImport.sonatypeProfileName

object Common extends AutoPlugin {
override def trigger = allRequirements
Expand All @@ -23,7 +22,7 @@ object Common extends AutoPlugin {
organization := "com.lightbend.akka.grpc",
organizationName := "Lightbend Inc.",
organizationHomepage := Some(url("https://www.lightbend.com/")),
resolvers ++= Resolver.sonatypeOssRepos("staging"), // makes testing HTTP releases early easier
resolvers += "Akka library repository".at("https://repo.akka.io/maven"),
homepage := Some(url("https://akka.io/")),
scmInfo := Some(ScmInfo(url("https://github.com/akka/akka-grpc"), "[email protected]:akka/akka-grpc")),
developers += Developer(
Expand All @@ -46,7 +45,6 @@ object Common extends AutoPlugin {

override lazy val projectSettings = Seq(
projectInfoVersion := (if (isSnapshot.value) "snapshot" else version.value),
sonatypeProfileName := "com.lightbend",
scalacOptions ++= Seq(
"-release",
"11",
Expand Down
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ object Dependencies {
// We don't force Akka updates because downstream projects can upgrade
// themselves. For more information see
// https://doc.akka.io//docs/akka/current/project/downstream-upgrade-strategy.html
val akka = "2.9.0-M2"
val akka = "2.9.0-M3"
val akkaBinary = "2.8"
val akkaHttp = "10.6.0-M1"
val akkaHttp = "10.6.0-M2"
val akkaHttpBinary = "10.6"

val grpc = "1.54.2" // checked synced by VersionSyncCheckPlugin
Expand Down
Loading

0 comments on commit 511dbad

Please sign in to comment.