public class ExternalNativeBuildTaskUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ExternalNativeBuildTaskUtils.ExternalNativeBuildProjectPathResolution |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CUSTOM_FORK_CMAKE_VERSION |
Constructor and Description |
---|
ExternalNativeBuildTaskUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
fileIsUpToDate(java.io.File source,
java.io.File derived)
File 'derived' is consider to depend on the contents of file 'source' this function return
true if source is more recent than derived.
|
static java.io.File |
findCmakeExecutableFolder(java.lang.String cmakeVersion,
com.android.build.gradle.internal.SdkHandler sdkHandler)
Returns the folder with the CMake binary.
|
static java.io.File |
getCompileCommandsJson(java.io.File jsonFolder,
java.lang.String abi)
Utility function that gets the name of the output JSON for a particular ABI.
|
static java.io.File |
getJsonMiniConfigFile(java.io.File originalJson)
The json mini-config file contains a subset of the regular json file that is much smaller and
less memory-intensive to read.
|
static java.io.File |
getOutputJson(java.io.File jsonFolder,
java.lang.String abi)
Utility function that gets the name of the output JSON for a particular ABI.
|
static java.util.List<java.io.File> |
getOutputJsons(java.io.File jsonFolder,
java.util.Collection<java.lang.String> abis) |
static ExternalNativeBuildTaskUtils.ExternalNativeBuildProjectPathResolution |
getProjectPath(com.android.build.gradle.internal.model.CoreExternalNativeBuild config)
Resolve the path of any native build project.
|
static boolean |
isExternalNativeBuildEnabled(com.android.build.gradle.internal.model.CoreExternalNativeBuild config) |
public static final java.lang.String CUSTOM_FORK_CMAKE_VERSION
public static boolean fileIsUpToDate(@NonNull java.io.File source, @NonNull java.io.File derived) throws java.io.IOException
If derived doesn't exist then it is not consider to be up-to-date with respect to source.
source
- -- original file (must exist)derived
- -- derived filejava.io.IOException
- if there was a problem reading the timestamp of one of the files@NonNull public static java.io.File getJsonMiniConfigFile(@NonNull java.io.File originalJson)
@NonNull public static java.io.File getOutputJson(@NonNull java.io.File jsonFolder, @NonNull java.lang.String abi)
@NonNull public static java.io.File getCompileCommandsJson(@NonNull java.io.File jsonFolder, @NonNull java.lang.String abi)
@NonNull public static java.util.List<java.io.File> getOutputJsons(@NonNull java.io.File jsonFolder, @NonNull java.util.Collection<java.lang.String> abis)
public static boolean isExternalNativeBuildEnabled(@NonNull com.android.build.gradle.internal.model.CoreExternalNativeBuild config)
@NonNull public static ExternalNativeBuildTaskUtils.ExternalNativeBuildProjectPathResolution getProjectPath(@NonNull com.android.build.gradle.internal.model.CoreExternalNativeBuild config)
config
- -- the AndroidConfig@NonNull public static java.io.File findCmakeExecutableFolder(@NonNull java.lang.String cmakeVersion, @NonNull com.android.build.gradle.internal.SdkHandler sdkHandler)
sdkHandler
- sdk handler