2019-01-02 18:55:26 +08:00
|
|
|
/*
|
2022-02-04 12:36:44 +01:00
|
|
|
* Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
|
2014-11-30 15:34:59 +02:00
|
|
|
*/
|
2018-03-13 23:45:55 +09:00
|
|
|
|
2022-11-12 10:21:24 +01:00
|
|
|
package org.apache.pekko
|
2011-09-23 10:21:03 +02:00
|
|
|
|
2011-07-08 18:01:19 +12:00
|
|
|
import sbt._
|
2011-12-09 21:55:49 +13:00
|
|
|
import sbt.Keys._
|
2011-07-08 18:01:19 +12:00
|
|
|
import java.io.File
|
2020-04-28 11:49:42 +02:00
|
|
|
import com.lightbend.sbt.publishrsync.PublishRsyncPlugin.autoImport.publishRsyncHost
|
2021-06-09 15:20:42 +02:00
|
|
|
import xerial.sbt.Sonatype.autoImport.sonatypeProfileName
|
2011-07-08 18:01:19 +12:00
|
|
|
|
2014-11-30 15:34:59 +02:00
|
|
|
object Publish extends AutoPlugin {
|
2011-07-08 18:01:19 +12:00
|
|
|
|
2014-11-30 15:34:59 +02:00
|
|
|
val defaultPublishTo = settingKey[File]("Default publish directory")
|
2011-12-09 21:55:49 +13:00
|
|
|
|
2014-11-30 15:34:59 +02:00
|
|
|
override def trigger = allRequirements
|
|
|
|
|
|
|
|
|
|
override lazy val projectSettings = Seq(
|
2020-03-27 10:30:38 +01:00
|
|
|
publishTo := Some(akkaPublishTo.value),
|
2020-04-28 11:49:42 +02:00
|
|
|
publishRsyncHost := "akkarepo@gustav.akka.io",
|
2011-10-06 15:44:15 +02:00
|
|
|
credentials ++= akkaCredentials,
|
2016-02-23 12:58:39 +01:00
|
|
|
organizationName := "Lightbend Inc.",
|
2019-03-14 08:26:15 +01:00
|
|
|
organizationHomepage := Some(url("https://www.lightbend.com")),
|
2021-06-09 15:20:42 +02:00
|
|
|
sonatypeProfileName := "com.typesafe",
|
2020-11-30 16:39:14 +01:00
|
|
|
startYear := Some(2009),
|
|
|
|
|
developers := List(
|
|
|
|
|
Developer(
|
|
|
|
|
"akka-contributors",
|
|
|
|
|
"Akka Contributors",
|
|
|
|
|
"akka.official@gmail.com",
|
|
|
|
|
url("https://github.com/akka/akka/graphs/contributors"))),
|
2012-03-30 09:59:33 -04:00
|
|
|
publishMavenStyle := true,
|
2019-10-07 18:24:11 +02:00
|
|
|
pomIncludeRepository := { x =>
|
|
|
|
|
false
|
|
|
|
|
},
|
|
|
|
|
defaultPublishTo := target.value / "repository")
|
2011-07-08 18:01:19 +12:00
|
|
|
|
2014-11-30 15:34:59 +02:00
|
|
|
private def akkaPublishTo = Def.setting {
|
2020-03-27 10:30:38 +01:00
|
|
|
val key = new java.io.File(
|
2022-12-02 04:53:48 -08:00
|
|
|
Option(System.getProperty("pekko.gustav.key"))
|
2020-05-25 14:23:43 +02:00
|
|
|
.getOrElse(System.getProperty("user.home") + "/.ssh/id_rsa_gustav.pem"))
|
2020-03-27 10:30:38 +01:00
|
|
|
if (isSnapshot.value)
|
|
|
|
|
Resolver.sftp("Akka snapshots", "gustav.akka.io", "/home/akkarepo/www/snapshots").as("akkarepo", key)
|
|
|
|
|
else
|
|
|
|
|
Opts.resolver.sonatypeStaging
|
2012-08-22 12:54:25 -04:00
|
|
|
}
|
|
|
|
|
|
2014-11-30 15:34:59 +02:00
|
|
|
private def akkaCredentials: Seq[Credentials] =
|
2022-12-02 04:53:48 -08:00
|
|
|
Option(System.getProperty("pekko.publish.credentials")).map(f => Credentials(new File(f))).toSeq
|
2017-10-30 03:13:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2019-10-07 18:24:11 +02:00
|
|
|
* For projects that are not to be published.
|
|
|
|
|
*/
|
2017-10-30 03:13:14 +02:00
|
|
|
object NoPublish extends AutoPlugin {
|
|
|
|
|
override def requires = plugins.JvmPlugin
|
2011-07-08 18:01:19 +12:00
|
|
|
|
2019-10-07 18:24:11 +02:00
|
|
|
override def projectSettings =
|
2021-08-17 19:04:27 +12:00
|
|
|
Seq(publish / skip := true, Compile / doc / sources := Seq.empty)
|
2011-07-08 18:01:19 +12:00
|
|
|
}
|