I want to generate the JavaDoc for my library excluding R and BuildConfig. The Generate JavaDoc...
functionality from the Tools
menu does not have the option to exclude files.
How to create JavaDoc using Android Studio without R and and BuildConfig?
In the Package Explorer view, select a Java project and click Project > Generate Javadoc with Diagrams > Automatically. In the Generate Javadoc wizard, under Javadoc command, select the Javadoc command (an executable file).
Step 1 − Open eclipse, select the option Project →Generate Javadoc. Step 2 − Select the javadoc.exe file from the bin folder of java installation directory, select the destination folder for the generated java doc and select Next. finish button.
To generate JavaDoc in Eclipse: – Select “Generate JavaDoc” option from Project menu and a wizard will appear. Specify the location for the JavaDoc file on your computer, by default it will be in the C drive. Select the project and then the packages for which you want to create the JavaDoc file.
RocketSpock's answer is almost there, but not quite (as of this writing). I can't comment yet, so I'll describe the process I used to exclude R.java
and BuildConfig.java
from my Android library's Javadoc in Android Studio 1.2.2. There's basically an extra dialog that will come in very handy:
Open menu option Tools --> Javadoc
.
Select Custom scope
. It's not necessary to select anything from
the drop-down menu yet.
...
icon to open the Scopes
dialog.+
icon. Give it a
descriptive name if you wish.Production Classes
(not Library Classes
, since those are
imports) navigate to the module(s) you wish to generate Javadoc for,
and select any individual Java files you wish to include. In your
case, you probably want to select an entire module but
manually exclude R.java
and BuildConfig.java
. When you're done, Click OK
to exit the Scopes dialog.Specify Generate JavaDoc scope
dialog, if your new scope is
not selected in the Custom scope
dropdown menu, select it now, as
well as any other additional options including output directory.OK
to generate your Javadoc.The accepted answer is quite complex and I have a better one.
Project Files
OK
.After these you will see the R files and BuildConfig are excluded.
If you want to exclude the generated files (R, BuildConfig, etc.) then you can specify a custom scope for the JavaDoc generation. For this to correctly work you will need to:
That's it. Your JavaDocs should be generated without the R or BuildConfig files included.
Another way to do it is to 1- go Tools --> Generate JavaDoc... 2- select Custom scope 3- from the drop down menu select Open Files.
this method will generate documentation for only the opened files in ur window
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With