Skip to content

Commit

Permalink
[SPARK] Add Scala 2.11 build in addition to 2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
costin committed Feb 9, 2015
1 parent ad35d92 commit b334e9f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
19 changes: 16 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ allprojects { project ->
//"http://hbase.apache.org/apidocs/",
"http://pig.apache.org/docs/r0.14.0/api/",
// r0.13.1 is invalid as it does not provide the package list
"http://hive.apache.org/javadocs/r1.0.0/api/",
"http://hive.apache.org/javadocs/r0.12.0/api/",
"http://docs.cascading.org/cascading/2.5/javadoc/",
"http://spark.apache.org/docs/latest/api/java/",
"http://storm.apache.org/apidocs/"
Expand Down Expand Up @@ -454,6 +454,19 @@ project(":elasticsearch-hadoop-hive") {
}

project(":elasticsearch-spark") {
def scalaVer = project.hasProperty("scala") ? project.getProperty("scala") : "210"

switch (scalaVer) {
case "211":
ext.scalaVersion = scala211Version
ext.scalaMajorVersion = scala211MajorVersion
break;

default:
ext.scalaVersion = scala210Version
ext.scalaMajorVersion = scala210MajorVersion
}

archivesBaseName += "_$scalaMajorVersion"

if (java8) {
Expand All @@ -464,6 +477,8 @@ project(":elasticsearch-spark") {
apply plugin: 'scala'
}

println "Using Scala $scalaMajorVersion [$scalaVersion]"

description = "Elasticsearch Spark"

nestMRProject(project)
Expand All @@ -477,8 +492,6 @@ project(":elasticsearch-spark") {
provided("javax.servlet:javax.servlet-api:3.0.1")
compile("org.scala-lang:scala-library:$scalaVersion")

//testCompile "org.scalatest:scalatest_$scalaMajorVersion:2.2.0"
//itestRuntime "com.esotericsoftware.kryo:kryo:2.16"
itestCompile "org.apache.spark:spark-sql_$scalaMajorVersion:$sparkVersion"
}

Expand Down
7 changes: 5 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ jacksonVersion = 1.8.8
cascadingVersion = 2.5.6
sparkVersion = 1.2.0
# same as Spark's
scalaVersion = 2.10.4
scalaMajorVersion = 2.10
scala210Version = 2.10.4
scala210MajorVersion = 2.10
scala211Version = 2.11.2
scala211MajorVersion = 2.11

stormVersion = 0.9.3

# Testing
Expand Down

0 comments on commit b334e9f

Please sign in to comment.