multiDexKeepFile 的代表意义

BuildType

DSL object to configure build types.

Properties

Property Description
applicationIdSuffix

Application id suffix. It is appended to the "base" application id when calculating the finalapplication id for a variant.

consumerProguardFiles

ProGuard rule files to be included in the published AAR.

crunchPngs

Whether to crunch PNGs.

debuggable

Whether this build type should generate a debuggable apk.

embedMicroApp

Whether a linked Android Wear app should be embedded in variant using this build type.

javaCompileOptions

Options for configuration Java compilation.

jniDebuggable

Whether this build type is configured to generate an APK with debuggable native code.

manifestPlaceholders

The manifest placeholders.

matchingFallbacks

Specifies a sorted list of build types that the plugin should try to use when a directvariant match with a local module dependency is not possible.

minifyEnabled

Whether removal of unused java code is enabled.

multiDexEnabled

Whether Multi-Dex is enabled for this variant.

multiDexKeepFile

Text file that specifies additional classes that will be compiled into the main dex file.

multiDexKeepProguard

Text file with additional ProGuard rules to be used to determine which classes are compiledinto the main dex file.

name

Name of this build type.

postprocessing
Incubating

This DSL is incubating and subject to change.

proguardFiles

Specifies the ProGuard configuration files that the plugin should use.

pseudoLocalesEnabled

Specifies whether the plugin should generate resources for pseudolocales.

renderscriptDebuggable

Whether the build type is configured to generate an apk with debuggable RenderScript code.

renderscriptOptimLevel

Optimization level to use by the renderscript compiler.

shrinkResources

Whether shrinking of unused resources is enabled.Default is false;

signingConfig

The signing configuration.

testCoverageEnabled

Whether test coverage is enabled for this build type.

useProguard

Specifies whether to always use ProGuard for code and resource shrinking.

versionNameSuffix

Version name suffix. It is appended to the "base" version name when calculating the finalversion name for a variant.

zipAlignEnabled

Whether zipalign is enabled for this build type.

Methods

Method Description
buildConfigField(type, name, value)

Adds a new field to the generated BuildConfig class.

consumerProguardFile(proguardFile)

Adds a proguard rule file to be included in the published AAR.

consumerProguardFiles(proguardFiles)

Adds proguard rule files to be included in the published AAR.

externalNativeBuild(action)

Configure native build options.

initWith(that)

Copies all properties from the given build type.

proguardFile(proguardFile)

Adds a new ProGuard configuration file.

proguardFiles(files)

Adds new ProGuard configuration files.

resValue(type, name, value)

Adds a new generated resource.

resValue(type, name, value)

Adds a new generated resource.

setProguardFiles(proguardFileIterable)

Sets the ProGuard configuration files.

Script blocks

Block Description
postprocessing
Incubating

This DSL is incubating and subject to change.

大致翻译


2、方法

方法 描述
buildConfigField(type, name, value) 向生成的BuildConfig类添加一个新字段。
consumerProguardFile(proguardFile) 添加要包含在已发布的AAR中的proguard规则文件。
consumerProguardFiles(proguardFiles) 添加要包含在已发布的AAR中的proguard规则文件。
externalNativeBuild(action) 配置本机构建选项。
initWith(that) 从给定的构建类型复制所有属性。
proguardFile(proguardFile) 添加一个新的ProGuard配置文件。
proguardFiles(files) 添加新的ProGuard配置文件。
resValue(type, name, value) 添加新生成的资源。
resValue(type, name, value) 添加新生成的资源。
setProguardFiles(proguardFileIterable) 设置ProGuard配置文件。
属性 描述
applicationIdSuffix 应用程序标识后缀。
consumerProguardFiles ProGuard规则文件要包含在已发布的AAR中。
debuggable 这个构建类型是否应该生成可调试的apk。
embedMicroApp 是否应使用此构建类型将链接的Android Wear应用程序嵌入到变体中。
javaCompileOptions 配置Java编译选项。
jniDebuggable 此构建类型是否配置为生成具有可调试本机代码的APK。
manifestPlaceholders 明示占位符
minifyEnabled 是否为此构建类型启用了Minify。
multiDexEnabled 是否为此变体启用了Multi-Dex。
multiDexKeepFile 指定将被编译到主dex文件中的其他类的文本文件。
multiDexKeepProguard 具有附加ProGuard规则的文本文件用于确定哪些类被编译到主dex文件中。
name 此构建类型的名称。
proguardFiles 返回要使用的ProGuard配置文件。
pseudoLocalesEnabled 是否在APK中生成伪语言环境。
renderscriptDebuggable 构建类型是否配置为生成具有可调试RenderScript代码的apk。
renderscriptOptimLevel 由renderscript编译器使用的优化级别。
shrinkResources 是否启用未使用资源的收缩。默认值为false
signingConfig 签名配置。
testCoverageEnabled 是否为此构建类型启用了测试覆盖率。
useJack 弃用 是否应该使用实验杰克工具链。
versionNameSuffix 版本名称后缀。
zipAlignEnabled zipalign是否启用此构建类型。












猜你喜欢

转载自blog.csdn.net/qq_33210042/article/details/79741305
今日推荐