0

Apparently, since Android SDK 17, builds generate an automatic class called BuildConfig and add it to my package. http://android-developers.blogspot.com/2012/03/updated-sdk-tools-and-adt-revision-17.html says:

Added a feature that allows you to run some code only in debug mode. Builds now generate a class called BuildConfig containing a DEBUG constant that is automatically set according to your build type. You can check the (BuildConfig.DEBUG) constant in your code to run debug-only functions such as outputting debug logs.

Since this source file is generated, I can't see how to add JavaDoc comments to it. Is there an easy way to exclude this class from my package documentation? or is there an easy way to add some comments to this class? Since this class is added to my package, I can't simply exclude the package from the docs.

I'm using Eclipse Indigo on Windows and the standard Doclet.

Michael Levy
  • 13,097
  • 15
  • 66
  • 100
  • Why do you need to remove it? – Raghav Sood Oct 16 '12 at 15:25
  • I can leave it in, but since I cannot add javadoc comments to a generated file, my documentation looks silly. I have one class in my package with no description, and that class's constructor and field have no comments either. I'd like the output of the Javadoc to always be in a customer ready state. – Michael Levy Oct 16 '12 at 15:29
  • "Is there an easy way to exclude this class from my package documentation?" -- I do not know how you are generating the docs, but the Ant `javadoc` class would seem to have sufficient flexibility for this. – CommonsWare Oct 16 '12 at 16:19
  • Today, I'm just using Eclipse and the standard Javadoc Doclet that comes with it. – Michael Levy Oct 16 '12 at 18:07
  • 1
    To remove it, simply untick your project/gen folder in the javadoc export wizard. – yorkw Oct 17 '12 at 01:02
  • @yorkw - please post that brilliantly simple suggestion as an answer so I may accept it. – Michael Levy Oct 17 '12 at 14:34

1 Answers1

1

To remove BuildConfig.java, simply untick your project/gen folder in the javadoc export wizard. Note that this also remove the R.java from exported javadoc:

enter image description here

yorkw
  • 40,926
  • 10
  • 117
  • 130