Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions spark/sql-13/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ variants {
targetVersions '2.11.12'
}

configurations {
scalaCompilerPlugin {
defaultDependencies { dependencies ->
dependencies.add(project.dependencies.create( "com.typesafe.genjavadoc:genjavadoc-plugin_${scalaVersion}:0.13"))
}
}
}

println "Compiled using Scala ${project.ext.scalaMajorVersion} [${project.ext.scalaVersion}]"
String sparkVersion = spark13Version

Expand Down Expand Up @@ -116,7 +124,9 @@ jar {
}

javadoc {
dependsOn compileScala
source += project(":elasticsearch-hadoop-mr").sourceSets.main.allJava
source += "$buildDir/generated/java"
classpath += files(project(":elasticsearch-hadoop-mr").sourceSets.main.compileClasspath)
}

Expand All @@ -142,3 +152,12 @@ configurations.all { Configuration conf ->

conf.exclude group: "org.mortbay.jetty"
}

tasks.withType(ScalaCompile) {
scalaCompileOptions.with {
additionalParameters = [
"-Xplugin:" + configurations.scalaCompilerPlugin.asPath,
"-P:genjavadoc:out=$buildDir/generated/java".toString()
]
}
}
14 changes: 13 additions & 1 deletion spark/sql-20/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ variants {
targetVersions '2.11.12'
}

configurations {
scalaCompilerPlugin {
defaultDependencies { dependencies ->
dependencies.add(project.dependencies.create( "com.typesafe.genjavadoc:genjavadoc-plugin_${scalaVersion}:0.13"))
}
}
}

println "Compiled using Scala ${project.ext.scalaMajorVersion} [${project.ext.scalaVersion}]"
String sparkVersion = spark20Version

Expand All @@ -38,7 +46,9 @@ compileScala {
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfatal-warnings"
"-Xfatal-warnings",
"-Xplugin:" + configurations.scalaCompilerPlugin.asPath,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that in the sql-13 build file we add these with tasks.withType(...) instead of appending here. I think I'm fine with either, but we should try to do the same in both files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 2e42e73

"-P:genjavadoc:out=$buildDir/generated/java".toString()
]
}

Expand Down Expand Up @@ -129,7 +139,9 @@ jar {
}

javadoc {
dependsOn compileScala
source += project(":elasticsearch-hadoop-mr").sourceSets.main.allJava
source += "$buildDir/generated/java"
classpath += files(project(":elasticsearch-hadoop-mr").sourceSets.main.compileClasspath)
}

Expand Down