Skip to content

Commit

Permalink
Add publish stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
adelbertc committed Mar 16, 2016
1 parent c010a84 commit d5dec9d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
37 changes: 37 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ val scalacheck = "1.12.5"
lazy val root = Project("frameless", file("." + "frameless")).in(file("."))
.aggregate(common, cats, dataset, dataframe)
.settings(framelessSettings: _*)
.settings(noPublishSettings: _*)

lazy val common = project
.settings(framelessSettings: _*)
Expand All @@ -20,13 +21,15 @@ lazy val common = project
lazy val cats = project
.settings(name := "frameless-cats")
.settings(framelessSettings: _*)
.settings(publishSettings: _*)
.settings(libraryDependencies ++= Seq(
"org.typelevel" %% "cats" % catsv,
"org.apache.spark" %% "spark-core" % sparkCats))

lazy val dataset = project
.settings(name := "frameless-dataset")
.settings(framelessSettings: _*)
.settings(publishSettings: _*)
.settings(libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkDataset,
"org.apache.spark" %% "spark-sql" % sparkDataset))
Expand All @@ -35,6 +38,7 @@ lazy val dataset = project
lazy val dataframe = project
.settings(name := "frameless-dataframe")
.settings(framelessSettings: _*)
.settings(publishSettings: _*)
.settings(libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % sparkDataFrame,
"org.apache.spark" %% "spark-sql" % sparkDataFrame))
Expand Down Expand Up @@ -87,3 +91,36 @@ lazy val warnUnusedImport = Seq(
scalacOptions in (Compile, console) ~= {_.filterNot("-Ywarn-unused-import" == _)},
scalacOptions in (Test, console) <<= (scalacOptions in (Compile, console))
)

lazy val publishSettings = Seq(
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")
},
publishArtifact in Test := false,
pomIncludeRepository := Function.const(false),
pomExtra in Global := {
<url>https://github.com/adelbertc/frameless</url>
<scm>
<url>git@github.com:adelbertc/frameless.git</url>
<connection>scm:git:git@github.com:adelbertc/frameless.git</connection>
</scm>
<developers>
<developer>
<id>adelbertc</id>
<name>Adelbert Chang</name>
<url>https://github.com/adelbertc/</url>
</developer>
</developers>
}
)

lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publishArtifact := false
)
3 changes: 3 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

0 comments on commit d5dec9d

Please sign in to comment.