GroupableProductFlavor

API Documentation:GroupableProductFlavor

A version of ProductFlavor that can receive a dimension name.

Properties

PropertyDescription
applicationId

The application ID.

flavorDimension

Name of the dimension this product flavor belongs to.

signingConfig

Signing config used by this product flavor.

testApplicationId

Test application ID.

testFunctionalTest

See instrumentation.

testHandleProfiling

See instrumentation.

testInstrumentationRunner

Test instrumentation runner class name.

versionCode

Version code.

versionName

Version name.

Methods

MethodDescription
minSdkVersion(minSdkVersion)

Sets minimum SDK version.

minSdkVersion(minSdkVersion)

Sets minimum SDK version.

proguardFile(proguardFile)

Adds a new ProGuard configuration file.

proguardFiles(proguardFileArray)

Adds new ProGuard configuration files.

setProguardFiles(proguardFileIterable)

Sets the ProGuard configuration files.

targetSdkVersion(targetSdkVersion)

Sets the target SDK version to the given value.

targetSdkVersion(targetSdkVersion)

Sets the target SDK version to the given value.

Script blocks

No script blocks

Property details

String applicationId

The application ID.

See ApplicationId versus PackageName

String flavorDimension

Name of the dimension this product flavor belongs to.

SigningConfig signingConfig (read-only)

Signing config used by this product flavor.

String testApplicationId

Test application ID.

See ApplicationId versus PackageName

Boolean testFunctionalTest

See instrumentation.

Boolean testHandleProfiling

See instrumentation.

String testInstrumentationRunner

Test instrumentation runner class name.

This is a fully qualified class name of the runner, e.g. android.test.InstrumentationTestRunner

See instrumentation.

Integer versionCode

Version code.

See Versioning Your Application

String versionName

Version name.

See Versioning Your Application

Method details

void minSdkVersion(int minSdkVersion)

Sets minimum SDK version.

See uses-sdk element documentation.

void minSdkVersion(String minSdkVersion)

Sets minimum SDK version.

See uses-sdk element documentation.

void proguardFile(Object proguardFile)

Adds a new ProGuard configuration file.

proguardFile getDefaultProguardFile('proguard-android.txt')

There are 2 default rules files

  • proguard-android.txt
  • proguard-android-optimize.txt

They are located in the SDK. Using getDefaultProguardFile(String filename) will return the full path to the files. They are identical except for enabling optimizations.

void proguardFiles(Object... proguardFileArray)

Adds new ProGuard configuration files.

void setProguardFiles(Iterable<?> proguardFileIterable)

Sets the ProGuard configuration files.

void targetSdkVersion(int targetSdkVersion)

Sets the target SDK version to the given value.

See uses-sdk element documentation.

void targetSdkVersion(String targetSdkVersion)

Sets the target SDK version to the given value.

See uses-sdk element documentation.