public class AndroidBuckConfig extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AndroidBuckConfig.NdkSearchOrderEntry
Values acceptable for ndk.ndk_search_order.
|
Modifier and Type | Field and Description |
---|---|
static String |
PATH_ENTRY_IN_ADB_PATH_SEARCH_ORDER |
static String |
SDK_ENTRY_IN_ADB_PATH_SEARCH_ORDER |
static com.google.common.collect.ImmutableSet<String> |
VALID_ABI_KEYS |
Constructor and Description |
---|
AndroidBuckConfig(BuckConfig delegate,
Platform platform) |
Modifier and Type | Method and Description |
---|---|
Optional<ToolProvider> |
getAapt2Override()
Returns the tool provider to the platform specific aapt2 executable that is overridden by the
current project.
|
boolean |
getAaptNoResourceRemoval()
Whether to disable resource removal in aapt2.
|
Optional<java.util.function.Supplier<Tool>> |
getAaptOverride()
Returns the path to the platform specific aapt executable that is overridden by the current
project.
|
Optional<Path> |
getAdbOverride()
Returns the path to the adb executable overridden by the current project.
|
com.google.common.collect.ImmutableList<String> |
getAdbSearchOrder()
Defines the order to search for the adb executable: a list consisting of the elements '
|
Integer |
getAdbTimeout() |
Optional<String> |
getAndroidCompileSdkVersion() |
Optional<String> |
getBuildToolsVersion() |
com.google.common.collect.ImmutableList<String> |
getExtraNdkCFlags() |
com.google.common.collect.ImmutableList<String> |
getExtraNdkCxxFlags() |
com.google.common.collect.ImmutableList<String> |
getExtraNdkLdFlags() |
boolean |
getFailOnLegacyAaptErrors()
Whether to fail (vs warn) on legacy aapt2 compile errors.
|
Optional<String> |
getNdkAppPlatformForCpuAbi(String cpuAbi)
Returns the CPU specific app platform, or the fallback one if set.
|
Optional<String> |
getNdkClangVersion() |
Optional<NdkCompilerType> |
getNdkCompiler() |
com.google.common.collect.ImmutableMap<String,String> |
getNdkCpuAbiAppPlatformMap() |
Optional<String> |
getNdkCpuAbiFallbackAppPlatform() |
Optional<com.google.common.collect.ImmutableSet<NdkTargetArchAbi>> |
getNdkCpuAbis() |
Optional<NdkCxxRuntime> |
getNdkCxxRuntime() |
Optional<NdkCxxRuntimeType> |
getNdkCxxRuntimeType() |
Optional<BuildTarget> |
getNdkCxxToolchainTargetForAbi(NdkTargetArchAbi cpuAbi,
TargetConfiguration targetConfiguration)
Gets the ndk_toolchain target for the abi if it is specified in the config.
|
Optional<String> |
getNdkGccVersion() |
Optional<String> |
getNdkPath() |
Optional<String> |
getNdkRepositoryPath() |
com.google.common.collect.ImmutableList<AndroidBuckConfig.NdkSearchOrderEntry> |
getNdkSearchOrder()
Defines the order of search of the Android NDK.
|
Optional<Boolean> |
getNdkUnifiedHeaders() |
Optional<String> |
getNdkVersion() |
Optional<BuildTarget> |
getRedexTarget(TargetConfiguration targetConfiguration) |
Tool |
getRedexTool(BuildRuleResolver buildRuleResolver,
TargetConfiguration targetConfiguration) |
Optional<String> |
getSdkPath() |
Optional<String> |
getSdkPathConfigOptionFromSearchOrderEntry(String entry)
Given the entry to from the order of search of the Android SDK location returns the name of the
configuration option that contains SDK path if the entry instructs to get that value from
.buckconfig (i.e. |
com.google.common.collect.ImmutableList<String> |
getSdkPathSearchOrder()
Defines the order of search of the path to Android SDK.
|
Optional<Boolean> |
getSkipCrunchPngsDefault()
Whether to skip crunching pngs by default in aapt2 compile.
|
boolean |
isGrayscaleImageProcessingEnabled() |
public static final String PATH_ENTRY_IN_ADB_PATH_SEARCH_ORDER
public static final String SDK_ENTRY_IN_ADB_PATH_SEARCH_ORDER
public static final com.google.common.collect.ImmutableSet<String> VALID_ABI_KEYS
public AndroidBuckConfig(BuckConfig delegate, Platform platform)
public Optional<Boolean> getSkipCrunchPngsDefault()
public boolean getFailOnLegacyAaptErrors()
public boolean getAaptNoResourceRemoval()
public Optional<Path> getAdbOverride()
getAdbSearchOrder()
will be used to find adb.public com.google.common.collect.ImmutableList<String> getAdbSearchOrder()
public Integer getAdbTimeout()
public com.google.common.collect.ImmutableList<String> getSdkPathSearchOrder()
The order is the list of elements that can either be <CONFIG>
(to indicate the entry
from .buckconfig
) or the name of an environment variable that contains path to Android
SDK (for example, ANDROID_SDK
).
If nothing is specified in .buckconfig
the default order is: ANDROID_SDK
,
ANDROID_HOME
, ANDROID_SDK_ROOT
, <CONFIG>
public Optional<String> getSdkPathConfigOptionFromSearchOrderEntry(String entry)
.buckconfig
(i.e. it's <CONFIG>
) or Optional.empty()
in other cases.public com.google.common.collect.ImmutableList<AndroidBuckConfig.NdkSearchOrderEntry> getNdkSearchOrder()
The order is the list of elements that can either be <NDK_REPOSITORY_CONFIG>
to
indicate the entry ndk.ndk_repo_path
from .buckconfig
, <NDK_DIRECTORY_CONFIG>
to indicate the entry ndk.ndk_path
from .buckconfig
, or
the name of an environment variable that contains path to Android NDK (ANDROID_NDK
,
NDK_HOME
or ANDROID_NDK_REPOSITORY
).
If nothing is specified in .buckconfig
the default order is: ANDROID_NDK_REPOSITORY
, ANDROID_NDK
, NDK_HOME
, <NDK_REPOSITORY_CONFIG>
, <NDK_DIRECTORY_CONFIG>
public com.google.common.collect.ImmutableMap<String,String> getNdkCpuAbiAppPlatformMap()
public Optional<com.google.common.collect.ImmutableSet<NdkTargetArchAbi>> getNdkCpuAbis()
public Optional<NdkCompilerType> getNdkCompiler()
public Optional<NdkCxxRuntime> getNdkCxxRuntime()
public Optional<NdkCxxRuntimeType> getNdkCxxRuntimeType()
public com.google.common.collect.ImmutableList<String> getExtraNdkCFlags()
public com.google.common.collect.ImmutableList<String> getExtraNdkCxxFlags()
public com.google.common.collect.ImmutableList<String> getExtraNdkLdFlags()
public boolean isGrayscaleImageProcessingEnabled()
public Optional<String> getNdkAppPlatformForCpuAbi(String cpuAbi)
public Optional<BuildTarget> getNdkCxxToolchainTargetForAbi(NdkTargetArchAbi cpuAbi, TargetConfiguration targetConfiguration)
public Optional<java.util.function.Supplier<Tool>> getAaptOverride()
public Optional<ToolProvider> getAapt2Override()
public Optional<BuildTarget> getRedexTarget(TargetConfiguration targetConfiguration)
public Tool getRedexTool(BuildRuleResolver buildRuleResolver, TargetConfiguration targetConfiguration)