com.android.builder.core
Class AaptPackageCommandBuilder
java.lang.Object
com.android.builder.core.AaptPackageCommandBuilder
public class AaptPackageCommandBuilder
- extends java.lang.Object
Builds the command line necessary for an aapt package invocation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AaptPackageCommandBuilder
public AaptPackageCommandBuilder(@NonNull
java.io.File manifestFile,
@NonNull
com.android.builder.model.AaptOptions options)
- Parameters:
manifestFile
- the location of the manifest fileoptions
- the AaptOptions
getManifestFile
public java.io.File getManifestFile()
setResFolder
public AaptPackageCommandBuilder setResFolder(@NonNull
java.io.File resFolder)
- Parameters:
resFolder
- the merged res folder
- Returns:
- itself
setAssetsFolder
public AaptPackageCommandBuilder setAssetsFolder(@NonNull
java.io.File assetsFolder)
- Parameters:
assetsFolder
- the merged asset folder
- Returns:
- itself
setSourceOutputDir
public AaptPackageCommandBuilder setSourceOutputDir(@Nullable
java.lang.String sourceOutputDir)
- Parameters:
sourceOutputDir
- optional source folder to generate R.java
- Returns:
- itself
getSourceOutputDir
@Nullable
public java.lang.String getSourceOutputDir()
setSymbolOutputDir
public AaptPackageCommandBuilder setSymbolOutputDir(@Nullable
java.lang.String symbolOutputDir)
- Parameters:
symbolOutputDir
- the folder to write symbols into
getSymbolOutputDir
@Nullable
public java.lang.String getSymbolOutputDir()
setLibraries
public AaptPackageCommandBuilder setLibraries(@NonNull
java.util.List<? extends SymbolFileProvider> libraries)
- Parameters:
libraries
- the flat list of libraries
- Returns:
- itself
getLibraries
@NonNull
public java.util.List<? extends SymbolFileProvider> getLibraries()
setResPackageOutput
public AaptPackageCommandBuilder setResPackageOutput(@Nullable
java.lang.String resPackageOutput)
- Parameters:
resPackageOutput
- optional filepath for packaged resources
- Returns:
- itself
setProguardOutput
public AaptPackageCommandBuilder setProguardOutput(@Nullable
java.lang.String proguardOutput)
- Parameters:
proguardOutput
- optional filepath for proguard file to generate
- Returns:
- itself
setType
public AaptPackageCommandBuilder setType(@NonNull
VariantConfiguration.Type type)
- Parameters:
type
- the type of the variant being built
- Returns:
- itself
getType
@Nullable
public VariantConfiguration.Type getType()
setDebuggable
public AaptPackageCommandBuilder setDebuggable(boolean debuggable)
- Parameters:
debuggable
- whether the app is debuggable
- Returns:
- itself
setResourceConfigs
public AaptPackageCommandBuilder setResourceConfigs(@NonNull
java.util.Collection<java.lang.String> resourceConfigs)
- Parameters:
resourceConfigs
- a list of resource config filters to pass to aapt.
- Returns:
- itself
setSplits
public AaptPackageCommandBuilder setSplits(@NonNull
java.util.Collection<java.lang.String> splits)
- Parameters:
splits
- optional list of split dimensions values (like a density or an abi). This
will be used by aapt to generate the corresponding pure split apks.
- Returns:
- itself
setVerbose
public AaptPackageCommandBuilder setVerbose()
setPackageForR
public AaptPackageCommandBuilder setPackageForR(@NonNull
java.lang.String packageForR)
- Parameters:
packageForR
- Package override to generate the R class in a different package.
- Returns:
- itself
setPseudoLocalesEnabled
public AaptPackageCommandBuilder setPseudoLocalesEnabled(boolean pseudoLocalesEnabled)
setPreferredDensity
public AaptPackageCommandBuilder setPreferredDensity(java.lang.String density)
- Specifies a preference for a particular density. Resources that do not match this density
and have variants that are a closer match are removed.
- Parameters:
density
- the preferred density
- Returns:
- itself
build
public java.util.List<java.lang.String> build(@NonNull
com.android.sdklib.BuildToolInfo buildToolInfo,
@NonNull
com.android.sdklib.IAndroidTarget target,
@NonNull
com.android.utils.ILogger logger)