void (@NotNull Module module, @NotNull String url, boolean forTests) { ModuleRootModificationUtil.updateModel(module, model -> { CompilerModuleExtension extension = model.getModuleExtension(CompilerModuleExtension.class); extension.inheritCompilerOutputPath(false); if (forTests) { extension.setCompilerOutputPathForTests(url); } else { extension.setCompilerOutputPath(url); } }); }