Jey
12/13/2023, 3:50 PMsrc/main/java
and move the delombaked version of package in a separate folder build/src-delombak
. i need to generate a doc for that source presented in the new folder. when i changed the sourceRoots its always generating docs from root folder ``src/main/java``
Example:
root build.gradle - https://github.com/ForgeRock/forgerock-android-sdk/blob/develop/build.gradle
plugins {
id("org.jetbrains.dokka") version "1.9.10"
}
submodule library build.gradle - https://github.com/ForgeRock/forgerock-android-sdk/blob/develop/config/kdoc.gradle#L65
apply plugin: "org.jetbrains.dokka"
dokkaHtml.dependsOn delombok
dokkaHtml {
dokkaSourceSets {
named("main") {
outputDirectory = file("build/html/$project.name-dokka")
sourceDirs = files("$buildDir/src-delomboked") // not works
sourceRoots.setFrom(file("$buildDir/src-delomboked")) // not works
}
}
}
./gradle dokkaHtml (this will delombak first and will create a doc)
How do i fix this issue by pointing to the source presented in different folder ?Oleg Yukhnevich
01/02/2024, 12:41 PMsourceRoots.setFrom(file("$buildDir/src-delomboked"))
is the right way to do this
Though, you need to remove line sourceDirs = files("$buildDir/src-delomboked")
- for some reason it compiles in groovy DSL, but there is no such configuration option and for some reason it just breaks - most likely it somehow ignores the exception (that sourceDirs
is undefined) because if to replace named("main") {...}
with just main {...}
you will see an error thrown, that sourceDire
is an unknown propertyJey
01/05/2024, 4:38 PM