diff --git a/build.sbt b/build.sbt index d0652bb7..ed45393a 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -val projectVersion = "32.42.0" +val projectVersion = "32.42.1" Global / excludeLintKeys += composeNoBuild diff --git a/project/Common.scala b/project/Common.scala index f2964247..65e4be38 100644 --- a/project/Common.scala +++ b/project/Common.scala @@ -1,13 +1,30 @@ -import java.io.File +import com.jsuereth.sbtpgp.PgpKeys.* +import java.io.File import com.tapad.docker.DockerComposePlugin -import sbt.Keys._ -import sbt._ +import sbt.Keys.* +import sbt.* +import xerial.sbt.Sonatype.autoImport.{sonatypeCredentialHost, sonatypePublishToBundle, sonatypeRepository} object Common { def createSettings(projectVersion: String): Seq[Def.Setting[_]] = Seq( scalaVersion := "2.12.15", - organization := "weco", + organization := "org.wellcomecollection", + homepage := Some(url("https://github.com/wellcomecollection/scala-libs")), + scmInfo := Some( + ScmInfo( + url("https://github.com/wellcomecollection/scala-libs"), + "scm:git:git@github.com:wellcomecollection/scala-libs.git" + ) + ), + developers ++= List( + Developer( + id = "sbrychta", + name = "Stepan Brychta", + email = "s.brychta@wellcome.org", + url = url("https://github.com/StepanBrychta") + ) + ), scalacOptions ++= Seq( "-deprecation", "-unchecked", @@ -22,9 +39,14 @@ object Common { ), parallelExecution in Test := false, publishMavenStyle := true, - publishTo := Some( - "S3 releases" at "s3://releases.mvn-repo.wellcomecollection.org/" - ), + credentials += Credentials(Path.userHome / ".sbt" / "sonatype.credentials"), +// pgpPublicRing := file(System.getProperty("user.home")) / ".gnupg" / "pubring.kbx", +// pgpSecretRing := file(System.getProperty("user.home")) / ".gnupg" / "secring.gpg", + pgpPassphrase := sys.env.get("PGP_PASSPHRASE").map(_.toCharArray), + sonatypeCredentialHost := "central.sonatype.com", + sonatypeRepository := "https://central.sonatype.com/service/local", + licenses := Seq("MIT" -> url("https://github.com/wellcomecollection/scala-libs/blob/main/LICENSE")), + publishTo := sonatypePublishToBundle.value, publishArtifact in Test := true, // Don't build scaladocs // https://www.scala-sbt.org/sbt-native-packager/formats/universal.html#skip-packagedoc-task-on-stage diff --git a/project/plugins.sbt b/project/plugins.sbt index cfc37a23..d72f8d20 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,4 +2,6 @@ addSbtPlugin("com.tapad" % "sbt-docker-compose" % "1.0.34") addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "0.19.0") addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.15") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.3.2") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.1.1") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.11.2") addDependencyTreePlugin