[英]How can I document or exclude the generated BuildConfig class in my documentation?
Apparently, since Android SDK 17, builds generate an automatic class called BuildConfig and add it to my package. 显然,从Android SDK 17开始,构建会生成一个名为BuildConfig的自动类,并将其添加到我的包中。 http://android-developers.blogspot.com/2012/03/updated-sdk-tools-and-adt-revision-17.html says:
http://android-developers.blogspot.com/2012/03/updated-sdk-tools-and-adt-revision-17.html说:
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.
现在,生成会生成一个名为BuildConfig的类,其中包含一个DEBUG常量,该常量会根据您的生成类型自动设置。 You can check the (BuildConfig.DEBUG) constant in your code to run debug-only functions such as outputting debug logs.
您可以在代码中检查(BuildConfig.DEBUG)常量以运行仅调试功能,例如输出调试日志。
Since this source file is generated, I can't see how to add JavaDoc comments to it. 由于此源文件已生成,因此我看不到如何向其添加JavaDoc注释。 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. 我在Windows和标准Doclet上使用Eclipse Indigo。
To remove BuildConfig.java
, simply untick your project/gen folder in the javadoc export wizard. 要删除
BuildConfig.java
,只需取消选中javadoc导出向导中的project / gen文件夹。 Note that this also remove the R.java
from exported javadoc: 请注意,这还会从导出的javadoc中删除
R.java
:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.