Skip to content

Commit

Permalink
fix(source): Dependency versions convention to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseLion committed Sep 15, 2023
1 parent 231564a commit 7d2bac1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ strictNullCheck {
| packageInfo.useEclipse() | - | Shorcut function to set Eclipse's imports and annotations |
| source | - | Container to configure the source of the annotations/imports |
| source.dependencies | [] | List of short-style dependencies to be added to all _compileOnly_ classpaths |
| source.addFindBugs(version) | version = `+` (resolves to latest) | Shortcut function to add `com.google.code.findbugs:jsr305` dependency |
| source.addSpotBugs(version) | version = `+` (resolves to latest) | Shortcut function to add `com.github.spotbugs:spotbugs-annotations` dependency |
| source.addEclipse(version) | version = `+` (resolves to latest) | Shortcut function to add `org.eclipse.jdt:org.eclipse.jdt.annotation` dependency |
| source.addFindBugs(version) | version = `3.0.2` | Shortcut function to add `com.google.code.findbugs:jsr305` dependency |
| source.addSpotBugs(version) | version = `4.7.3` | Shortcut function to add `com.github.spotbugs:spotbugs-annotations` dependency |
| source.addEclipse(version) | version = `2.2.700` | Shortcut function to add `org.eclipse.jdt:org.eclipse.jdt.annotation` dependency |

### Overriding package-info.java

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,23 @@ public void addFindBugs(final String version) {
}

public void addFindBugs() {
this.addFindBugs("+");
this.addFindBugs("3.0.2");
}

public void addSpotBugs(final String version) {
this.dependencies.add("com.github.spotbugs:spotbugs-annotations:".concat(version));
}

public void addSpotBugs() {
this.addSpotBugs("+");
this.addSpotBugs("4.7.3");
}

public void addEclipse(final String version) {
this.dependencies.add("org.eclipse.jdt:org.eclipse.jdt.annotation:".concat(version));
}

public void addEclipse() {
this.addEclipse("+");
this.addEclipse("2.2.700");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

final var dependencies = extension.getSource().getDependencies().get();

assertThat(dependencies).contains("com.google.code.findbugs:jsr305:+");
assertThat(dependencies).contains("com.google.code.findbugs:jsr305:3.0.2");
}
}

Expand All @@ -106,7 +106,7 @@

final var dependencies = extension.getSource().getDependencies().get();

assertThat(dependencies).contains("com.github.spotbugs:spotbugs-annotations:+");
assertThat(dependencies).contains("com.github.spotbugs:spotbugs-annotations:4.7.3");
}
}

Expand All @@ -119,7 +119,7 @@

final var dependencies = extension.getSource().getDependencies().get();

assertThat(dependencies).contains("org.eclipse.jdt:org.eclipse.jdt.annotation:+");
assertThat(dependencies).contains("org.eclipse.jdt:org.eclipse.jdt.annotation:2.2.700");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ task showConfig() {

assertThat(result.getOutput())
.contains("*** packageInfo.annotations: [my.custom.annotation.NullApi, my.custom.annotation.NullFields]")
.contains("*** source.dependencies: [my.custom:annotations:1.5.3, com.google.code.findbugs:jsr305:+]")
.contains("*** source.dependencies: [my.custom:annotations:1.5.3, com.google.code.findbugs:jsr305:3.0.2]")
.contains("BUILD SUCCESSFUL");
}
}
Expand Down Expand Up @@ -135,7 +135,7 @@ task showConfig() {

assertThat(result.getOutput())
.contains("*** packageInfo.annotations: [my.custom.annotation.NullApi, my.custom.annotation.NullFields]")
.contains("*** source.dependencies: [my.custom:annotations:1.5.3, com.google.code.findbugs:jsr305:+]")
.contains("*** source.dependencies: [my.custom:annotations:1.5.3, com.google.code.findbugs:jsr305:3.0.2]")
.contains("BUILD SUCCESSFUL");
}
}
Expand Down

0 comments on commit 7d2bac1

Please sign in to comment.