Search in sources :

Example 1 with ArtifactBuildTarget

use of org.jetbrains.jps.incremental.artifacts.ArtifactBuildTarget in project android by JetBrains.

the class AndroidJpsUtil method getAndroidArtifactsToBuild.

@NotNull
public static List<JpsArtifact> getAndroidArtifactsToBuild(@NotNull CompileContext context) {
    final List<JpsArtifact> artifacts = JpsArtifactService.getInstance().getArtifacts(context.getProjectDescriptor().getProject());
    final List<JpsArtifact> result = new ArrayList<JpsArtifact>();
    for (JpsArtifact artifact : artifacts) {
        if (artifact.getArtifactType() instanceof AndroidApplicationArtifactType && context.getScope().isAffected(new ArtifactBuildTarget(artifact))) {
            result.add(artifact);
        }
    }
    return result;
}
Also used : JpsArtifact(org.jetbrains.jps.model.artifact.JpsArtifact) ArtifactBuildTarget(org.jetbrains.jps.incremental.artifacts.ArtifactBuildTarget) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

NotNull (org.jetbrains.annotations.NotNull)1 ArtifactBuildTarget (org.jetbrains.jps.incremental.artifacts.ArtifactBuildTarget)1 JpsArtifact (org.jetbrains.jps.model.artifact.JpsArtifact)1