Skip to content

Commit

Permalink
Prepare to publish 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Katrix committed Jan 15, 2018
1 parent ba29252 commit def034d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
48 changes: 45 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import sbt.Keys.resolvers

lazy val commonSettings = Seq(
organization := "net.katsstuff",
scalaVersion := "2.12.4",
Expand All @@ -11,11 +9,39 @@ lazy val commonSettings = Seq(
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-unused-import"
)
),
//Fixes repository not specified error
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")
}
)

lazy val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ =>
false
},
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")),
scmInfo := Some(
ScmInfo(
url("https://github.com/Katrix-/Scammander"),
"scm:git:github.com/Katrix-/Scammander",
Some("scm:git:github.com/Katrix-/Scammander")
)
),
homepage := Some(url("https://github.com/Katrix-/Scammander")),
developers := List(Developer("Katrix", "Nikolai Frid", "[email protected]", url("http://katsstuff.net/"))),
autoAPIMappings := true
)

lazy val noPublishSettings = Seq(publish := {}, publishLocal := {}, publishArtifact := false)

lazy val common = project.settings(
commonSettings,
publishSettings,
name := "scammander",
version := "0.1",
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.3",
Expand All @@ -25,6 +51,7 @@ lazy val common = project.settings(
lazy val sponge7 = project
.settings(
commonSettings,
publishSettings,
name := "scammander-sponge7",
version := "0.1",
resolvers += "Sponge" at "http://repo.spongepowered.org/maven",
Expand All @@ -35,10 +62,25 @@ lazy val sponge7 = project
lazy val bukkit = project
.settings(
commonSettings,
publishSettings,
name := "scammander-bukkit",
version := "0.1",
resolvers += "Spigot" at "https://hub.spigotmc.org/nexus/content/repositories/snapshots",
resolvers += "BungeeCord" at "https://oss.sonatype.org/content/repositories/snapshots",
libraryDependencies += "org.spigotmc" % "spigot-api" % "1.12-R0.1-SNAPSHOT"
)
.dependsOn(common)

lazy val scammanderRoot = project
.in(file("."))
.aggregate(common, sponge7, bukkit)
.settings(
noPublishSettings,
//Fixes repository not specified error
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")
}
)
.enablePlugins(ScalaUnidocPlugin)
1 change: 1 addition & 0 deletions project/unidoc.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.1")

0 comments on commit def034d

Please sign in to comment.