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 java.lang.String |
executeBuildProcessAndLogError(com.android.builder.core.AndroidBuilder androidBuilder,
com.android.ide.common.process.ProcessInfoBuilder process,
boolean logStdioToInfo,
java.lang.String logPrefix)
Execute an external process and log the result in the case of a process exceptions.
|
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) |
static boolean |
shouldRegenerateOutOfDateJsons(ProjectOptions options)
Return true if we should regenerate out-of-date JSON files.
|
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 timestampe 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 shouldRegenerateOutOfDateJsons(@NonNull
ProjectOptions options)
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.lang.String executeBuildProcessAndLogError(@NonNull
com.android.builder.core.AndroidBuilder androidBuilder,
@NonNull
com.android.ide.common.process.ProcessInfoBuilder process,
boolean logStdioToInfo,
@NonNull
java.lang.String logPrefix)
throws com.android.ide.common.process.BuildCommandException,
java.io.IOException
com.android.ide.common.process.BuildCommandException - when the build failed.java.io.IOException@NonNull
public static java.io.File findCmakeExecutableFolder(@NonNull
java.lang.String cmakeVersion,
@NonNull
com.android.build.gradle.internal.SdkHandler sdkHandler)
sdkHandler - sdk handler