Skip to content

Commit

Permalink
make unidoc dependent on environ variable since compiles all projects
Browse files Browse the repository at this point in the history
  • Loading branch information
allisonport-db committed Feb 13, 2025
1 parent 616b956 commit 267372a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 0 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ def crossSparkSettings(): Seq[Setting[_]] = getSparkVersion() match {
Antlr4 / antlr4Version := "4.9.3",
Test / javaOptions ++= Seq("-Dlog4j.configurationFile=log4j2.properties"),

// Java-/Scala-/Uni-Doc Settings
scalacOptions ++= Seq(
"-P:genjavadoc:strictVisibility=true" // hide package private types and methods in javadoc
),
unidocSourceFilePatterns := Seq(SourceFilePattern("io/delta/tables/", "io/delta/exceptions/"))
)

Expand Down
8 changes: 7 additions & 1 deletion project/Unidoc.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ object Unidoc {
generateScalaDoc: Boolean = false,
classPathToSkip: String = null
): Project = {
if (sys.env.contains("DISABLE_UNIDOC")) return projectToUpdate
if (!generatedJavaDoc && !generateScalaDoc) return projectToUpdate

var updatedProject: Project = projectToUpdate
Expand All @@ -69,7 +70,12 @@ object Unidoc {
generateUnidocSettings(docTitle, generateScalaDoc, classPathToSkip),

// Ensure unidoc is run with tests.
(Test / test) := ((Test / test) dependsOn (Compile / unidoc)).value
(Test / test) := ((Test / test) dependsOn (Compile / unidoc)).value,

// hide package private types and methods in javadoc
scalacOptions ++= Seq(
"-P:genjavadoc:strictVisibility=true"
),
)
}

Expand Down

0 comments on commit 267372a

Please sign in to comment.