简体   繁体   English

如何在文档中记录或排除生成的BuildConfig类?

[英]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.

相关问题 我无法打开班级,只是找到一个BuildConfig文件 - I can't open my class just find a BuildConfig file 我们如何使用自动生成的Buildconfig? - how can we use Buildconfig That is automatically generated? 我怎样才能看到我的服务的锯齿机文档? - how can i see the sawgger documentation of my services? 如何从我的 xjc 插件代码中引用 xjc 生成的 ObjectFactory 类? - How can I reference the ObjectFactory class generated by xjc from within my xjc plugin code? 如何让Ant Javadoc类排除两个文件? - How can I make an Ant Javadoc class exclude two files? 如何让gson排除我的对象的超类? - How can I make gson exclude my object's superclass? 如何编写架构,以便按顺序将元素映射到单独的属性,而不是一个列表 <Object> 在JAXB生成的类中? - How can I write my schema so elements in sequence are mapped to separate properties instead of one List<Object> in JAXB-generated class? 如果我的所有文档 ID 都是自动生成的,如何在 Firestore 中查询用户信息? - How do I query a user's info in Firestore if all my document IDs are auto-generated? 如何查看Spring StoredProcedure生成的SQL? - How can I see the generated SQL from my Spring StoredProcedure? 如何查看包含我的方法生成的帧的 strackrace? - How can I see the strackrace that includes the frames generated by my methods?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM