Skip to content

Commit

Permalink
publish to oss.sonatype.org (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikerlandson authored Jun 5, 2021
1 parent 23dfd27 commit dec7241
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 31 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Some examples are included below.

### How to include `gibbous` in your project
`gibbous` is a java project, and so can be used either with java or scala.
It is built against apache commons math-3, which you must include
in your project dependencies, as shown below.

```scala
resolvers += "manyangled" at "https://dl.bintray.com/manyangled/maven/"
Versions prior to `gibbous 0.3.0` were published to bintray,
which is no longer operative. It is now available through oss.sonatype.org

`gibbous 0.3.0` is equivalent to `0.2.x`, with the exception of now including
`"org.apache.commons" % "commons-math3" % "3.6.1"` as an explicit dependency.

libraryDependencies ++= Seq(
"com.manyangled" % "gibbous" % "0.2.2",
"org.apache.commons" % "commons-math3" % "3.6.1")
```scala
libraryDependencies ++= "com.manyangled" % "gibbous" % "0.3.0"
```

### Examples
Expand Down
55 changes: 44 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,46 @@
name := "gibbous"

version := "0.3.0"

//isSnapshot := true,

//publishConfiguration := publishConfiguration.value.withOverwrite(true)

publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true)

organization := "com.manyangled"

version := "0.2.3-SNAPSHOT"
pomIncludeRepository := { _ => false }

publishMavenStyle := true

publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

licenses += ("Apache-2.0", url("http://opensource.org/licenses/Apache-2.0"))

homepage := Some(url("https://github.com/isarn/isarn-sketches"))

scmInfo := Some(
ScmInfo(
url("https://github.com/erikerlandson/gibbous.git"),
"scm:git@github.com:erikerlandson/gibbous.git"
)
)

//publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true)
developers := List(
Developer(
id = "erikerlandson",
name = "Erik Erlandson",
email = "eje@redhat.com",
url = url("https://erikerlandson.github.io/")
)
)

crossPaths := false // drop off Scala suffix from artifact names.

Expand All @@ -15,24 +51,21 @@ resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots")
)

// commons math used to be '% Provided' but the 'packageDoc' target
// now fails with that, so I'm just going to make it required
libraryDependencies ++= Seq(
"org.apache.commons" % "commons-math3" % "3.6.1" % Provided,
"org.apache.commons" % "commons-math3" % "3.6.1",
"com.novocode" % "junit-interface" % "0.11" % Test
)

licenses += ("Apache-2.0", url("http://opensource.org/licenses/Apache-2.0"))

compileOrder := CompileOrder.JavaThenScala

javacOptions ++= Seq()

scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature")

scalacOptions in (Compile, doc) ++= Seq("-doc-root-content", baseDirectory.value+"/root-doc.txt")

// xsbt clean xsbt unidoc; xsbt previewSite; xsbt ghpagesPushSite // do clean first!
// sbt clean xsbt unidoc; sbt previewSite; sbt ghpagesPushSite // do clean first!

enablePlugins(JavaUnidocPlugin, GenJavadocPlugin, PublishJavadocPlugin, GhpagesPlugin)
//enablePlugins(JavaUnidocPlugin, GenJavadocPlugin, PublishJavadocPlugin, GhpagesPlugin)
enablePlugins(JavaUnidocPlugin, PublishJavadocPlugin, GhpagesPlugin)

siteSubdirName in JavaUnidoc := "java/api"

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.1.2
sbt.version=1.3.12
17 changes: 5 additions & 12 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
resolvers += Resolver.url(
"bintray-sbt-plugin-releases",
url("http://dl.bintray.com/content/sbt/sbt-plugin-releases"))(
Resolver.ivyStylePatterns)
resolvers += "jgit-repo" at "https://download.eclipse.org/jgit/maven"

resolvers += "sonatype-releases" at "https://oss.sonatype.org/content/repositories/releases/"
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")

resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3")

// addSbtPlugin("me.lessis" % "bintray-sbt" % "0.4.0")
addSbtPlugin("io.crashbox" % "sbt-gpg" % "0.2.1")

addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4")

addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.2")

addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.2")

0 comments on commit dec7241

Please sign in to comment.