hi everyone, it’s my first time using Dokka in my ...
# dokka
b
hi everyone, it’s my first time using Dokka in my project, so I had some questions regarding that. My project implementing multi-module 1. is there someway for me to exclude certain package in a module? let say I had package
b
c
d
in module
a
, I want to exclude
b
and
c
so it won’t generated. Excluding certain module is working fine 2. if you see the attach image, you can find some functions. the problem is, I’m not implement any of those function explicitly in my class (in this case
CameraMaskingActivity
). Moreover, I found these functions also included in other class. I don’t want this in my report, is there anyway to exclude or remove this? 3. The report folder is big, like really big, I only include 2 modules but the size already 300++mb, is there someway to reduce the size? I know it might be related to each class that bloated, but the report file size could related to my question number 2 4. (Regarding design) in the attached image, I don’t find navigation menu that on the left, for me to go to other class in the report file, at least in the same module, is there any implementation that I’m not implement? Thank you and sorry for asking a lot of question. Cool library btw. Have a great day 😄
i
Hi! 🙂 1. You can indeed exclude a certain package via gradle configuation. An example can be seen here (pretty much the same for
kts
) 2. If your class extends another class, it inherits functions and properties as well, so I think it's expected that you'll see it on your class's page. I'm not sure if there are any workarounds or settings that can be turned off. 3. That's interesting. Maybe that's because it's an android app, not sure. For a simple java project, my report folder is only
984K
. If you're on MacOS/Linux, can you go into
build/dokka
(or your report folder), run
du -h > output.txt
and upload the output to gist/pastebin/etc? It'll print folders and their size recursively. 4. Not sure what you mean 🙂 Does your report look like this? The navigation menu should be on the left, with all of the modules and their contents.
b
thank you for your response 1. will look into this further, thanks for the resource 2. this seems a problem, in Android every activity extends
AppCompatActivity
, same goes for Fragment, extend Fragment from Android. When I look to
AppCompatActivity
I found the class in the image that I’m not implement is there. From your answers I think it’s make sense why it show now. but for my team, all inherits function and properties is not needed to show, since we focus on our changes only, in this case is
CameraMaskingActivity
. this could lead to bloated file size 3. will try your solution, and share the gist later on 4. yap, exactly like link you share
i
Oh, wait, there's actually a setting for inherited members. Try this:
Copy code
tasks.withType<DokkaTask>().configureEach {
    suppressInheritedMembers.set(true)
}
b
ok, will try that for sure and let you know if its work, thanks
👍 1
hi, I had try your solution and its working, the size reduce drastically, almost 50%, but it still in 100++mb, and working on how to make it more compact. also tried exclude certain package and working well too to not include the inherit member from the parent class, I need to set the
suppressInheritedMembers.set(true)
in
dokkaHtmlPartial
task, not in the root file unfortunately, since this is my company project, I can’t share the gist of the file like you mentioned in answer number 3, but it does work and gave me more visibility on each folder size, thanks for that the navigation menu on the left still not showing though, trying to figure it out, I think some config needed to implement
I found this issue on your github, any workaround for Android Studio? or is there an ETA for this one? to make it available if open the HTML from the
file://
i
Unfortunately, not if you open it as just
file://
😞 Certain features (search, navbar) will not work (JS-related problem) However, if you need to open it locally, have you tried the built-in web server? Open the
index.html
file in Android Studio and on the top right you should see web browser icons. Click on one of them. Here's a screenshot
If you want to host documentation company-wide, it's fairly easy. Ask your sysadmins/devops (just send them the report folder or make it a step of your CI build) or even research it yourself. I'm sure you have
nginx
running somewhere already
b
thanks for the answer, the built-in web server works well, and the navigation menu is show thanks
yup, currently working on hosting the documentation, thank you for your support
👍 1
🙂 1