Search in sources :

Example 1 with BuildScriptModel

use of com.android.tools.idea.gradle.dsl.model.build.BuildScriptModel in project android by JetBrains.

the class GradleBuildModel method buildscript.

@NotNull
public BuildScriptModel buildscript() {
    BuildScriptDslElement buildScriptDslElement = myGradleDslFile.getPropertyElement(BUILDSCRIPT_BLOCK_NAME, BuildScriptDslElement.class);
    if (buildScriptDslElement == null) {
        buildScriptDslElement = new BuildScriptDslElement(myGradleDslFile);
        myGradleDslFile.setNewElement(BUILDSCRIPT_BLOCK_NAME, buildScriptDslElement);
    }
    return new BuildScriptModel(buildScriptDslElement);
}
Also used : BuildScriptDslElement(com.android.tools.idea.gradle.dsl.parser.build.BuildScriptDslElement) BuildScriptModel(com.android.tools.idea.gradle.dsl.model.build.BuildScriptModel) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

BuildScriptModel (com.android.tools.idea.gradle.dsl.model.build.BuildScriptModel)1 BuildScriptDslElement (com.android.tools.idea.gradle.dsl.parser.build.BuildScriptDslElement)1 NotNull (org.jetbrains.annotations.NotNull)1