Skip to content

Commit

Permalink
Sonatype publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Aug 15, 2016
1 parent 7bd73f0 commit 73c84a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ lazy val root = (project in file(".")).
)

lazy val app = (project in file("app")).
disablePlugins(BintrayPlugin).
enablePlugins(ConscriptPlugin, BuildInfoPlugin, SonatypePublish).
dependsOn(lib).
settings(
Expand Down Expand Up @@ -80,6 +81,7 @@ lazy val plugin = (project in file("plugin")).
)

lazy val lib = (project in file("library")).
disablePlugins(BintrayPlugin).
enablePlugins(SonatypePublish).
settings(
name := "giter8-lib",
Expand Down
7 changes: 4 additions & 3 deletions project/Publish.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import sbt._
import sbt.Keys._
import bintray.{ BintrayKeys, BintrayPlugin }
import com.typesafe.sbt.JavaVersionCheckPlugin
import JavaVersionCheckPlugin.autoImport._

/**
* Publish to private bintray repository.
*/
object BintrayPublish extends AutoPlugin {
import JavaVersionCheckPlugin.autoImport._
override def trigger = allRequirements
override def requires = plugins.JvmPlugin && BintrayPlugin && JavaVersionCheckPlugin

Expand All @@ -44,14 +44,15 @@ object BintrayPublish extends AutoPlugin {
* Publish to private bintray repository.
*/
object SonatypePublish extends AutoPlugin {
override def requires = plugins.JvmPlugin
override def requires = plugins.JvmPlugin && JavaVersionCheckPlugin

override def projectSettings = Seq(
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")
}
},
javaVersionPrefix in javaVersionCheck := Some("1.6")
)
}

Expand Down

0 comments on commit 73c84a6

Please sign in to comment.