Created
February 25, 2019 14:25
-
-
Save daschl/f3d33e74bf14a88e859bf0d31882932f to your computer and use it in GitHub Desktop.
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
plugins { | |
id 'scala' | |
id 'maven-publish' | |
} | |
repositories { | |
mavenCentral() | |
jcenter() | |
} | |
ext { | |
scalaVersion = "2.11" | |
sparkVersion = "2.3.0" | |
} | |
dependencies { | |
compile files("$sourceSets.main.scala.outputDir") | |
compile "org.scala-lang:scala-library:$scalaVersion" | |
compile "com.couchbase.client:java-client:2.7.2" | |
compile "com.couchbase.client:dcp-client:0.21.0" | |
compile "io.reactivex:rxscala_$scalaVersion:0.26.5" | |
compile "org.apache.logging.log4j:log4j-api:2.2" | |
compileOnly "org.apache.spark:spark-core_$scalaVersion:$sparkVersion" | |
compileOnly "org.apache.spark:spark-streaming_$scalaVersion:$sparkVersion" | |
compileOnly "org.apache.spark:spark-sql_$scalaVersion:$sparkVersion" | |
testCompile "junit:junit:4.12" | |
testCompile "org.scalatest:scalatest_$scalaVersion:2.2.5" | |
} | |
publishing { | |
publications { | |
mavenJava(MavenPublication) { | |
artifactId = 'spark-connector' | |
pom { | |
description = 'Official Couchbase Spark Connector' | |
} | |
} | |
} | |
} | |
tasks.compileJava.dependsOn compileScala | |
tasks.compileScala.dependsOn.remove("compileJava") | |
sourceSets { | |
main { | |
scala { | |
outputDir = file("$buildDir/classes/scala/main") | |
} | |
java { | |
outputDir = file("$buildDir/classes/java/main") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment