-
Notifications
You must be signed in to change notification settings - Fork 644
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Akka 2.9.3-M3 and publish to Akka repo (#3021)
* remove deprecated in ElasticsearchConnectionSettings * Akka HTTP 10.6.0-M2
- Loading branch information
Showing
9 changed files
with
96 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
.../mima-filters/6.0.2.backwards.excludes/ElasticsearchConnectionSettings.backwards.excludes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Remove deprecated | ||
ProblemFilters.exclude[DirectMissingMethodProblem]("akka.stream.alpakka.elasticsearch.ElasticsearchConnectionSettings.withConnectionContext") | ||
ProblemFilters.exclude[DirectMissingMethodProblem]("akka.stream.alpakka.elasticsearch.ElasticsearchConnectionSettings.withConnectionContext") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright (C) 2023 Lightbend Inc. <https://www.lightbend.com> | ||
*/ | ||
|
||
import java.util.concurrent.atomic.AtomicBoolean | ||
|
||
import scala.language.postfixOps | ||
|
||
import sbt.{Def, _} | ||
import Keys._ | ||
import com.geirsson.CiReleasePlugin | ||
import com.jsuereth.sbtpgp.PgpKeys.publishSigned | ||
import xerial.sbt.Sonatype.autoImport.sonatypeProfileName | ||
|
||
/** | ||
* For projects that are not published. | ||
*/ | ||
object NoPublish extends AutoPlugin { | ||
override def requires = plugins.JvmPlugin | ||
|
||
override def projectSettings = | ||
Seq(publish / skip := true, publishArtifact := false, publish := {}, publishLocal := {}) | ||
} | ||
|
||
object Publish extends AutoPlugin { | ||
override def requires = plugins.JvmPlugin && Common | ||
override def trigger = AllRequirements | ||
|
||
lazy val beforePublishTask = taskKey[Unit]("setup before publish") | ||
|
||
lazy val beforePublishDone = new AtomicBoolean(false) | ||
|
||
def beforePublish(snapshot: Boolean) = { | ||
if (beforePublishDone.compareAndSet(false, true)) { | ||
CiReleasePlugin.setupGpg() | ||
if (!snapshot) | ||
cloudsmithCredentials(validate = true) | ||
} | ||
} | ||
|
||
override def projectSettings: Seq[Def.Setting[_]] = | ||
Seq( | ||
sonatypeProfileName := "com.lightbend", | ||
beforePublishTask := beforePublish(isSnapshot.value), | ||
publishSigned := publishSigned.dependsOn(beforePublishTask).value, | ||
publishTo := (if (isSnapshot.value) | ||
Some(Resolver.file("file", target.value / "repository")) // FIXME snapshot repo | ||
else | ||
Some("Cloudsmith API".at("https://maven.cloudsmith.io/lightbend/akka/"))), | ||
credentials ++= (if (isSnapshot.value) Seq[Credentials]() else cloudsmithCredentials(validate = false)) | ||
) | ||
|
||
def cloudsmithCredentials(validate: Boolean): Seq[Credentials] = { | ||
(sys.env.get("PUBLISH_USER"), sys.env.get("PUBLISH_PASSWORD")) match { | ||
case (Some(user), Some(password)) => | ||
Seq(Credentials("Cloudsmith API", "maven.cloudsmith.io", user, password)) | ||
case _ => | ||
if (validate) | ||
throw new Exception("Publishing credentials expected in `PUBLISH_USER` and `PUBLISH_PASSWORD`.") | ||
else | ||
Nil | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters