@@ -144,6 +144,51 @@ object Settings extends Dependencies {
144144 )
145145 )
146146
147+ private val publishSettings = Seq (
148+ homepage := Some (url(" https://scalaland.io" )),
149+ licenses := Seq (" Apache-2.0" -> url(" http://www.apache.org/licenses/LICENSE-2.0" )),
150+ scmInfo := Some (
151+ ScmInfo (url(" https://github.com/scalalandio/catnip" ), " scm:git:git@github.com:scalalandio/catnip.git" )
152+ ),
153+ publishTo := {
154+ val nexus = " https://oss.sonatype.org/"
155+ if (isSnapshot.value)
156+ Some (" snapshots" at nexus + " content/repositories/snapshots" )
157+ else
158+ Some (" releases" at nexus + " service/local/staging/deploy/maven2" )
159+ },
160+ publishMavenStyle := true ,
161+ publishArtifact in Test := false ,
162+ pomIncludeRepository := { _ =>
163+ false
164+ },
165+ pomExtra :=
166+ <developers >
167+ <developer >
168+ <id >krzemin</id >
169+ <name >Piotr Krzemi ński</name >
170+ <url >https:// github.com/ krzemin</url >
171+ </developer >
172+ <developer >
173+ <id >MateuszKubuszok </id >
174+ <name >Mateusz Kubuszok </name >
175+ <url >https:// github.com/ MateuszKubuszok </url >
176+ </developer >
177+ </developers >
178+ )
179+
180+ private val noPublishSettings =
181+ Seq (skip in publish := true , publishArtifact := false )
182+
183+ implicit class PublishConfigurator (project : Project ) {
184+
185+ def publish : Project = project
186+ .settings(publishSettings)
187+
188+ def noPublish : Project = project
189+ .settings(noPublishSettings)
190+ }
191+
147192 sealed abstract class TestConfigurator (project : Project , config : Configuration ) {
148193
149194 protected def configure (requiresFork : Boolean ): Project = project
0 commit comments