diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index fc06d1ca7..0e2ab2e90 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -66,7 +66,7 @@ val plugin: Configuration by configurations.creating configurations.getByName("compileOnly").extendsFrom(plugin) // Fixed version numbers because com.gradle.plugin-publish will publish poms with requested rather than resolved versions -val rewriteVersion = "7.0.0-rc.8" +val rewriteVersion = "7.0.1" val prometheusVersion = "1.3.0" val nettyVersion = "1.1.0" diff --git a/plugin/src/main/java/org/openrewrite/gradle/AbstractRewriteTask.java b/plugin/src/main/java/org/openrewrite/gradle/AbstractRewriteTask.java index 86df6877b..12a5fff23 100644 --- a/plugin/src/main/java/org/openrewrite/gradle/AbstractRewriteTask.java +++ b/plugin/src/main/java/org/openrewrite/gradle/AbstractRewriteTask.java @@ -141,30 +141,6 @@ protected ExecutionContext executionContext() { return new InMemoryExecutionContext(t -> getLog().warn(t.getMessage(), t)); } - protected Parser.Listener listener() { - return new Parser.Listener() { - @Override - public void onError(String message) { - getLog().error(message); - } - - @Override - public void onError(String message, Throwable t) { - getLog().error(message, t); - } - - @Override - public void onWarn(String message) { - getLog().info(message); - } - - @Override - public void onWarn(String message, Throwable t) { - getLog().info(message, t); - } - }; - } - protected ResultsContainer listResults() { try (MeterRegistryProvider meterRegistryProvider = new MeterRegistryProvider(getLog(), metricsUri, metricsUsername, metricsPassword)) { MeterRegistry meterRegistry = meterRegistryProvider.registry(); @@ -190,7 +166,6 @@ protected ResultsContainer listResults() { .map(AbstractRewriteTask::toRealPath) .collect(toList()); ExecutionContext ctx = executionContext(); - Parser.Listener listener = listener(); sourceFiles.addAll( JavaParser.fromJavaVersion() @@ -202,9 +177,7 @@ protected ResultsContainer listResults() { ); sourceFiles.addAll( - YamlParser.builder() - .doOnParse(listener) - .build() + new YamlParser() .parse(getResources().getFiles().stream() .filter(it -> it.isFile() && it.getName().endsWith(".yml") || it.getName().endsWith(".yaml")) .map(File::toPath) @@ -214,9 +187,7 @@ protected ResultsContainer listResults() { )); sourceFiles.addAll( - PropertiesParser.builder() - .doOnParse(listener) - .build() + new PropertiesParser() .parse( getResources().getFiles().stream() .filter(it -> it.isFile() && it.getName().endsWith(".properties")) @@ -227,9 +198,7 @@ protected ResultsContainer listResults() { )); sourceFiles.addAll( - XmlParser.builder() - .doOnParse(listener) - .build().parse( + new XmlParser().parse( getResources().getFiles().stream() .filter(it -> it.isFile() && it.getName().endsWith(".xml")) .map(File::toPath)