Search in sources :

Example 6 with SourceDirectoryModel

use of com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel in project android by JetBrains.

the class SourceSetModel method resources.

@NotNull
public SourceDirectoryModel resources() {
    SourceDirectoryDslElement resources = myDslElement.getPropertyElement(RESOURCES, SourceDirectoryDslElement.class);
    if (resources == null) {
        resources = new SourceDirectoryDslElement(myDslElement, RESOURCES);
        myDslElement.setNewElement(RESOURCES, resources);
    }
    return new SourceDirectoryModel(resources);
}
Also used : SourceDirectoryModel(com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel) SourceDirectoryDslElement(com.android.tools.idea.gradle.dsl.parser.android.sourceSets.SourceDirectoryDslElement) NotNull(org.jetbrains.annotations.NotNull)

Example 7 with SourceDirectoryModel

use of com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel in project android by JetBrains.

the class SourceSetModel method assets.

@NotNull
public SourceDirectoryModel assets() {
    SourceDirectoryDslElement assets = myDslElement.getPropertyElement(ASSETS, SourceDirectoryDslElement.class);
    if (assets == null) {
        assets = new SourceDirectoryDslElement(myDslElement, ASSETS);
        myDslElement.setNewElement(ASSETS, assets);
    }
    return new SourceDirectoryModel(assets);
}
Also used : SourceDirectoryModel(com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel) SourceDirectoryDslElement(com.android.tools.idea.gradle.dsl.parser.android.sourceSets.SourceDirectoryDslElement) NotNull(org.jetbrains.annotations.NotNull)

Example 8 with SourceDirectoryModel

use of com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel in project android by JetBrains.

the class SourceSetModel method java.

@NotNull
public SourceDirectoryModel java() {
    SourceDirectoryDslElement java = myDslElement.getPropertyElement(JAVA, SourceDirectoryDslElement.class);
    if (java == null) {
        java = new SourceDirectoryDslElement(myDslElement, JAVA);
        myDslElement.setNewElement(JAVA, java);
    }
    return new SourceDirectoryModel(java);
}
Also used : SourceDirectoryModel(com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel) SourceDirectoryDslElement(com.android.tools.idea.gradle.dsl.parser.android.sourceSets.SourceDirectoryDslElement) NotNull(org.jetbrains.annotations.NotNull)

Example 9 with SourceDirectoryModel

use of com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel in project android by JetBrains.

the class SourceSetModel method renderscript.

@NotNull
public SourceDirectoryModel renderscript() {
    SourceDirectoryDslElement renderscript = myDslElement.getPropertyElement(RENDERSCRIPT, SourceDirectoryDslElement.class);
    if (renderscript == null) {
        renderscript = new SourceDirectoryDslElement(myDslElement, RENDERSCRIPT);
        myDslElement.setNewElement(RENDERSCRIPT, renderscript);
    }
    return new SourceDirectoryModel(renderscript);
}
Also used : SourceDirectoryModel(com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel) SourceDirectoryDslElement(com.android.tools.idea.gradle.dsl.parser.android.sourceSets.SourceDirectoryDslElement) NotNull(org.jetbrains.annotations.NotNull)

Example 10 with SourceDirectoryModel

use of com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel in project android by JetBrains.

the class SourceSetModel method aidl.

@NotNull
public SourceDirectoryModel aidl() {
    SourceDirectoryDslElement aidl = myDslElement.getPropertyElement(AIDL, SourceDirectoryDslElement.class);
    if (aidl == null) {
        aidl = new SourceDirectoryDslElement(myDslElement, AIDL);
        myDslElement.setNewElement(AIDL, aidl);
    }
    return new SourceDirectoryModel(aidl);
}
Also used : SourceDirectoryModel(com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel) SourceDirectoryDslElement(com.android.tools.idea.gradle.dsl.parser.android.sourceSets.SourceDirectoryDslElement) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

SourceDirectoryModel (com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceDirectoryModel)17 GradleBuildModel (com.android.tools.idea.gradle.dsl.model.GradleBuildModel)8 SourceDirectoryDslElement (com.android.tools.idea.gradle.dsl.parser.android.sourceSets.SourceDirectoryDslElement)8 NotNull (org.jetbrains.annotations.NotNull)8 SourceFileModel (com.android.tools.idea.gradle.dsl.model.android.sourceSets.SourceFileModel)1