TargetTypeBuildScope (Collection<? extends Artifact> artifacts, boolean forceBuild) { TargetTypeBuildScope.Builder builder = TargetTypeBuildScope.newBuilder() .setTypeId(ArtifactBuildTargetType.INSTANCE.getTypeId()) .setForceBuild( forceBuild); for (Artifact artifact : artifacts) { builder.addTargetId(artifact.getName()); } return builder.build(); }