From 28ad22aadb9796a7ff76b6974ef540e553e41f17 Mon Sep 17 00:00:00 2001 From: Dhirendra Kumar Kashyap Date: Sat, 5 Nov 2022 01:37:33 +0530 Subject: [PATCH] Made required changes to Publish ZIO Http under dev.zio (#1748) --- project/BuildHelper.scala | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/project/BuildHelper.scala b/project/BuildHelper.scala index 012db6df9e..8593bbb141 100644 --- a/project/BuildHelper.scala +++ b/project/BuildHelper.scala @@ -16,7 +16,7 @@ object BuildHelper extends ScalaSettings { "UTF-8", "-feature", "-unchecked", - "-language:postfixOps", + "-language:postfixOps" ) ++ { if (sys.env.contains("CI")) { Seq("-Xfatal-warnings") @@ -37,14 +37,27 @@ object BuildHelper extends ScalaSettings { val publishSettings = Seq( organization := "dev.zio", organizationName := "zio", - licenses += ("MIT License", new URL("https://github.com/zio/zio-http/blob/master/LICENSE")), + licenses := Seq("MIT License" -> url("https://github.com/zio/zio-http/blob/master/LICENSE")), sonatypeCredentialHost := "oss.sonatype.org", sonatypeRepository := "https://oss.sonatype.org/service/local", sonatypeProfileName := "dev.zio", + publishTo := sonatypePublishToBundle.value, + sonatypeTimeoutMillis := 300 * 60 * 1000, + publishMavenStyle := true, + credentials ++= + (for { + username <- Option(System.getenv().get("SONATYPE_USERNAME")) + password <- Option(System.getenv().get("SONATYPE_PASSWORD")) + } yield Credentials( + "Sonatype Nexus Repository Manager", + "oss.sonatype.org", + username, + password + )).toSeq ) val skipSettings = Seq( publish / skip := true, - publishArtifact := false, + publishArtifact := false ) if (publishArtifacts) publishSettings else publishSettings ++ skipSettings } @@ -68,12 +81,12 @@ object BuildHelper extends ScalaSettings { "-Dio.netty.leakDetectionLevel=paranoid", s"-DZIOHttpLogLevel=${Debug.ZIOHttpLogLevel}", ), - ThisBuild / fork := true, + ThisBuild / fork := true ) def runSettings(className: String = "example.HelloWorld") = Seq( fork := true, - Compile / run / mainClass := Option(className), + Compile / run / mainClass := Option(className) ) def meta = Seq( @@ -94,7 +107,7 @@ object BuildHelper extends ScalaSettings { "Amit Kumar Singh", "amit.singh@dream11.com", new URL("https://github.com/amitksingh1490"), - ), + ) ), ) }