void (final Project project, final String artifactName, final String outputPath) { WriteAction.runAndWait(() -> { final ModifiableArtifactModel model = ArtifactManager.getInstance(project).createModifiableModel(); model.getOrCreateModifiableArtifact(findArtifact(project, artifactName)).setOutputPath(outputPath); model.commit(); }); }