对于摇篮构建变种文件夹命名规则 [英] Folder naming convention for gradle build variants
问题描述
我一直在挣扎与摇篮一段时间,构建变种。
I have been struggling for a while with gradle and build variants.
我有这些构建定义类型:
I have these build types defined:
- 调试
- 发布
和这些味道:
- 免费
- 支付
有一定的构建变量即我如何定义独特的资源和资产。 FreeDebug?例如,我想四个不同的应用程序名称取决于构建变量,并为每个变种不同的图标。
How can i define unique resources and assets for a certain build variant ie. FreeDebug? For example I want four different app names depending on build variant, and a different icon for each variant.
推荐答案
由于每<一href="http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Sourcesets-and-Dependencies">Gradle Sourcesets和依赖指南,你可以添加一个新的文件夹的src / freeDebug / RES
或的src / paidRelease / RES
等,以自定义每个特定属性的变化范围。
As per the Gradle Sourcesets and Dependencies guide, you can add a new folder src/freeDebug/res
or src/paidRelease/res
, etc to customize particular attributes for each Build Variant.
这篇关于对于摇篮构建变种文件夹命名规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!