File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ variants {
1212 targetVersions ' 2.11.12'
1313}
1414
15+ configurations {
16+ scalaCompilerPlugin {
17+ defaultDependencies { dependencies ->
18+ dependencies. add(project. dependencies. create( " com.typesafe.genjavadoc:genjavadoc-plugin_${ scalaVersion} :0.13" ))
19+ }
20+ }
21+ }
22+
1523println " Compiled using Scala ${ project.ext.scalaMajorVersion} [${ project.ext.scalaVersion} ]"
1624String sparkVersion = spark13Version
1725
@@ -138,7 +146,9 @@ jar {
138146}
139147
140148javadoc {
149+ dependsOn compileScala
141150 source + = project(" :elasticsearch-hadoop-mr" ). sourceSets. main. allJava
151+ source + = " $buildDir /generated/java"
142152 classpath + = files(project(" :elasticsearch-hadoop-mr" ). sourceSets. main. compileClasspath)
143153}
144154
@@ -164,3 +174,12 @@ configurations.all { Configuration conf ->
164174
165175 conf. exclude group : " org.mortbay.jetty"
166176}
177+
178+ tasks. withType(ScalaCompile ) {
179+ scalaCompileOptions. with {
180+ additionalParameters = [
181+ " -Xplugin:" + configurations. scalaCompilerPlugin. asPath,
182+ " -P:genjavadoc:out=$buildDir /generated/java" . toString()
183+ ]
184+ }
185+ }
Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ variants {
1212 targetVersions ' 2.11.12'
1313}
1414
15+ configurations {
16+ scalaCompilerPlugin {
17+ defaultDependencies { dependencies ->
18+ dependencies. add(project. dependencies. create( " com.typesafe.genjavadoc:genjavadoc-plugin_${ scalaVersion} :0.13" ))
19+ }
20+ }
21+ }
22+
1523println " Compiled using Scala ${ project.ext.scalaMajorVersion} [${ project.ext.scalaVersion} ]"
1624String sparkVersion = spark20Version
1725
@@ -152,7 +160,9 @@ jar {
152160}
153161
154162javadoc {
163+ dependsOn compileScala
155164 source + = project(" :elasticsearch-hadoop-mr" ). sourceSets. main. allJava
165+ source + = " $buildDir /generated/java"
156166 classpath + = files(project(" :elasticsearch-hadoop-mr" ). sourceSets. main. compileClasspath)
157167}
158168
@@ -163,3 +173,12 @@ sourcesJar {
163173scaladoc {
164174 title = " ${ rootProject.description} ${ version} API"
165175}
176+
177+ tasks. withType(ScalaCompile ) {
178+ scalaCompileOptions. with {
179+ additionalParameters = [
180+ " -Xplugin:" + configurations. scalaCompilerPlugin. asPath,
181+ " -P:genjavadoc:out=$buildDir /generated/java" . toString()
182+ ]
183+ }
184+ }
You can’t perform that action at this time.
0 commit comments