简体   繁体   English

Gradle构建资源的最佳目录(例如许可证标题模板)

[英]Best directory for Gradle build resources (e.g. license header template)

I'm looking for the appropriate location to place resources that are used by the build, like a license header template file or a file with code formatter settings. 我正在寻找合适的位置来放置构建所使用的资源,例如许可证标头模板文件或具有代码格式化程序设置的文件。

The buildSrc seems like the most appropiate place (eg buildSrc/src/main/resources ), but I only found it mentioned in the context of Build sources . buildSrc似乎是最合适的位置(例如buildSrc/src/main/resources ),但是我只在Build源代码的上下文中提到过它。

Another option would be src/build/resources . 另一个选项是src/build/resources Perhaps there are better locations I didn't consider. 也许有我没有考虑的更好的位置。

What would be the most appropriate directory for these resources? 这些资源最合适的目录是什么?

In many gradle builds the convention of using $rootproject/gradle as folder for build resources has been established. 在许多gradle构建中,已经建立了使用$ rootproject / gradle作为构建资源文件夹的约定。 you can have a config folder to store your license files / checkstyle configs etc. in there. 您可以在其中有一个配置文件夹来存储您的许可证文件/ checkstyle配置等。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Gradle构建比Eclipse ADT更严格(例如,找到项目_多次) - Gradle build is stricter that Eclipse ADT (e.g. Found item _ more than one time) 在使用gradle构建特定的Android产品风味时,我可以排除区域资源(例如values-fr) - Can I exclude regional resources (e.g. values-fr) when building a particular Android Product Flavor with gradle 如何在Gradle中发布以编程方式操作(例如,仪器化的)罐子? - How to publish programmatically manipulated (e.g. instrumented) jars in Gradle? 不同的依赖管理者(例如Maven,Gradle)依赖语法之间的映射 - Mapping between different depencendy managers' (e.g. Maven, Gradle) dependency syntax android studio“ Gradle项目同步失败。 基本功能(例如,编辑,调试)将无法正常工作” - android studio “Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly” 这个Groovy语法叫什么(例如,Gradle'exclude'闭合语法)? - What is this Groovy syntax called (Gradle 'exclude' closure syntax, e.g.)? Gradle 多项目命名:如何为所有子项目设置一个属性(例如baseName)? - Gradle multi-project naming: How can I set a property (e.g. baseName) for all subprojects? Gradle 项目同步失败。 基本功能(例如编辑、调试)将无法正常工作 - Gradle project sync failed. Basic functionality (e.g. editing, deugging ) will not work properly Gradle项目同步失败。 基本功能(例如,编辑,调试)将无法正常工作 - Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly Gradle项目同步失败。 基本功能(例如,编辑调试)将无法正常工作 - Gradle project sync failed. basic functionality (e.g. editing debugging) will not work properly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM