Skip to content

Commit df14386

Browse files
Configured for sonatype
1 parent 38dac86 commit df14386

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

ocdquery.sbt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ lazy val root = project.root
55
.setName("ocdquery")
66
.setDescription("OCD Query build")
77
.configureRoot
8+
.noPublish
89
.aggregate(core)
910

1011
lazy val core = project.from("core")
11-
.setName("core")
12+
.setName("ocdquery-core")
1213
.setDescription("Library for generating Doobie fragments out of higher-kinded data")
1314
.setInitialImport()
1415
.configureModule
1516
.configureTests()
17+
.publish
1618
.settings(Compile / resourceGenerators += task[Seq[File]] {
1719
val file = (Compile / resourceManaged).value / "ocdquery-version.conf"
1820
IO.write(file, s"version=${version.value}")

project/Settings.scala

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.3.0-RC1
1+
sbt.version=1.3.0-RC3

0 commit comments

Comments
 (0)