This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 23080acba7c7 [SPARK-45155][CONNECT] Add API Docs for Spark Connect 
JVM/Scala Client
23080acba7c7 is described below

commit 23080acba7c72d26e7e10c2200aa0f30f7fe7429
Author: Paddy Xu <[email protected]>
AuthorDate: Tue Jul 16 09:05:31 2024 +0900

    [SPARK-45155][CONNECT] Add API Docs for Spark Connect JVM/Scala Client
    
    This PR is based on https://github.com/apache/spark/pull/42911.
    
    ### What changes were proposed in this pull request?
    
    - Enables Scala and Java Unidoc generation for the `connectClient` project.
    - Generates docs and moves them to the `docs/api/connect` folder.
    
    Some methods' documentation in the connect directory had to be modified to 
remove references to avoid javadoc generation failures. **References API docs 
in the main index page and the global floating header will be added in a later 
PR.**
    
    ### Why are the changes needed?
    
    Increasing scope of documentation for the Spark Connect JVM/Scala Client 
project.
    
    ### Does this PR introduce _any_ user-facing change?
    
    Nope.
    
    ### How was this patch tested?
    
    Manual test.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #47332 from xupefei/connnect-doc-web.
    
    Authored-by: Paddy Xu <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 .../org/apache/spark/sql/DataFrameWriter.scala     |  8 +-
 .../org/apache/spark/sql/DataFrameWriterV2.scala   | 30 ++-----
 .../apache/spark/sql/KeyValueGroupedDataset.scala  |  8 --
 .../scala/org/apache/spark/sql/SparkSession.scala  | 11 ++-
 .../apache/spark/sql/test/RemoteSparkSession.scala | 12 +--
 docs/_plugins/build_api_docs.rb                    | 94 +++++++++++-----------
 docs/index.md                                      |  1 +
 project/SparkBuild.scala                           | 67 ++++++++++++---
 8 files changed, 120 insertions(+), 111 deletions(-)

diff --git 
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
 
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
index 563a9865e73f..b499c2a5d909 100644
--- 
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
+++ 
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
@@ -478,13 +478,7 @@ final class DataFrameWriter[T] private[sql] (ds: 
Dataset[T]) {
    * }}}
    *
    * Note that writing a XML file from `DataFrame` having a field `ArrayType` 
with its element as
-   * `ArrayType` would have an additional nested field for the element. For 
example, the
-   * `DataFrame` having a field below,
-   *
-   * {@code fieldA [[data1], [data2]]}
-   *
-   * would produce a XML file below. { @code <fieldA> <item>data1</item> 
</fieldA> <fieldA>
-   * <item>data2</item> </fieldA>}
+   * `ArrayType` would have an additional nested field for the element.
    *
    * Namely, roundtrip in writing and reading can end up in different schema 
structure.
    *
diff --git 
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala
 
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala
index 7107895c0ad2..c419c9079f02 100644
--- 
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala
+++ 
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala
@@ -92,12 +92,8 @@ final class DataFrameWriterV2[T] private[sql] (table: 
String, ds: Dataset[T])
   /**
    * Append the contents of the data frame to the output table.
    *
-   * If the output table does not exist, this operation will fail with
-   * [[org.apache.spark.sql.catalyst.analysis.NoSuchTableException]]. The data 
frame will be
+   * If the output table does not exist, this operation will fail. The data 
frame will be
    * validated to ensure it is compatible with the existing table.
-   *
-   * @throws org.apache.spark.sql.catalyst.analysis.NoSuchTableException
-   *   If the table does not exist
    */
   def append(): Unit = {
     executeWriteOperation(proto.WriteOperationV2.Mode.MODE_APPEND)
@@ -107,12 +103,8 @@ final class DataFrameWriterV2[T] private[sql] (table: 
String, ds: Dataset[T])
    * Overwrite rows matching the given filter condition with the contents of 
the data frame in the
    * output table.
    *
-   * If the output table does not exist, this operation will fail with
-   * [[org.apache.spark.sql.catalyst.analysis.NoSuchTableException]]. The data 
frame will be
+   * If the output table does not exist, this operation will fail. The data 
frame will be
    * validated to ensure it is compatible with the existing table.
-   *
-   * @throws org.apache.spark.sql.catalyst.analysis.NoSuchTableException
-   *   If the table does not exist
    */
   def overwrite(condition: Column): Unit = {
     overwriteCondition = Some(condition.expr)
@@ -126,12 +118,8 @@ final class DataFrameWriterV2[T] private[sql] (table: 
String, ds: Dataset[T])
    * This operation is equivalent to Hive's `INSERT OVERWRITE ... PARTITION`, 
which replaces
    * partitions dynamically depending on the contents of the data frame.
    *
-   * If the output table does not exist, this operation will fail with
-   * [[org.apache.spark.sql.catalyst.analysis.NoSuchTableException]]. The data 
frame will be
+   * If the output table does not exist, this operation will fail. The data 
frame will be
    * validated to ensure it is compatible with the existing table.
-   *
-   * @throws org.apache.spark.sql.catalyst.analysis.NoSuchTableException
-   *   If the table does not exist
    */
   def overwritePartitions(): Unit = {
     
executeWriteOperation(proto.WriteOperationV2.Mode.MODE_OVERWRITE_PARTITIONS)
@@ -225,11 +213,7 @@ trait CreateTableWriter[T] extends 
WriteConfigMethods[CreateTableWriter[T]] {
    * The new table's schema, partition layout, properties, and other 
configuration will be based
    * on the configuration set on this writer.
    *
-   * If the output table exists, this operation will fail with
-   * [[org.apache.spark.sql.catalyst.analysis.TableAlreadyExistsException]].
-   *
-   * @throws org.apache.spark.sql.catalyst.analysis.TableAlreadyExistsException
-   *   If the table already exists
+   * If the output table exists, this operation will fail.
    */
   def create(): Unit
 
@@ -239,11 +223,7 @@ trait CreateTableWriter[T] extends 
WriteConfigMethods[CreateTableWriter[T]] {
    * The existing table's schema, partition layout, properties, and other 
configuration will be
    * replaced with the contents of the data frame and the configuration set on 
this writer.
    *
-   * If the output table does not exist, this operation will fail with
-   * 
[[org.apache.spark.sql.catalyst.analysis.CannotReplaceMissingTableException]].
-   *
-   * @throws 
org.apache.spark.sql.catalyst.analysis.CannotReplaceMissingTableException
-   *   If the table does not exist
+   * If the output table does not exist, this operation will fail.
    */
   def replace(): Unit
 
diff --git 
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/KeyValueGroupedDataset.scala
 
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/KeyValueGroupedDataset.scala
index 953cf23afc33..d2875dfe48c8 100644
--- 
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/KeyValueGroupedDataset.scala
+++ 
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/KeyValueGroupedDataset.scala
@@ -157,8 +157,6 @@ class KeyValueGroupedDataset[K, V] private[sql] () extends 
Serializable {
    * sorted according to the given sort expressions. That sorting does not add 
computational
    * complexity.
    *
-   * @see
-   *   [[org.apache.spark.sql.KeyValueGroupedDataset#flatMapGroups]]
    * @since 3.5.0
    */
   def flatMapSortedGroups[U: Encoder](sortExprs: Column*)(
@@ -186,8 +184,6 @@ class KeyValueGroupedDataset[K, V] private[sql] () extends 
Serializable {
    * sorted according to the given sort expressions. That sorting does not add 
computational
    * complexity.
    *
-   * @see
-   *   [[org.apache.spark.sql.KeyValueGroupedDataset#flatMapGroups]]
    * @since 3.5.0
    */
   def flatMapSortedGroups[U](
@@ -429,8 +425,6 @@ class KeyValueGroupedDataset[K, V] private[sql] () extends 
Serializable {
    * sorted according to the given sort expressions. That sorting does not add 
computational
    * complexity.
    *
-   * @see
-   *   [[org.apache.spark.sql.KeyValueGroupedDataset#cogroup]]
    * @since 3.5.0
    */
   def cogroupSorted[U, R: Encoder](other: KeyValueGroupedDataset[K, 
U])(thisSortExprs: Column*)(
@@ -450,8 +444,6 @@ class KeyValueGroupedDataset[K, V] private[sql] () extends 
Serializable {
    * sorted according to the given sort expressions. That sorting does not add 
computational
    * complexity.
    *
-   * @see
-   *   [[org.apache.spark.sql.KeyValueGroupedDataset#cogroup]]
    * @since 3.5.0
    */
   def cogroupSorted[U, R](
diff --git 
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/SparkSession.scala
 
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/SparkSession.scala
index 5a6961bb8740..2e54617928aa 100644
--- 
a/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/SparkSession.scala
+++ 
b/connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/SparkSession.scala
@@ -459,8 +459,8 @@ class SparkSession private[sql] (
   // scalastyle:off
   // Disable style checker so "implicits" object can start with lowercase i
   /**
-   * (Scala-specific) Implicit methods available in Scala for converting 
common names and
-   * [[Symbol]]s into [[Column]]s, and for converting common Scala objects 
into `DataFrame`s.
+   * (Scala-specific) Implicit methods available in Scala for converting 
common names and Symbols
+   * into [[Column]]s, and for converting common Scala objects into 
DataFrame`s.
    *
    * {{{
    *   val sparkSession = SparkSession.builder.getOrCreate()
@@ -647,8 +647,7 @@ class SparkSession private[sql] (
   def addArtifacts(uri: URI*): Unit = client.addArtifacts(uri)
 
   /**
-   * Register a [[ClassFinder]] for dynamically generated classes.
-   *
+   * Register a ClassFinder for dynamically generated classes.
    * @since 3.5.0
    */
   @Experimental
@@ -715,7 +714,7 @@ class SparkSession private[sql] (
    * Release the current session and close the GRPC connection to the server. 
The API will not
    * error if any of these operations fail. Closing a closed session is a 
no-op.
    *
-   * Close the allocator. Fail if there are still open [[SparkResult]]s.
+   * Close the allocator. Fail if there are still open SparkResults.
    *
    * @since 3.4.0
    */
@@ -899,7 +898,7 @@ object SparkSession extends Logging {
     }
 
     /**
-     * Add an interceptor [[ClientInterceptor]] to be used during channel 
creation.
+     * Add an interceptor to be used during channel creation.
      *
      * Note that interceptors added last are executed first by gRPC.
      *
diff --git 
a/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/test/RemoteSparkSession.scala
 
b/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/test/RemoteSparkSession.scala
index a7864a1badf4..95326ce7e8ce 100644
--- 
a/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/test/RemoteSparkSession.scala
+++ 
b/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/test/RemoteSparkSession.scala
@@ -36,14 +36,7 @@ import org.apache.spark.util.ArrayImplicits._
 /**
  * An util class to start a local spark connect server in a different process 
for local E2E tests.
  * Pre-running the tests, the spark connect artifact needs to be built using 
e.g. `build/sbt
- * package`. It is designed to start the server once but shared by all tests. 
It is equivalent to
- * use the following command to start the connect server via command line:
- *
- * {{{
- * bin/spark-shell \
- * --jars `ls connect/server/target/**/spark-connect*SNAPSHOT.jar | paste -sd 
',' -` \
- * --conf spark.plugins=org.apache.spark.sql.connect.SparkConnectPlugin
- * }}}
+ * package`. It is designed to start the server once but shared by all tests.
  *
  * Set system property `spark.test.home` or env variable `SPARK_HOME` if the 
test is not executed
  * from the Spark project top folder. Set system property 
`spark.debug.sc.jvm.client=true` or
@@ -52,6 +45,9 @@ import org.apache.spark.util.ArrayImplicits._
  */
 object SparkConnectServerUtils {
 
+  // The equivalent command to start the connect server via command line:
+  // bin/spark-shell --conf 
spark.plugins=org.apache.spark.sql.connect.SparkConnectPlugin
+
   // Server port
   val port: Int =
     ConnectCommon.CONNECT_GRPC_BINDING_PORT + util.Random.nextInt(1000)
diff --git a/docs/_plugins/build_api_docs.rb b/docs/_plugins/build_api_docs.rb
index 8d3ef86ac3d6..c8bd9a700f6c 100644
--- a/docs/_plugins/build_api_docs.rb
+++ b/docs/_plugins/build_api_docs.rb
@@ -46,48 +46,25 @@ def build_spark_if_necessary
   $spark_package_is_built = true
 end
 
-def build_scala_and_java_docs
-  build_spark_if_necessary
-
-  print_header "Building Scala and Java API docs."
-  cd(SPARK_PROJECT_ROOT)
-
-  command = "build/sbt -Pkinesis-asl unidoc"
-  puts "Running '#{command}'..."
-  system(command) || raise("Unidoc generation failed")
-
-  puts "Moving back into docs dir."
-  cd("docs")
-
-  puts "Removing old docs"
-  system("rm -rf api")
-
-  # Copy over the unified ScalaDoc for all projects to api/scala.
-  # This directory will be copied over to _site when `jekyll` command is run.
-  source = "../target/scala-2.13/unidoc"
-  dest = "api/scala"
-
-  puts "Making directory " + dest
-  mkdir_p dest
-
-  # From the rubydoc: cp_r('src', 'dest') makes src/dest, but this doesn't.
-  puts "cp -r " + source + "/. " + dest
-  cp_r(source + "/.", dest)
-
-  # Append custom JavaScript
-  js = File.readlines("./js/api-docs.js")
-  js_file = dest + "/lib/template.js"
-  File.open(js_file, 'a') { |f| f.write("\n" + js.join()) }
-
-  # Append custom CSS
-  css = File.readlines("./css/api-docs.css")
-  css_file = dest + "/lib/template.css"
-  File.open(css_file, 'a') { |f| f.write("\n" + css.join()) }
-
-  # Copy over the unified JavaDoc for all projects to api/java.
-  source = "../target/javaunidoc"
-  dest = "api/java"
+def copy_and_update_scala_docs(source, dest)
+    puts "Making directory " + dest
+    mkdir_p dest
+
+    puts "cp -r " + source + "/. " + dest
+    cp_r(source + "/.", dest)
+
+    # Append custom JavaScript
+    js = File.readlines("./js/api-docs.js")
+    js_file = dest + "/lib/template.js"
+    File.open(js_file, 'a') { |f| f.write("\n" + js.join()) }
+
+    # Append custom CSS
+    css = File.readlines("./css/api-docs.css")
+    css_file = dest + "/lib/template.css"
+    File.open(css_file, 'a') { |f| f.write("\n" + css.join()) }
+end
 
+def copy_and_update_java_docs(source, dest, scala_source)
   puts "Making directory " + dest
   mkdir_p dest
 
@@ -123,14 +100,14 @@ def build_scala_and_java_docs
   # End updating JavaDoc files for badge post-processing
 
   puts "Copying jquery.min.js from Scala API to Java API for page 
post-processing of badges"
-  jquery_src_file = "./api/scala/lib/jquery.min.js"
-  jquery_dest_file = "./api/java/lib/jquery.min.js"
-  mkdir_p("./api/java/lib")
+  jquery_src_file = scala_source + "/lib/jquery.min.js"
+  jquery_dest_file = dest + "/lib/jquery.min.js"
+  mkdir_p(dest + "/lib")
   cp(jquery_src_file, jquery_dest_file)
 
   puts "Copying api_javadocs.js to Java API for page post-processing of badges"
   api_javadocs_src_file = "./js/api-javadocs.js"
-  api_javadocs_dest_file = "./api/java/lib/api-javadocs.js"
+  api_javadocs_dest_file = dest + "/lib/api-javadocs.js"
   cp(api_javadocs_src_file, api_javadocs_dest_file)
 
   puts "Appending content of api-javadocs.css to JavaDoc stylesheet.css for 
badge styles"
@@ -139,6 +116,33 @@ def build_scala_and_java_docs
   File.open(css_file, 'a') { |f| f.write("\n" + css.join()) }
 end
 
+
+def build_scala_and_java_docs
+  build_spark_if_necessary
+
+  print_header "Building Scala and Java API docs."
+  cd(SPARK_PROJECT_ROOT)
+
+  command = "build/sbt -Pkinesis-asl unidoc"
+  puts "Running '#{command}'..."
+  system(command) || raise("Unidoc generation failed")
+
+  puts "Moving back into docs dir."
+  cd("docs")
+
+  puts "Removing old docs"
+  system("rm -rf api")
+
+  # Copy over the unified ScalaDoc for all projects to api/scala.
+  # This directory will be copied over to _site when `jekyll` command is run.
+  copy_and_update_scala_docs("../target/scala-2.13/unidoc", "api/scala")
+  
copy_and_update_scala_docs("../connector/connect/client/jvm/target/scala-2.13/unidoc",
 "api/connect/scala")
+
+  # Copy over the unified JavaDoc for all projects to api/java.
+  copy_and_update_java_docs("../target/javaunidoc", "api/java", "api/scala")
+  
copy_and_update_java_docs("../connector/connect/client/jvm/target/javaunidoc", 
"api/connect/java", "api/connect/scala")
+end
+
 def build_python_docs
   build_spark_if_necessary
 
diff --git a/docs/index.md b/docs/index.md
index 57f701316bd0..ddce4f65ba5c 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -118,6 +118,7 @@ options for deployment:
 
 * [Spark Python API (Sphinx)](api/python/index.html)
 * [Spark Scala API (Scaladoc)](api/scala/org/apache/spark/index.html)
+* [Spark Connect Scala Client API 
(Scaladoc)](api/connect/scala/org/apache/spark/index.html)
 * [Spark Java API (Javadoc)](api/java/index.html)
 * [Spark R API (Roxygen2)](api/R/index.html)
 * [Spark SQL, Built-in Functions (MkDocs)](api/sql/index.html)
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 2ff2ebd869fc..4b6c0c6e9a17 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -397,7 +397,10 @@ object SparkBuild extends PomBuild {
   enable(PySparkAssembly.settings)(assembly)
 
   /* Enable unidoc only for the root spark project */
-  enable(Unidoc.settings)(spark)
+  enable(SparkUnidoc.settings)(spark)
+
+  /* Enable unidoc only for the root spark connect client project */
+  enable(SparkConnectClientUnidoc.settings)(connectClient)
 
   /* Sql-api ANTLR generation settings */
   enable(SqlApi.settings)(sqlApi)
@@ -1326,7 +1329,7 @@ object Volcano {
   )
 }
 
-object Unidoc {
+trait SharedUnidocSettings {
 
   import BuildCommons._
   import sbtunidoc.BaseUnidocPlugin
@@ -1337,7 +1340,7 @@ object Unidoc {
   import sbtunidoc.JavaUnidocPlugin.autoImport._
   import sbtunidoc.ScalaUnidocPlugin.autoImport._
 
-  private def ignoreUndocumentedPackages(packages: Seq[Seq[File]]): 
Seq[Seq[File]] = {
+  protected def ignoreUndocumentedPackages(packages: Seq[Seq[File]]): 
Seq[Seq[File]] = {
     packages
       .map(_.filterNot(_.getName.contains("$")))
       .map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/deploy")))
@@ -1362,7 +1365,6 @@ object Unidoc {
       
.map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/catalyst")))
       
.map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/connect/")))
       
.map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/execution")))
-      
.map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/internal")))
       
.map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/hive")))
       
.map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/catalog/v2/utils")))
       .map(_.filterNot(_.getCanonicalPath.contains("org.apache.spark.errors")))
@@ -1381,19 +1383,12 @@ object Unidoc {
 
   val unidocSourceBase = settingKey[String]("Base URL of source links in 
Scaladoc.")
 
-  lazy val settings = BaseUnidocPlugin.projectSettings ++
+  lazy val baseSettings = BaseUnidocPlugin.projectSettings ++
                       ScalaUnidocPlugin.projectSettings ++
                       JavaUnidocPlugin.projectSettings ++
                       Seq (
     publish := {},
 
-    (ScalaUnidoc / unidoc / unidocProjectFilter) :=
-      inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, 
kubernetes,
-        yarn, tags, streamingKafka010, sqlKafka010, connectCommon, connect, 
connectClient, protobuf),
-    (JavaUnidoc / unidoc / unidocProjectFilter) :=
-      inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, 
kubernetes,
-        yarn, tags, streamingKafka010, sqlKafka010, connectCommon, connect, 
connectClient, protobuf),
-
     (ScalaUnidoc / unidoc / unidocAllClasspaths) := {
       ignoreClasspaths((ScalaUnidoc / unidoc / unidocAllClasspaths).value)
     },
@@ -1448,6 +1443,54 @@ object Unidoc {
   )
 }
 
+object SparkUnidoc extends SharedUnidocSettings {
+
+  import BuildCommons._
+  import sbtunidoc.BaseUnidocPlugin
+  import sbtunidoc.JavaUnidocPlugin
+  import sbtunidoc.ScalaUnidocPlugin
+  import sbtunidoc.BaseUnidocPlugin.autoImport._
+  import sbtunidoc.GenJavadocPlugin.autoImport._
+  import sbtunidoc.JavaUnidocPlugin.autoImport._
+  import sbtunidoc.ScalaUnidocPlugin.autoImport._
+
+  override def ignoreUndocumentedPackages(packages: Seq[Seq[File]]): 
Seq[Seq[File]] = {
+    super.ignoreUndocumentedPackages(packages)
+      
.map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/internal")))
+  }
+
+  lazy val settings = baseSettings ++ Seq(
+    (ScalaUnidoc / unidoc / unidocProjectFilter) :=
+      inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, 
kubernetes,
+        yarn, tags, streamingKafka010, sqlKafka010, connectCommon, connect, 
connectClient, protobuf),
+    (JavaUnidoc / unidoc / unidocProjectFilter) :=
+      inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, 
kubernetes,
+        yarn, tags, streamingKafka010, sqlKafka010, connectCommon, connect, 
connectClient, protobuf),
+  )
+}
+
+object SparkConnectClientUnidoc extends SharedUnidocSettings {
+
+  import BuildCommons._
+  import sbtunidoc.BaseUnidocPlugin
+  import sbtunidoc.JavaUnidocPlugin
+  import sbtunidoc.ScalaUnidocPlugin
+  import sbtunidoc.BaseUnidocPlugin.autoImport._
+  import sbtunidoc.GenJavadocPlugin.autoImport._
+  import sbtunidoc.JavaUnidocPlugin.autoImport._
+  import sbtunidoc.ScalaUnidocPlugin.autoImport._
+
+  override def ignoreUndocumentedPackages(packages: Seq[Seq[File]]): 
Seq[Seq[File]] = {
+    super.ignoreUndocumentedPackages(packages)
+      
.map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/application")))
+  }
+
+  lazy val settings = baseSettings ++ Seq(
+    (ScalaUnidoc / unidoc / unidocProjectFilter) := inProjects(connectClient, 
connectCommon),
+    (JavaUnidoc / unidoc / unidocProjectFilter) := inProjects(connectClient, 
connectCommon),
+  )
+}
+
 object Checkstyle {
   lazy val settings = Seq(
     checkstyleSeverityLevel := CheckstyleSeverityLevel.Error,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to