Skip to content

Commit

Permalink
build: fix for release 1.5 (#2150)
Browse files Browse the repository at this point in the history
* remove publishSignedConfiguration from plugin

* publish all versions locally

* set crossScalaVersions to Nil on root
  • Loading branch information
efgpinto authored May 30, 2024
1 parent a896fac commit 11fc145
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
14 changes: 13 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ lazy val `kalix-jvm-sdk` = project
codegenScala,
codegenScalaCompilationTest,
sbtPlugin)
.settings(
(publish / skip) := true,
// https://github.com/sbt/sbt/issues/3465
// Libs and plugins must share a version. The root project must use that
// version (and set the crossScalaVersions as empty list) so each sub-project
// can then decide which scalaVersion and crossScalaVersions they use.
crossScalaVersions := Nil,
scalaVersion := Dependencies.ScalaVersion)

def commonCompilerSettings: Seq[Setting[_]] =
Seq(
Expand Down Expand Up @@ -529,6 +537,7 @@ lazy val codegenCore =
Compile / javacOptions ++= Seq("--release", "11"),
Compile / scalacOptions ++= Seq("-release", "11"),
scalaVersion := Dependencies.ScalaVersionForTooling,
crossScalaVersions := Seq(Dependencies.ScalaVersionForTooling),
Compile / PB.targets := Seq(PB.gens.java -> (Compile / sourceManaged).value))

lazy val codegenJava =
Expand Down Expand Up @@ -557,7 +566,8 @@ lazy val codegenJava =
.settings(
Compile / javacOptions ++= Seq("--release", "11"),
Compile / scalacOptions ++= Seq("-release", "11"),
scalaVersion := Dependencies.ScalaVersionForTooling)
scalaVersion := Dependencies.ScalaVersionForTooling,
crossScalaVersions := Seq(Dependencies.ScalaVersionForTooling))

lazy val codegenJavaCompilationTest = project
.in(file("codegen/java-gen-compilation-tests"))
Expand Down Expand Up @@ -592,6 +602,7 @@ lazy val codegenScala =
Compile / javacOptions ++= Seq("--release", "11"),
Compile / scalacOptions ++= Seq("-release", "11"),
scalaVersion := Dependencies.ScalaVersionForTooling,
crossScalaVersions := Seq(Dependencies.ScalaVersionForTooling),
Test / fork := false, // needed to pass -D properties to ExampleSuite
buildInfoKeys := Seq[BuildInfoKey](
name,
Expand Down Expand Up @@ -653,6 +664,7 @@ lazy val sbtPlugin = Project(id = "sbt-kalix", base = file("sbt-plugin"))
Compile / javacOptions ++= Seq("--release", "11"),
Compile / scalacOptions ++= Seq("-release", "11"),
scalaVersion := Dependencies.ScalaVersionForTooling,
crossScalaVersions := Seq(Dependencies.ScalaVersionForTooling),
publishSignedConfiguration := publishSignedConfiguration.value.withArtifacts(
// avoid publishing the plugin jar twice
publishSignedConfiguration.value.artifacts.filter(!_._1.name.contains("2.12_1.0"))),
Expand Down
15 changes: 1 addition & 14 deletions project/PublishPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,10 @@ import java.util.concurrent.atomic.AtomicBoolean
*/
object DefaultPublishSettings extends AutoPlugin {

import DynVerPlugin.autoImport._
import Sonatype.autoImport._

override def requires = SdkVersion
override def trigger = allRequirements

override def projectSettings = Seq(
publish / skip := true,
publishTo := None,
pomIncludeRepository := (_ => false),
// Note: need to use the new s01.oss.sonatype.org host
sonatypeCredentialHost := Sonatype.sonatype01)
override def projectSettings = Seq(publish / skip := true, publishTo := None, pomIncludeRepository := (_ => false))
}

/**
Expand All @@ -47,11 +39,6 @@ object Publish extends AutoPlugin {
sonatypeProfileName := "com.typesafe",
beforePublishTask := beforePublish(isSnapshot.value),
publishSigned := publishSigned.dependsOn(beforePublishTask).value,
publishSignedConfiguration := publishSignedConfiguration.value.withArtifacts(
// avoid publishing the plugin jar twice
publishSignedConfiguration.value.artifacts.collect {
case tup @ (artifact, _) if artifact.name.contains("2.12_1.0") => tup
}),
publishTo :=
(if (isSnapshot.value)
Some("Cloudsmith API".at("https://maven.cloudsmith.io/lightbend/akka-snapshots/"))
Expand Down
2 changes: 1 addition & 1 deletion publishLocally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "------------------------------------------------------------------------"
echo "Publishing version $SDK_VERSION"
echo "------------------------------------------------------------------------"

sbt 'publishM2; publishLocal'
sbt 'publishM2; +publishLocal'
(
cd maven-java
../.github/patch-maven-versions.sh
Expand Down

0 comments on commit 11fc145

Please sign in to comment.