Skip to content

Commit a43b4b5

Browse files
committed
Tweaks to make sonatype publishing happy
1 parent 0961605 commit a43b4b5

File tree

1 file changed

+34
-38
lines changed

1 file changed

+34
-38
lines changed

build.sbt

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
1+
import xerial.sbt.Sonatype.GitHubHosting
2+
3+
// @formatter:off
14
name := "ijp-scala-console-project"
25

3-
ThisBuild / organization := "net.sf.ij-plugins"
4-
ThisBuild / version := "1.6.0"
5-
ThisBuild / homepage := Some(new URL("https://github.com/ij-plugins/ijp-scala-console"))
6-
ThisBuild / startYear := Some(2013)
7-
ThisBuild / licenses := Seq(("LGPL-2.1", new URL("https://opensource.org/licenses/LGPL-2.1")))
8-
ThisBuild / description :=
6+
ThisBuild / version := "1.6.0"
7+
ThisBuild / versionScheme := Some("early-semver")
8+
ThisBuild / organization := "net.sf.ij-plugins"
9+
ThisBuild / sonatypeProfileName := "net.sf.ij-plugins"
10+
ThisBuild / homepage := Some(new URL("https://github.com/ij-plugins/ijp-scala-console"))
11+
ThisBuild / startYear := Some(2013)
12+
ThisBuild / licenses := Seq(("LGPL-2.1", new URL("https://opensource.org/licenses/LGPL-2.1")))
13+
ThisBuild / description :=
914
"Simple user interface for executing Scala scripts. Can be run stand-alone or embedded in a desktop application."
15+
ThisBuild / developers := List(
16+
Developer(id="jpsacha", name="Jarek Sacha", email="[email protected]", url=url("https://github.com/jpsacha"))
17+
)
18+
19+
publishArtifact := false
20+
publish / skip := true
1021

1122
lazy val _scalaVersions = Seq("2.13.10", "2.12.17")
1223
lazy val _scalaVersion = _scalaVersions.head
@@ -49,27 +60,12 @@ val commonSettings = Seq(
4960
fork := true,
5061
// add a JVM option to use when forking a JVM for 'run'
5162
javaOptions += "-Xmx2G",
52-
publishTo := {
53-
val sonatype = "https://oss.sonatype.org/"
54-
if (isSnapshot.value)
55-
Some("snapshots" at sonatype + "content/repositories/snapshots")
56-
else
57-
Some("releases" at sonatype + "service/local/staging/deploy/maven2")
58-
},
59-
// Info needed sync with Maven central.
60-
pomExtra in Global := {
61-
<scm>
62-
<url>https://github.com/ij-plugins/ijp-scala-console</url>
63-
<connection>scm:https://github.com/ij-plugins/ijp-scala-console.git</connection>
64-
</scm>
65-
<developers>
66-
<developer>
67-
<id>jpsacha</id>
68-
<name>Jarek Sacha</name>
69-
<url>https://github.com/jpsacha</url>
70-
</developer>
71-
</developers>
72-
}
63+
//
64+
manifestSetting,
65+
// Setup publishing
66+
publishMavenStyle := true,
67+
publishTo := sonatypePublishToBundle.value,
68+
sonatypeProjectHosting := Some(GitHubHosting("ij-plugins", "ijp-scala-console", "[email protected]"))
7369
)
7470

7571
// The core ijp-color module
@@ -85,7 +81,7 @@ lazy val scala_console = (project in file("scala-console"))
8581
// set the main class for the main 'run' task
8682
// change Compile to Test to set it for 'test:run'
8783
Compile / run / mainClass := Some("ij_plugins.scala.console.ScalaConsoleApp"),
88-
// // @formatter:off
84+
//
8985
libraryDependencies ++= Seq(
9086
"com.beachape" %% "enumeratum" % "1.7.2",
9187
"org.fxmisc.richtext" % "richtextfx" % "0.11.0",
@@ -96,7 +92,6 @@ lazy val scala_console = (project in file("scala-console"))
9692
"org.scalafx" %% "scalafx-extras" % "0.7.0",
9793
"org.scalatest" %% "scalatest" % "3.2.14" % "test"
9894
),
99-
// // @formatter:on
10095
libraryDependencies ++= (
10196
if (isScala2_12(scalaVersion.value))
10297
Seq(compilerPlugin(
@@ -129,19 +124,20 @@ lazy val scala_console_plugins = (project in file("scala-console-plugins"))
129124

130125
lazy val manifestSetting = packageOptions += {
131126
Package.ManifestAttributes(
132-
"Created-By" -> "Simple Build Tool",
133-
"Built-By" -> Option(System.getenv("JAR_BUILT_BY")).getOrElse(System.getProperty("user.name")),
134-
"Build-Jdk" -> System.getProperty("java.version"),
135-
"Specification-Title" -> name.value,
136-
"Specification-Version" -> version.value,
137-
"Specification-Vendor" -> organization.value,
138-
"Implementation-Title" -> name.value,
139-
"Implementation-Version" -> version.value,
127+
"Created-By" -> "Simple Build Tool",
128+
"Built-By" -> Option(System.getenv("JAR_BUILT_BY")).getOrElse(System.getProperty("user.name")),
129+
"Build-Jdk" -> System.getProperty("java.version"),
130+
"Specification-Title" -> name.value,
131+
"Specification-Version" -> version.value,
132+
"Specification-Vendor" -> organization.value,
133+
"Implementation-Title" -> name.value,
134+
"Implementation-Version" -> version.value,
140135
"Implementation-Vendor-Id" -> organization.value,
141-
"Implementation-Vendor" -> organization.value
136+
"Implementation-Vendor" -> organization.value
142137
)
143138
}
144139

140+
145141
enablePlugins(SbtImageJ)
146142
ijRuntimeSubDir := "sandbox"
147143
ijPluginsSubDir := "ij-plugins"

0 commit comments

Comments
 (0)