IntelliJ IDEA 2016.2 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.

ItemDescription
Compile SDK VersionUse this drop-down list to select the compilation target.
Build Tool VersionUse this drop-down list to select a version of the build tool.
Library RepositorySpecify the library repository. By default, jcenter repository is used for the Android-Gradle application. For more information, see jcenter repository.
Ignore Assets PatternUse this field to specify asset patterns that you want to ignore.
Incremental DexUse this drop-down list to set an incremental dexing. You can choose true or false option, or leave it blank.
Source CompatibilityUse this drop-down list to select the Java version compatibility for the Java source compilation.
Target CompatibilityUse 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.

ItemDescription
NameThis 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 AliasUse this field to enter the name of your private key store file.
Key PasswordUse this field to enter the password for the private key.
Store FileUse 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 PasswordUse 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.

ItemDescription
NameThis field displays a name of the build flavor that you have selected. You can modify the name.
Min Sdk VersionUse this field to add the minimum SDK version for the flavor.
Application IdUse this field to add an application ID.
Proguard FileUse 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 ConfigUse this drop-down list to select a name of the config class that you have selected in the Signing tab.
Target Sdk VersionUse this drop-down list to select the target SDK version for your build flavor.
Test Instrumentation RunnerUse 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 IdUse this field to enter an application id for your testing.
Version CodeUse this field to enter an integer value that represents the version of the application code, relative to other versions.
Version NameUse 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.

ItemDescription
NameThis field displays a name of the build type that you have added. You can modify the name.
DebuggableUse this property to set it to either true or false depending on the build type.
Jni Debug BuildUse this property to set it to either true or false depending on the build type.
Signing ConfigUse this drop-down list to select a name of the config class that you have selected in the Signing tab.
Renderscript Debug BuildUse 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 EnabledUse this property to set the minification of your code to either true or false depending on the build type.
Pseudo Locales EnabledUse this property to set the pseudo locales to either true or false depending on the build type.
Proguard FileUse 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 SuffixUse this field to enter the suffix of your application id.
Version Name SuffixUse this field to enter the version name suffix.
Zip AlignUse 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.

ItemDescription
ScopeUse 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.
add (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.
delete (Alt+Delete)Use this icon or shortcut to remove the selected item or items from the list of dependencies.
arrowUp (Alt+Up) and arrowDown (Alt+Down)Use these icons and shortcuts to move the selected item up or down in the list. See Order of dependencies.

See Also

Last modified: 5 September 2016