mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-19 01:40:55 +01:00
Fix unidoc issue with scala-js modules, this now ignores them from un… (#2742)
* Fix unidoc issue with scala-js modules, this now ignores them from unidoc * Add comment referencing the issue so we have documentation of why this needs to be done * Fix issue referenced
This commit is contained in:
parent
1959495cec
commit
63e1320f52
10
build.sbt
10
build.sbt
@ -80,6 +80,8 @@ lazy val eclairRpc = project
|
|||||||
.in(file("eclair-rpc"))
|
.in(file("eclair-rpc"))
|
||||||
.dependsOn(asyncUtils, bitcoindRpc)
|
.dependsOn(asyncUtils, bitcoindRpc)
|
||||||
|
|
||||||
|
val jsProjects: Vector[ProjectReference] = Vector(cryptoJS)
|
||||||
|
|
||||||
// quoting the val name this way makes it appear as
|
// quoting the val name this way makes it appear as
|
||||||
// 'bitcoin-s' in sbt/bloop instead of 'bitcoins'
|
// 'bitcoin-s' in sbt/bloop instead of 'bitcoins'
|
||||||
lazy val `bitcoin-s` = project
|
lazy val `bitcoin-s` = project
|
||||||
@ -170,6 +172,11 @@ lazy val `bitcoin-s` = project
|
|||||||
// unidoc aggregates Scaladocs for all subprojects into one big doc
|
// unidoc aggregates Scaladocs for all subprojects into one big doc
|
||||||
.enablePlugins(ScalaUnidocPlugin)
|
.enablePlugins(ScalaUnidocPlugin)
|
||||||
.settings(
|
.settings(
|
||||||
|
//removes scalajs projects from unidoc, see
|
||||||
|
//https://github.com/bitcoin-s/bitcoin-s/issues/2740
|
||||||
|
unidocProjectFilter in (ScalaUnidoc, unidoc) := {
|
||||||
|
inAnyProject -- inProjects(jsProjects: _*)
|
||||||
|
},
|
||||||
// we modify the unidoc task to move the generated Scaladocs into the
|
// we modify the unidoc task to move the generated Scaladocs into the
|
||||||
// website directory afterwards
|
// website directory afterwards
|
||||||
Compile / unidoc := {
|
Compile / unidoc := {
|
||||||
@ -177,7 +184,7 @@ lazy val `bitcoin-s` = project
|
|||||||
import scala.collection.JavaConverters._
|
import scala.collection.JavaConverters._
|
||||||
val logger = streams.value.log
|
val logger = streams.value.log
|
||||||
|
|
||||||
def cleanPath(path: Path, isRoot: Boolean = true): Unit =
|
def cleanPath(path: Path, isRoot: Boolean = true): Unit = {
|
||||||
if (Files.isDirectory(path)) {
|
if (Files.isDirectory(path)) {
|
||||||
path.toFile.list().map { file =>
|
path.toFile.list().map { file =>
|
||||||
val toClean = path.resolve(file)
|
val toClean = path.resolve(file)
|
||||||
@ -192,6 +199,7 @@ lazy val `bitcoin-s` = project
|
|||||||
} else {
|
} else {
|
||||||
Files.deleteIfExists(path)
|
Files.deleteIfExists(path)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val websiteScaladocDir =
|
val websiteScaladocDir =
|
||||||
Paths.get("website", "static", "api").toAbsolutePath
|
Paths.get("website", "static", "api").toAbsolutePath
|
||||||
|
Loading…
Reference in New Issue
Block a user