IntelliJ IDEA 2018.3 Help

Android-Gradle Facet Page

File | Project Structure | Modules | <module> | Android-Gradle
File | Project Structure | Facets | Android-Gradle (<module>)


Use this page to configure the settings of an Android-Gradle facet attached to a specific module.

In this section:

Properties tab

This tab lets you specify properties for your build.gradle file.

Item

Description

Compile SDK Version

Use this drop-down list to select the compilation target.

Build Tool Version

Use this drop-down list to select a version of the build tool.

Library Repository

Specify the library repository. By default, jcenter repository is used for the Android-Gradle application. For more information, see jcenter repository.

Ignore Assets Pattern

Use this field to specify asset patterns that you want to ignore.

Incremental Dex

Use this drop-down list to set an incremental dexing. You can choose true or false option, or leave it blank.

Source Compatibility

Use this drop-down list to select the Java version compatibility for the Java source compilation.

Target Compatibility

Use this drop-down list to select the Java version to generate Java classes.

Signing tab

This tab lets you specify settings for signing configurations. The fields become editable when you add the config class in the left-hand area of the tab. You can also delete config classes that you don't need.

Item

Description

Name

This field displays a name of the config class that you have selected. You can modify the name, however, it should be a recognizable Java identifier.

Key Alias

Use this field to enter the name of your private key store file.

Key Password

Use this field to enter the password for the private key.

Store File

Use this field to enter a location of your private key store file. Alternatively, click Browse button browseButton and select the target folder in the dialog that opens.

Store Password

Use this field to enter the password of your store file.

Flavors tab

This tab lets you specify settings for flavors' configuration. The fields become editable when you add the flavor in the left-hand area of the tab. You can also delete the flavor entry that you don't need.

Item

Description

Name

This field displays a name of the build flavor that you have selected. You can modify the name.

Min Sdk Version

Use this field to add the minimum SDK version for the flavor.

Application Id

Use this field to add an application ID.

Proguard File

Use this field to enter the location of the Proguard file. Alternatively, click Browse button browseButton and select the target folder in the dialog that opens.

Signing Config

Use this drop-down list to select a name of the config class that you have selected in the Signing tab.

Target Sdk Version

Use this drop-down list to select the target SDK version for your build flavor.

Test Instrumentation Runner

Use this field to enter the name of a class for running test cases. By default, the test class name is android.test.InstrumentationTestRunner.

Test Application Id

Use this field to enter an application id for your testing.

Version Code

Use this field to enter an integer value that represents the version of the application code, relative to other versions.

Version Name

Use this field to enter a string value that represents the release version of the application code, as it should be shown to users.

Build Types tab

This tab lets you specify the settings for Android build types. By default, debug and release versions are created and displayed in the left-hand area of the tab. You can add a new entry or delete an existing one.

Item

Description

Name

This field displays a name of the build type that you have added. You can modify the name.

Debuggable

Use this property to set it to either true or false depending on the build type.

Jni Debug Build

Use this property to set it to either true or false depending on the build type.

Signing Config

Use this drop-down list to select a name of the config class that you have selected in the Signing tab.

Renderscript Debug Build

Use this property to set Renderscript debug build to either true or false depending on the build type.

Renderscript Optim Level

Use this property to set the optimization level for the renderscript compiler. The default value is 3.

Minify Enabled

Use this property to set the minification of your code to either true or false depending on the build type.

Pseudo Locales Enabled

Use this property to set the pseudo locales to either true or false depending on the build type.

Proguard File

Use this field to enter the location of the Proguard file. Alternatively, click Browse button browseButton and select the target folder in the dialog that opens.

Application Id Suffix

Use this field to enter the suffix of your application id.

Version Name Suffix

Use this field to enter the version name suffix.

Zip Align

Use this drop-down list to set zipalign for the file. You can use either true or false depending on the build file.

Dependencies tab

Use this tab to specify dependencies for your application.

Item

Description

Scope

Use this setting to control the classpath separately for your sources and test sources, and for the build and the run phases. (The classpath may be different when 1) your sources are compiled 2) your test sources are compiled 3) your compiled sources are run 4) your tests are run. The Scope option defines classpaths in which you include the dependency.)

You can select from the following options:

  • Compile - use this option to include the dependency in the classpath for your sources at the compilation and run phases.

  • Provided - use this option include a dependency that is provided by the runtime environment.

  • APK - use this option to include the dependency in .apk  file that will be generated as a result of Android module compilation.

  • Test compile - use this option to include the dependency in the classpath for your test sources at the test compilation phase.

  • Debug compile - use this option to include the dependency in the classpath for the debug build type at the compilation phase.

  • Release compile - use this option to include the dependency in the classpath for the release build type at the compilation phase.

icons general add or Alt+Insert

Use this icon or shortcut to add a library or a module to the list of the module dependencies. Select one of the following options:>
  • Jars or directories. Select this option to create a new module library and add it to the list of dependencies. In the dialog that opens, select the files and folders to be included in the library. These may be individual .class and .java files, directories and archives (.jar and .zip) containing such files as well as directories with Java native libraries (.dll, .so or .jnilib).

  • Library. Select this option to add one or more of the existing project, global or application server libraries to the list of dependencies. In the dialog that opens, select the library or libraries and click Add Selected.

  • Module Dependency. Select this option to specify the modules that the current module should depend on.

icons general remove svg or Alt+Delete

Use this icon or shortcut to remove the selected item or items from the list of dependencies.

icons actions previousOccurence svg or Alt+Up and icons actions nextOccurence svg or Alt+Down

Use these icons and shortcuts to move the selected item up or down in the list. See Module dependencies.

Last modified: 7 December 2018

See Also