Drew Hamilton
03/02/2021, 2:47 PMdokkaHtml
output for my Gradle Android library module and I can’t get it to work. The file is generated in build/generated/source/myDir/main
, is added to android.sourceSets.main.java.srcDirs
, and is used in source code which successfully compiles.
I’ve tried a bunch of different permutations of configuration that looks like this:
dokkaHtml {
dokkaSourceSets {
configureEach {
jdkVersion.set 8
logger.lifecycle "$project adding sourceRoot $myDirRoot"
sourceRoot.from(file(stringsRoot))
}
}
}
With this exact configuration, :myModule:dokkaHtml
fails due to “> NamedDomainObjectContainer#create(String) on GradleDokkaSourceSetBuilder container cannot be executed in the current context.” If I use sourceRoot(
(without the .from
), it doesn’t fail, but the generated class still doesn’t appear in the docs.
I’ve also tried adding it as a custom source set or setting myDirRoot
as an absolute or relative path, to no avail. Any clue what I’m doing wrong?Marcin Aman
03/03/2021, 10:31 AMgenerated
folder in android)?Drew Hamilton
03/03/2021, 10:57 AMobject
class in a .kt file in the referenced directory. (I’m not actually generating anything, just copying the file there as a POC before putting in the codegen work.)alex009
03/13/2021, 4:01 PMbuild
dir 😞
for me this needed with https://github.com/icerockdev/moko-network generated api classesalex009
03/13/2021, 4:05 PMalex009
03/14/2021, 5:52 AMDrew Hamilton
03/14/2021, 9:39 AM