Package com.android.builder.model
Interface AndroidArtifact
- All Superinterfaces:
BaseArtifact
An Android Artifact.
This is the entry point for the output of a Variant. This can be more than one output
in the case of multi-apk where more than one APKs are generated from the same set of sources.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the ABI filters associated with the artifact, or null if there are no filters.Returns a list of additional APKs that need to installed on the device for this artifact to work correctly.Returns the name of the task used to generate APKs via the bundle file (.aab), or null if the task is not supported.Returns the path to the model file generated after eachgetApkFromBundleTaskName()task execution.Deprecated.Returns the name of the task used to generate the bundle file (.aab), or null if the task is not supported.Returns the path to the listing file generated after eachgetBundleTaskName()task execution.Returns the code shrinker used by this artifact or null if no shrinker is used to build this artifact.Returns all the resource folders that are generated.Returns all the source folders that are generated.Returns the InstantRun feature related model.Returns the name of the task used to run instrumented tests or null if the variant is not a test variant.Deprecated.Deprecated.Use post-build model instead.Deprecated.Returns the name of theSigningConfigused for the signing.Returns the name of the task used to generate the source code.Returns the test options only if the variant type is testing.booleanisSigned()Returns whether the output file is signed.Methods inherited from interface com.android.builder.model.BaseArtifact
getAdditionalClassesFolders, getAssembleTaskName, getAssembleTaskOutputListingFile, getClassesFolder, getCompileDependencies, getCompileTaskName, getDependencies, getDependencyGraphs, getIdeSetupTaskNames, getJavaResourcesFolder, getMultiFlavorSourceProvider, getName, getVariantSourceProvider
-
Method Details
-
getOutputs
Deprecated.Use post-build model instead. SeeVariantBuildInformation -
isSigned
boolean isSigned()Returns whether the output file is signed. This can only be true for the main apk of an application project.- Returns:
- true if the app is signed.
-
getSigningConfigName
Returns the name of theSigningConfigused for the signing. If none are setup or if this is not the main artifact of an application project, then this is null.- Returns:
- the name of the setup signing config.
-
getApplicationId
Deprecated.Returns the application id of this artifact.Deprecated as of 4.2. Application ID is now only provided post-build.
- Returns:
- the application id.
-
getSourceGenTaskName
Returns the name of the task used to generate the source code. The actual value might depend on the build system front end.- Returns:
- the name of the code generating task.
-
getGeneratedSourceFolders
Returns all the source folders that are generated. This is typically folders for the R, the aidl classes, and the renderscript classes.Deprecated, as of 1.2, present in super interface.
- Specified by:
getGeneratedSourceFoldersin interfaceBaseArtifact- Returns:
- a list of folders.
-
getGeneratedResourceFolders
Returns all the resource folders that are generated. This is typically the renderscript output and the merged resources.- Returns:
- a list of folder.
-
getAbiFilters
Returns the ABI filters associated with the artifact, or null if there are no filters.If the list contains values, then the artifact only contains these ABIs and excludes others.
-
getNativeLibraries
Deprecated.Returns the native libraries associated with the artifact.Deprecated since ndk-compile has been deprecated.
-
getResValues
Deprecated.Map of generated res values where the key is the res name. This method is deprecated and will always return an empty map- Returns:
- empty map
-
getInstantRun
Returns the InstantRun feature related model.- Returns:
- the model for all InstantRun related information.
-
getAdditionalRuntimeApks
Returns a list of additional APKs that need to installed on the device for this artifact to work correctly.For test artifacts, these will be "buddy APKs" from the
androidTestUtilconfiguration.- Since:
- 3.0
-
getTestOptions
Returns the test options only if the variant type is testing.- Since:
- 3.0
-
getInstrumentedTestTaskName
Returns the name of the task used to run instrumented tests or null if the variant is not a test variant.- Returns:
- name of the task used to run instrumented tests
- Since:
- 3.1
-
getBundleTaskName
Returns the name of the task used to generate the bundle file (.aab), or null if the task is not supported.- Returns:
- name of the task used to generate the bundle file (.aab)
- Since:
- 3.2
-
getBundleTaskOutputListingFile
Returns the path to the listing file generated after eachgetBundleTaskName()task execution. The listing file will contain a reference to the produced bundle file (.aab). Returns null whengetBundleTaskName()returns null.- Returns:
- the file path for the bundle model file.
- Since:
- 4.0
-
getApkFromBundleTaskName
Returns the name of the task used to generate APKs via the bundle file (.aab), or null if the task is not supported.- Returns:
- name of the task used to generate the APKs via the bundle
- Since:
- 3.2
-
getApkFromBundleTaskOutputListingFile
Returns the path to the model file generated after eachgetApkFromBundleTaskName()task execution. The model will contain a reference to the folder where APKs from bundle are placed into. Returns null whengetApkFromBundleTaskName()returns null.- Returns:
- the file path for the
getApkFromBundleTaskName()output model. - Since:
- 4.0
-
getCodeShrinker
Returns the code shrinker used by this artifact or null if no shrinker is used to build this artifact.
-