Skip to content

Commit

Permalink
Fallback to apiURL if javadocioUrl does not exist
Browse files Browse the repository at this point in the history
Format and wrap in lazy val
  • Loading branch information
valencik committed Aug 14, 2022
1 parent d8a628f commit 89baeb7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,12 @@ object TypelevelSitePlugin extends AutoPlugin {
val p = tlSiteApiPackage.value.fold("")(_.replace('.', '/') + "/index.html")
url(s"https://www.javadoc.io/doc/$o/$n/$v/$p")
}
lazy val fallbackUrl = for {
moduleId <- (ThisProject / tlSiteApiModule).value
apiURL <- moduleId.extraAttributes.get("e:info.apiURL")
} yield url(apiURL)

tlSiteApiUrl.value.orElse(javadocioUrl)
tlSiteApiUrl.value.orElse(javadocioUrl).orElse(fallbackUrl)
},
tlSiteHeliumConfig := {
Helium
Expand Down

0 comments on commit 89baeb7

Please sign in to comment.