Class CmakeUtils
- java.lang.Object
-
- com.android.build.gradle.external.cmake.CmakeUtils
-
public class CmakeUtils extends java.lang.ObjectCmake utility class.
-
-
Constructor Summary
Constructors Constructor Description CmakeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Set<java.lang.String>getCExtensionSet(CodeModel codeModel)Returns the C file extensions for the given code model.static java.util.Set<java.lang.String>getCppExtensionSet(CodeModel codeModel)Returns the C++ file extensions for the given code model.static <ContentType>
java.lang.StringgetObjectToString(ContentType content)Returns a JSON string representation of the given object.static intgetToolchainHash(com.android.build.gradle.internal.cxx.json.NativeToolchainValue toolchainValue)Returns the toolchain hash for the given toolchain.static com.android.repository.RevisiongetVersion(java.io.File cmakeInstallPath)Parses the Cmake (from the given install path) version string into a structure.static com.android.repository.RevisiongetVersion(java.lang.String cmakeVersionString)static java.lang.StringkeepWhileNumbersAndDots(java.lang.String versionString)
-
-
-
Method Detail
-
getVersion
@NonNull public static com.android.repository.Revision getVersion(@NonNull java.io.File cmakeInstallPath) throws java.io.IOExceptionParses the Cmake (from the given install path) version string into a structure.- Returns:
- Revision for the version string.
- Throws:
java.io.IOException- I/O failure
-
keepWhileNumbersAndDots
@NonNull public static java.lang.String keepWhileNumbersAndDots(java.lang.String versionString)
-
getVersion
@NonNull public static com.android.repository.Revision getVersion(@NonNull java.lang.String cmakeVersionString)
-
getCppExtensionSet
@NonNull public static java.util.Set<java.lang.String> getCppExtensionSet(@NonNull CodeModel codeModel)Returns the C++ file extensions for the given code model.
-
getCExtensionSet
@NonNull public static java.util.Set<java.lang.String> getCExtensionSet(CodeModel codeModel)
Returns the C file extensions for the given code model.
-
getToolchainHash
public static int getToolchainHash(@NonNull com.android.build.gradle.internal.cxx.json.NativeToolchainValue toolchainValue)Returns the toolchain hash for the given toolchain. If the contents of the toolchain are null, the functions returns 0.
-
getObjectToString
@Nullable public static <ContentType> java.lang.String getObjectToString(@Nullable ContentType content)Returns a JSON string representation of the given object. This is used instead of 'toString' when printing an object's contents.
-
-