Skip to content

Commit

Permalink
chore: Bump linters dependency in build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-perczynski committed Jan 21, 2024
1 parent c83383b commit afe0038
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 3 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ repositories {
dependencies {
compileOnly(gradleApi())
compileOnly(localGroovy())
compileOnly("org.ec4j.maven:ec4j-lint-api:0.0.8")
implementation("org.ec4j.linters:editorconfig-lint-api:0.2.1")
// Keep in sync with org.ec4j.gradle.EditorconfigGradlePlugin.LINTERS_VERSION */

testCompileOnly("junit:junit:4.13.2")
testCompileOnly("org.junit.jupiter:junit-jupiter:5.8.1")
testImplementation("junit:junit:4.13.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
testCompileOnly(gradleTestKit())
testCompileOnly("org.slf4j:slf4j-api:1.7.30")
testCompileOnly("org.slf4j:slf4j-simple:1.7.30")
testCompileOnly("org.ec4j.maven:ec4j-lint-api:0.0.8")
}

gradlePlugin {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/ec4j/gradle/EditorconfigGradlePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
*/
public class EditorconfigGradlePlugin implements Plugin<Project> {
public static final String CONFIGURATION_NAME = "editorconfig";
/** The version of {@code org.ec4j.maven:ec4j-linters} keep in sync with the version in {@code build.gradle} */
private static final String LINTERS_VERSION = "0.0.8";
/** The version of {@code org.ec4j.linters:editorconfig-linters} keep in sync with the version in {@code build.gradle} */
private static final String LINTERS_VERSION = "0.2.1";

/** {@inheritDoc} */
@Override
Expand All @@ -37,7 +37,7 @@ public void apply(Project project) {
project.getRepositories().add(project.getRepositories().mavenCentral());
project.getConfigurations().maybeCreate(CONFIGURATION_NAME);
final DependencyHandler dependencies = project.getDependencies();
dependencies.add(CONFIGURATION_NAME, "org.ec4j.maven:ec4j-linters:" + LINTERS_VERSION);
dependencies.add(CONFIGURATION_NAME, "org.ec4j.linters:editorconfig-linters:" + LINTERS_VERSION);

project.getTasks().create(EditorconfigCheckTask.NAME, EditorconfigCheckTask.class);
project.getTasks().create(EditorconfigFormatTask.NAME, EditorconfigFormatTask.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.ec4j.gradle.EditorconfigCheckTask;
import org.ec4j.gradle.EditorconfigFormatTask;
import org.ec4j.gradle.LinterConfig;
import org.ec4j.lint.api.EditableResource;
import org.ec4j.lint.api.FormatException;
import org.ec4j.lint.api.FormattingHandler;
import org.ec4j.lint.api.Linter;
Expand Down Expand Up @@ -108,7 +107,7 @@ public Resource createResource(Path absFile, Path relFile, Charset encoding) {
this.resourceFactory = new ResourceFactory() {
@Override
public Resource createResource(Path absFile, Path relFile, Charset encoding) {
return new EditableResource(absFile, relFile, encoding);
return new Resource(absFile, relFile, encoding);
}
};
} else {
Expand Down

0 comments on commit afe0038

Please sign in to comment.