Skip to content

Commit

Permalink
use new class name
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdanfox committed Oct 22, 2019
1 parent 374fbda commit 8d8a5ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@

import com.diffplug.gradle.spotless.SpotlessExtension;
import com.diffplug.spotless.FormatterFunc;
import com.palantir.javaformat.java.FormatDiffCli;
import com.palantir.javaformat.java.FormatDiff;
import com.palantir.javaformat.java.Formatter;
import com.palantir.javaformat.java.JavaFormatterOptions;
import com.palantir.javaformat.java.JavaFormatterOptions.Style;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import org.gradle.api.DefaultTask;
import org.gradle.api.GradleException;
import org.gradle.api.Project;
Expand All @@ -34,10 +37,6 @@
import org.gradle.api.tasks.TaskProvider;
import org.gradle.api.tasks.compile.JavaCompile;

import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;

class BaselineFormat extends AbstractBaselinePlugin {

// TODO(dfox): remove this feature flag when we've refined the eclipse.xml sufficiently
Expand All @@ -51,7 +50,7 @@ public void apply(Project project) {

project.getPluginManager().withPlugin("java", plugin -> {
if (palantirJavaFormatterEnabled(project)) {
project.getTasks().register("formatDiff", FormatDiff.class);
project.getTasks().register("formatDiff", FormatDiffTask.class);
}

project.getPluginManager().apply("com.diffplug.gradle.spotless");
Expand Down Expand Up @@ -116,10 +115,10 @@ public void apply(Project project) {
});
}

public static class FormatDiff extends DefaultTask {
public static class FormatDiffTask extends DefaultTask {
@TaskAction
public final void formatDiff() throws IOException, InterruptedException {
FormatDiffCli.formatDiff(getProject().getProjectDir().toPath());
FormatDiff.formatDiff(getProject().getProjectDir().toPath());
}
}

Expand Down
2 changes: 1 addition & 1 deletion versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ com.google.errorprone:error_prone_test_helpers = 2.3.3
com.google.guava:guava = 27.1-jre
com.netflix.nebula:nebula-dependency-recommender = 9.0.0
com.palantir.configurationresolver:gradle-configuration-resolver-plugin = 0.4.0
com.palantir.javaformat:* = 0.2.7
com.palantir.javaformat:* = 0.2.8
com.palantir.safe-logging:* = 1.11.0
org.apache.maven.shared:maven-dependency-analyzer = 1.11.1
org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11 = 1.0.1
Expand Down

0 comments on commit 8d8a5ca

Please sign in to comment.