use of org.jetbrains.jps.api.CmdlineRemoteProto.Message.ControllerMessage.ParametersMessage.TargetTypeBuildScope in project intellij-community by JetBrains.
the class Standalone method runBuild.
public static void runBuild(JpsModelLoader loader, final File dataStorageRoot, boolean forceBuild, Set<String> modulesSet, final boolean allModules, List<String> artifactsList, boolean allArtifacts, final boolean includeTests, final MessageHandler messageHandler) throws Exception {
List<TargetTypeBuildScope> scopes = new ArrayList<>();
for (JavaModuleBuildTargetType type : JavaModuleBuildTargetType.ALL_TYPES) {
if (includeTests || !type.isTests()) {
TargetTypeBuildScope.Builder builder = TargetTypeBuildScope.newBuilder().setTypeId(type.getTypeId()).setForceBuild(forceBuild);
if (allModules) {
scopes.add(builder.setAllTargets(true).build());
} else if (!modulesSet.isEmpty()) {
scopes.add(builder.addAllTargetId(modulesSet).build());
}
}
}
TargetTypeBuildScope.Builder builder = TargetTypeBuildScope.newBuilder().setTypeId(ArtifactBuildTargetType.INSTANCE.getTypeId()).setForceBuild(forceBuild);
if (allArtifacts) {
scopes.add(builder.setAllTargets(true).build());
} else if (!artifactsList.isEmpty()) {
scopes.add(builder.addAllTargetId(artifactsList).build());
}
runBuild(loader, dataStorageRoot, messageHandler, scopes, true);
}
Aggregations