Class PackageAndroidArtifact

  • All Implemented Interfaces:
    com.android.build.gradle.internal.tasks.VariantAwareTask, java.lang.Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

    @DisableCachingByDefault
    public abstract class PackageAndroidArtifact
    extends com.android.build.gradle.internal.tasks.NewIncrementalTask
    Abstract task to package an Android artifact.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.android.builder.internal.packaging.ApkCreatorType apkCreatorType  
      protected java.lang.String buildTargetAbi  
      protected java.lang.String buildTargetDensity  
      protected com.android.build.api.artifact.Artifact<org.gradle.api.file.Directory> manifestType  
      protected java.lang.String projectBaseName  
      • Fields inherited from class com.android.build.gradle.internal.tasks.AndroidVariantTask

        variantName
      • Fields inherited from interface org.gradle.api.Task

        TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void doTaskAction​(org.gradle.work.InputChanges changes)  
      abstract org.gradle.api.provider.ListProperty<java.lang.String> getAaptOptionsNoCompress()  
      abstract org.gradle.api.provider.SetProperty<java.lang.String> getAbiFilters()  
      abstract org.gradle.api.file.ConfigurableFileCollection getAllClasspathInputFiles()
      FileCollection of all other @Classpath file inputs if getIsDeterministic() is true, or an empty FileCollection if getIsDeterministic() is false.
      abstract org.gradle.api.file.ConfigurableFileCollection getAllInputFilesWithNameOnlyPathSensitivity()
      FileCollection of all other NAME_ONLY file inputs if getIsDeterministic() is true, or an empty FileCollection if getIsDeterministic() is false.
      abstract org.gradle.api.file.ConfigurableFileCollection getAllInputFilesWithRelativePathSensitivity()
      FileCollection of all other RELATIVE file inputs if getIsDeterministic() is true, or an empty FileCollection if getIsDeterministic() is false.
      com.android.builder.internal.packaging.ApkCreatorType getApkCreatorType()  
      abstract org.gradle.api.provider.Property<java.lang.String> getApplicationId()  
      abstract org.gradle.api.file.RegularFileProperty getAppMetadata()
      App metadata to be packaged in the APK.
      abstract org.gradle.api.file.DirectoryProperty getAssets()  
      abstract org.gradle.api.file.ConfigurableFileCollection getBaseModuleMetadata()  
      java.lang.String getBuildTargetAbi()  
      java.lang.String getBuildTargetDensity()  
      abstract org.gradle.api.provider.Property<java.lang.String> getCreatedBy()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getDebugBuild()  
      abstract org.gradle.api.file.RegularFileProperty getDependencyDataFile()  
      abstract org.gradle.api.file.ConfigurableFileCollection getDexFolders()
      FileCollection because of the legacy Transform API.
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getDexUseLegacyPackaging()  
      abstract org.gradle.api.file.ConfigurableFileCollection getFeatureDexFolder()
      FileCollection as comes from another project.
      abstract org.gradle.api.file.ConfigurableFileCollection getFeatureJavaResourceFiles()
      FileCollection because it comes from another project.
      abstract org.gradle.api.file.RegularFileProperty getIdeModelOutputFile()  
      abstract org.gradle.api.file.DirectoryProperty getIncrementalFolder()  
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getIsDeterministicEntryOrder()  
      abstract org.gradle.api.file.ConfigurableFileCollection getJavaResourceFiles()
      List of folders and/or jars that contain the merged java resources.
      boolean getJniDebugBuild()  
      abstract org.gradle.api.file.ConfigurableFileCollection getJniFolders()
      FileCollection because of the legacy Transform API.
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getJniLibsUseLegacyPackaging()  
      abstract org.gradle.api.file.DirectoryProperty getManifests()  
      java.lang.String getManifestTypeName()  
      abstract org.gradle.api.file.RegularFileProperty getMergedArtProfile()  
      abstract org.gradle.api.file.RegularFileProperty getMergedArtProfileMetadata()  
      abstract org.gradle.api.provider.Property<java.lang.Integer> getMinSdkVersion()  
      java.util.List<java.lang.String> getNativeLibrariesAndDexPackagingModeNames()  
      abstract org.gradle.api.file.DirectoryProperty getOutputDirectory()  
      java.lang.String getProjectBaseName()  
      abstract org.gradle.api.file.DirectoryProperty getResourceFiles()  
      com.android.build.gradle.internal.signing.SigningConfigDataProvider getSigningConfigData()  
      abstract org.gradle.api.file.ConfigurableFileCollection getSigningConfigVersions()  
      abstract com.android.build.api.artifact.ArtifactTransformationRequest getTransformationRequest()  
      abstract org.gradle.api.provider.ListProperty<com.android.build.api.variant.impl.VariantOutputImpl> getVariantOutputs()  
      void setJniDebugBuild​(boolean jniDebugBuild)  
      • Methods inherited from class com.android.build.gradle.internal.tasks.NewIncrementalTask

        taskAction
      • Methods inherited from class com.android.build.gradle.internal.tasks.AndroidVariantTask

        getVariantName, setVariantName
      • Methods inherited from class com.android.build.gradle.internal.tasks.BaseTask

        getAnalyticsService, getProjectPath, getWorkerExecutor, recordTaskAction
      • Methods inherited from class org.gradle.api.DefaultTask

        compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
      • Methods inherited from class org.gradle.api.internal.AbstractTask

        appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getReasonNotToTrackState, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, prependParallelSafeAction, setImpliesSubProjects
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.gradle.api.Task

        doNotTrackState, getConvention
      • Methods inherited from interface com.android.build.gradle.internal.tasks.VariantAwareTask

        getAnalyticsService
    • Field Detail

      • manifestType

        protected com.android.build.api.artifact.Artifact<org.gradle.api.file.Directory> manifestType
      • projectBaseName

        protected java.lang.String projectBaseName
      • buildTargetAbi

        @Nullable
        protected java.lang.String buildTargetAbi
      • buildTargetDensity

        @Nullable
        protected java.lang.String buildTargetDensity
      • apkCreatorType

        protected com.android.builder.internal.packaging.ApkCreatorType apkCreatorType
    • Constructor Detail

      • PackageAndroidArtifact

        public PackageAndroidArtifact()
    • Method Detail

      • getManifests

        @InputFiles
        @Incremental
        @PathSensitive(RELATIVE)
        public abstract org.gradle.api.file.DirectoryProperty getManifests()
      • getResourceFiles

        @InputFiles
        @Incremental
        @PathSensitive(RELATIVE)
        public abstract org.gradle.api.file.DirectoryProperty getResourceFiles()
      • getAbiFilters

        @Input
        @NonNull
        public abstract org.gradle.api.provider.SetProperty<java.lang.String> getAbiFilters()
      • getBaseModuleMetadata

        @InputFiles
        @PathSensitive(NAME_ONLY)
        @Optional
        public abstract org.gradle.api.file.ConfigurableFileCollection getBaseModuleMetadata()
      • getAppMetadata

        @InputFile
        @Incremental
        @PathSensitive(NAME_ONLY)
        @Optional
        public abstract org.gradle.api.file.RegularFileProperty getAppMetadata()
        App metadata to be packaged in the APK.
      • getMergedArtProfile

        @InputFiles
        @Incremental
        @PathSensitive(RELATIVE)
        @Optional
        public abstract org.gradle.api.file.RegularFileProperty getMergedArtProfile()
      • getMergedArtProfileMetadata

        @InputFiles
        @Incremental
        @PathSensitive(RELATIVE)
        @Optional
        public abstract org.gradle.api.file.RegularFileProperty getMergedArtProfileMetadata()
      • getIncrementalFolder

        @OutputDirectory
        public abstract org.gradle.api.file.DirectoryProperty getIncrementalFolder()
      • getManifestTypeName

        @Input
        public java.lang.String getManifestTypeName()
      • getJavaResourceFiles

        @Classpath
        @Incremental
        public abstract org.gradle.api.file.ConfigurableFileCollection getJavaResourceFiles()
        List of folders and/or jars that contain the merged java resources.

        FileCollection because of the legacy Transform API.

      • getFeatureJavaResourceFiles

        @Classpath
        @Incremental
        public abstract org.gradle.api.file.ConfigurableFileCollection getFeatureJavaResourceFiles()
        FileCollection because it comes from another project.
      • getJniFolders

        @Classpath
        @Incremental
        public abstract org.gradle.api.file.ConfigurableFileCollection getJniFolders()
        FileCollection because of the legacy Transform API.
      • getDexFolders

        @InputFiles
        @Incremental
        @PathSensitive(RELATIVE)
        public abstract org.gradle.api.file.ConfigurableFileCollection getDexFolders()
        FileCollection because of the legacy Transform API.
      • getFeatureDexFolder

        @InputFiles
        @Incremental
        @PathSensitive(RELATIVE)
        public abstract org.gradle.api.file.ConfigurableFileCollection getFeatureDexFolder()
        FileCollection as comes from another project.
      • getAssets

        @InputFiles
        @Incremental
        @PathSensitive(RELATIVE)
        public abstract org.gradle.api.file.DirectoryProperty getAssets()
      • getDependencyDataFile

        @InputFile
        @Nullable
        @Optional
        @PathSensitive(RELATIVE)
        public abstract org.gradle.api.file.RegularFileProperty getDependencyDataFile()
      • getCreatedBy

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.String> getCreatedBy()
      • getAaptOptionsNoCompress

        @NonNull
        @Input
        public abstract org.gradle.api.provider.ListProperty<java.lang.String> getAaptOptionsNoCompress()
      • getJniLibsUseLegacyPackaging

        @NonNull
        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getJniLibsUseLegacyPackaging()
      • getDexUseLegacyPackaging

        @NonNull
        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getDexUseLegacyPackaging()
      • getProjectBaseName

        @Input
        public java.lang.String getProjectBaseName()
      • getJniDebugBuild

        @Input
        public boolean getJniDebugBuild()
      • setJniDebugBuild

        public void setJniDebugBuild​(boolean jniDebugBuild)
      • getDebugBuild

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getDebugBuild()
      • getIsDeterministicEntryOrder

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getIsDeterministicEntryOrder()
      • getAllInputFilesWithRelativePathSensitivity

        @InputFiles
        @PathSensitive(RELATIVE)
        @Optional
        public abstract org.gradle.api.file.ConfigurableFileCollection getAllInputFilesWithRelativePathSensitivity()
        FileCollection of all other RELATIVE file inputs if getIsDeterministic() is true, or an empty FileCollection if getIsDeterministic() is false.

        The reason for this input is so that any change to an input file will cause the output APK to be built from scratch, which is necessary to create a deterministic APK.

      • getAllInputFilesWithNameOnlyPathSensitivity

        @InputFiles
        @PathSensitive(NAME_ONLY)
        @Optional
        public abstract org.gradle.api.file.ConfigurableFileCollection getAllInputFilesWithNameOnlyPathSensitivity()
        FileCollection of all other NAME_ONLY file inputs if getIsDeterministic() is true, or an empty FileCollection if getIsDeterministic() is false.

        The reason for this input is so that any change to an input file will cause the output APK to be built from scratch, which is necessary to create a deterministic APK.

      • getAllClasspathInputFiles

        @Classpath
        @Optional
        public abstract org.gradle.api.file.ConfigurableFileCollection getAllClasspathInputFiles()
        FileCollection of all other @Classpath file inputs if getIsDeterministic() is true, or an empty FileCollection if getIsDeterministic() is false.

        The reason for this input is so that any change to an input file will cause the output APK to be built from scratch, which is necessary to create a deterministic APK.

      • getSigningConfigData

        public com.android.build.gradle.internal.signing.SigningConfigDataProvider getSigningConfigData()
      • getSigningConfigVersions

        @InputFiles
        @PathSensitive(NONE)
        public abstract org.gradle.api.file.ConfigurableFileCollection getSigningConfigVersions()
      • getMinSdkVersion

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Integer> getMinSdkVersion()
      • getApplicationId

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.String> getApplicationId()
      • getNativeLibrariesAndDexPackagingModeNames

        @Input
        public java.util.List<java.lang.String> getNativeLibrariesAndDexPackagingModeNames()
      • getBuildTargetAbi

        @Input
        @Optional
        @Nullable
        public java.lang.String getBuildTargetAbi()
      • getBuildTargetDensity

        @Input
        @Optional
        @Nullable
        public java.lang.String getBuildTargetDensity()
      • getOutputDirectory

        @OutputDirectory
        public abstract org.gradle.api.file.DirectoryProperty getOutputDirectory()
      • getIdeModelOutputFile

        @OutputFile
        public abstract org.gradle.api.file.RegularFileProperty getIdeModelOutputFile()
      • getVariantOutputs

        public abstract org.gradle.api.provider.ListProperty<com.android.build.api.variant.impl.VariantOutputImpl> getVariantOutputs()
      • getTransformationRequest

        @Input
        public abstract com.android.build.api.artifact.ArtifactTransformationRequest getTransformationRequest()
      • getApkCreatorType

        @NonNull
        @Input
        public com.android.builder.internal.packaging.ApkCreatorType getApkCreatorType()
      • doTaskAction

        public void doTaskAction​(@NonNull
                                 org.gradle.work.InputChanges changes)
        Specified by:
        doTaskAction in class com.android.build.gradle.internal.tasks.NewIncrementalTask