Search in sources :

Example 6 with CMakeModel

use of com.android.tools.idea.gradle.dsl.model.android.externalNativeBuild.CMakeModel in project android by JetBrains.

the class ExternalNativeBuildModelTest method testCMake.

public void testCMake() throws Exception {
    String text = "android {\n" + "  externalNativeBuild {\n" + "    cmake {\n" + "      path file(\"foo/bar\")\n" + "    }\n" + "  }\n" + "}";
    writeToBuildFile(text);
    AndroidModel android = getGradleBuildModel().android();
    assertNotNull(android);
    ExternalNativeBuildModel externalNativeBuild = android.externalNativeBuild();
    assertTrue(externalNativeBuild.hasValidPsiElement());
    CMakeModel cmake = externalNativeBuild.cmake();
    assertTrue(cmake.hasValidPsiElement());
    assertEquals("path", new File("foo/bar"), cmake.path());
}
Also used : CMakeModel(com.android.tools.idea.gradle.dsl.model.android.externalNativeBuild.CMakeModel) File(java.io.File)

Aggregations

CMakeModel (com.android.tools.idea.gradle.dsl.model.android.externalNativeBuild.CMakeModel)6 File (java.io.File)5 GradleBuildModel (com.android.tools.idea.gradle.dsl.model.GradleBuildModel)2 CMakeDslElement (com.android.tools.idea.gradle.dsl.parser.android.externalNativeBuild.CMakeDslElement)1 NotNull (org.jetbrains.annotations.NotNull)1