forked from typelevel/frameless
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4ad9f4
commit 5c10967
Showing
3 changed files
with
59 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,51 @@ | ||
name := "frameless" | ||
val home = "https://github.com/adelbertc/frameless" | ||
val repo = "[email protected]:adelbertc/frameless.git" | ||
val org = "github.com/adelbertc/frameless" | ||
val license = ("Apache-2.0", url("http:https://opensource.org/licenses/Apache-2.0")) | ||
|
||
version := "0.0.1" | ||
val sparkDataset = "1.6.0" | ||
val sparkDataFrame = "1.5.2" | ||
val scalatest = "2.2.5" | ||
val shapeless = "2.2.5" | ||
val scalaVersions = Seq("2.10.6", "2.11.7") | ||
|
||
licenses := Seq(("Apache-2.0", url("http:https://opensource.org/licenses/Apache-2.0"))) | ||
lazy val root = Project("frameless", file("." + "frameless")).in(file(".")) | ||
.aggregate(common, dataset, dataframe) | ||
.settings(framelessSettings: _*) | ||
|
||
val sparkVersion = "1.6.0" | ||
lazy val common = project | ||
.settings(framelessSettings: _*) | ||
.settings(libraryDependencies += | ||
"org.apache.spark" %% "spark-sql" % sparkDataFrame) | ||
|
||
scalaVersion := "2.11.7" | ||
lazy val dataset = project | ||
.settings(framelessSettings: _*) | ||
.settings(libraryDependencies ++= Seq( | ||
"org.apache.spark" %% "spark-core" % sparkDataset, | ||
"org.apache.spark" %% "spark-sql" % sparkDataset)) | ||
.dependsOn(common) | ||
|
||
scalacOptions := Seq( | ||
lazy val dataframe = project | ||
.settings(framelessSettings: _*) | ||
.settings(libraryDependencies ++= Seq( | ||
"org.apache.spark" %% "spark-core" % sparkDataFrame, | ||
"org.apache.spark" %% "spark-sql" % sparkDataFrame)) | ||
.settings(sourceGenerators in Compile <+= (sourceManaged in Compile).map(Boilerplate.gen)) | ||
.dependsOn(common) | ||
|
||
lazy val framelessSettings = Seq( | ||
scalaVersion := scalaVersions.last, | ||
organization := org, | ||
crossScalaVersions := scalaVersions, | ||
scalacOptions ++= commonScalacOptions, | ||
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-oDF"), | ||
libraryDependencies ++= Seq( | ||
"com.chuusai" %% "shapeless" % shapeless, | ||
"org.scalatest" %% "scalatest" % scalatest % "test"), | ||
parallelExecution in Test := false | ||
) ++ warnUnusedImport | ||
|
||
lazy val commonScalacOptions = Seq( | ||
"-deprecation", | ||
"-encoding", "UTF-8", | ||
"-feature", | ||
|
@@ -19,19 +56,19 @@ scalacOptions := Seq( | |
"-Yno-adapted-args", | ||
"-Ywarn-dead-code", | ||
"-Ywarn-numeric-widen", | ||
"-Ywarn-unused-import", | ||
"-Ywarn-value-discard", | ||
"-Xfatal-warnings", | ||
"-Xfuture") | ||
|
||
libraryDependencies := Seq( | ||
"org.scalatest" % "scalatest_2.11" % "2.2.5" % "test", | ||
"com.chuusai" %% "shapeless" % "2.2.5", | ||
"eu.timepit" %% "refined" % "0.3.2", | ||
"org.apache.spark" %% "spark-core" % sparkVersion, | ||
"org.apache.spark" %% "spark-sql" % sparkVersion, | ||
"org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided") | ||
|
||
fork in Test := true | ||
|
||
sourceGenerators in Compile <+= (sourceManaged in Compile).map(Boilerplate.gen) | ||
lazy val warnUnusedImport = Seq( | ||
scalacOptions ++= { | ||
CrossVersion.partialVersion(scalaVersion.value) match { | ||
case Some((2, 10)) => | ||
Seq() | ||
case Some((2, n)) if n >= 11 => | ||
Seq("-Ywarn-unused-import") | ||
} | ||
}, | ||
scalacOptions in (Compile, console) ~= {_.filterNot("-Ywarn-unused-import" == _)}, | ||
scalacOptions in (Test, console) <<= (scalacOptions in (Compile, console)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version in ThisBuild := "0.0.1-SNAPSHOT" |