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.10.7' , ' 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
@@ -111,7 +119,9 @@ jar {
111119}
112120
113121javadoc {
122+ dependsOn compileScala
114123 source + = project(" :elasticsearch-hadoop-mr" ). sourceSets. main. allJava
124+ source + = " $buildDir /generated/java"
115125 classpath + = files(project(" :elasticsearch-hadoop-mr" ). sourceSets. main. compileClasspath)
116126}
117127
@@ -137,3 +147,12 @@ configurations.all { Configuration conf ->
137147
138148 conf. exclude group : " org.mortbay.jetty"
139149}
150+
151+ tasks. withType(ScalaCompile ) {
152+ scalaCompileOptions. with {
153+ additionalParameters = [
154+ " -Xplugin:" + configurations. scalaCompilerPlugin. asPath,
155+ " -P:genjavadoc:out=$buildDir /generated/java" . toString()
156+ ]
157+ }
158+ }
Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ variants {
1212 targetVersions ' 2.10.7' , ' 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
@@ -124,7 +132,9 @@ jar {
124132}
125133
126134javadoc {
135+ dependsOn compileScala
127136 source + = project(" :elasticsearch-hadoop-mr" ). sourceSets. main. allJava
137+ source + = " $buildDir /generated/java"
128138 classpath + = files(project(" :elasticsearch-hadoop-mr" ). sourceSets. main. compileClasspath)
129139}
130140
@@ -135,3 +145,12 @@ sourcesJar {
135145scaladoc {
136146 title = " ${ rootProject.description} ${ version} API"
137147}
148+
149+ tasks. withType(ScalaCompile ) {
150+ scalaCompileOptions. with {
151+ additionalParameters = [
152+ " -Xplugin:" + configurations. scalaCompilerPlugin. asPath,
153+ " -P:genjavadoc:out=$buildDir /generated/java" . toString()
154+ ]
155+ }
156+ }
You can’t perform that action at this time.
0 commit comments