Skip to content

Commit 8297954

Browse files
committed
switch from bintray to sonatype
1 parent 816843a commit 8297954

File tree

3 files changed

+71
-52
lines changed

3 files changed

+71
-52
lines changed

build.sbt

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
import sbt.url
2-
import ReleaseTransformations._
3-
41
name := "simple-mongo"
52

6-
organization := "com.sfxcode.nosql"
7-
83
crossScalaVersions := Seq("2.13.6", "2.12.12")
94

105
scalaVersion := crossScalaVersions.value.head
@@ -85,50 +80,8 @@ buildInfoPackage := "com.sfxcode.nosql.mongo"
8580

8681
buildInfoOptions += BuildInfoOption.BuildTime
8782

88-
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))
89-
90-
// publish
91-
92-
releaseCrossBuild := true
93-
94-
ThisBuild / bintrayReleaseOnPublish := true
95-
96-
publishMavenStyle := true
97-
98-
homepage := Some(url("https://github.com/sfxcode/simple-mongo"))
99-
100-
scmInfo := Some(
101-
ScmInfo(
102-
url("https://github.com/sfxcode/simple-mongo"),
103-
"scm:https://github.com/sfxcode/simple-mongo.git"
104-
)
105-
)
106-
107-
developers := List(
108-
Developer(
109-
id = "sfxcode",
110-
name = "Tom Lamers",
111-
email = "tom@sfxcode.com",
112-
url = url("https://github.com/sfxcode")
113-
)
114-
)
115-
116-
releaseProcess := Seq[ReleaseStep](
117-
checkSnapshotDependencies, // : ReleaseStep
118-
inquireVersions, // : ReleaseStep
119-
runClean, // : ReleaseStep
120-
runTest, // : ReleaseStep
121-
setReleaseVersion, // : ReleaseStep
122-
commitReleaseVersion, // : ReleaseStep, performs the initial git checks
123-
tagRelease, // : ReleaseStep
124-
publishArtifacts, // : ReleaseStep, checks whether `publishTo` is properly set up
125-
setNextVersion, // : ReleaseStep
126-
commitNextVersion, // : ReleaseStep
127-
pushChanges // : ReleaseStep, also checks that an upstream branch is properly configured
128-
)
129-
13083
scalafmtOnCompile := false
13184

132-
coverageMinimum := 70
85+
coverageMinimumStmtTotal := 70
13386

13487
coverageFailOnMinimum := true

project/plugins.sbt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.0")
66

77
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
88

9-
// updates, release
9+
// updates
1010

1111
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.0")
1212

13-
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.1")
13+
addSbtPlugin("com.github.fedragon" % "sbt-todolist" % "0.7")
1414

15-
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
15+
// Release
16+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")
1617

17-
addSbtPlugin("com.github.fedragon" % "sbt-todolist" % "0.7")
18+
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
1819

1920
// paradox
2021
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.9.2")

release.sbt

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import sbt.url
2+
3+
organization := "com.sfxcode.nosql"
4+
organizationHomepage := Some(url("https://github.com/sfxcode"))
5+
6+
publishMavenStyle := true
7+
8+
homepage := Some(url("https://github.com/sfxcode/simple-mongo"))
9+
10+
scmInfo := Some(
11+
ScmInfo(
12+
url("https://github.com/sfxcode/simple-mongo"),
13+
"scm:https://github.com/sfxcode/simple-mongo.git"
14+
)
15+
)
16+
17+
developers := List(
18+
Developer(
19+
id = "sfxcode",
20+
name = "Tom Lamers",
21+
email = "tom@sfxcode.com",
22+
url = url("https://github.com/sfxcode")
23+
)
24+
)
25+
26+
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))
27+
28+
// add sonatype repository settings
29+
// snapshot versions publish to sonatype snapshot repository
30+
// other versions publish to sonatype staging repository
31+
publishTo := sonatypePublishToBundle.value
32+
33+
packageOptions += {
34+
Package.ManifestAttributes(
35+
"Created-By" -> "Simple Build Tool",
36+
"Built-By" -> "sfxcode",
37+
"Build-Jdk" -> System.getProperty("java.version"),
38+
"Specification-Title" -> name.value,
39+
"Specification-Version" -> version.value,
40+
"Specification-Vendor" -> organization.value,
41+
"Implementation-Title" -> name.value,
42+
"Implementation-Version" -> version.value,
43+
"Implementation-Vendor-Id" -> organization.value,
44+
"Implementation-Vendor" -> organization.value
45+
)
46+
}
47+
48+
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
49+
50+
releaseCrossBuild := true // true if you cross-build the project for multiple Scala versions
51+
releaseProcess := Seq[ReleaseStep](
52+
checkSnapshotDependencies,
53+
inquireVersions,
54+
runClean,
55+
runTest,
56+
setReleaseVersion,
57+
commitReleaseVersion,
58+
tagRelease,
59+
// For non cross-build projects, use releaseStepCommand("publishSigned")
60+
releaseStepCommandAndRemaining("+publishSigned"),
61+
releaseStepCommand("sonatypeBundleRelease"),
62+
setNextVersion,
63+
commitNextVersion,
64+
pushChanges
65+
)

0 commit comments

Comments
 (0)