From 7d2bac17938caae34aaaa9fd22609ffb0b5b08e4 Mon Sep 17 00:00:00 2001 From: JoseLion Date: Fri, 15 Sep 2023 02:00:57 -0500 Subject: [PATCH] fix(source): Dependency versions convention to latest --- README.md | 6 +++--- .../strictnullcheck/lib/StrictNullCheckExtension.java | 6 +++--- .../strictnullcheck/lib/StrictNullCheckExtensionTest.java | 6 +++--- .../strictnullcheck/StrictNullCheckPluginTkTest.java | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 3384a70..dcecb34 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/main/java/io/github/joselion/strictnullcheck/lib/StrictNullCheckExtension.java b/src/main/java/io/github/joselion/strictnullcheck/lib/StrictNullCheckExtension.java index 060c18c..9ab4e97 100644 --- a/src/main/java/io/github/joselion/strictnullcheck/lib/StrictNullCheckExtension.java +++ b/src/main/java/io/github/joselion/strictnullcheck/lib/StrictNullCheckExtension.java @@ -131,7 +131,7 @@ public void addFindBugs(final String version) { } public void addFindBugs() { - this.addFindBugs("+"); + this.addFindBugs("3.0.2"); } public void addSpotBugs(final String version) { @@ -139,7 +139,7 @@ public void addSpotBugs(final String version) { } public void addSpotBugs() { - this.addSpotBugs("+"); + this.addSpotBugs("4.7.3"); } public void addEclipse(final String version) { @@ -147,7 +147,7 @@ public void addEclipse(final String version) { } public void addEclipse() { - this.addEclipse("+"); + this.addEclipse("2.2.700"); } } } diff --git a/src/test/java/io/github/joselion/strictnullcheck/lib/StrictNullCheckExtensionTest.java b/src/test/java/io/github/joselion/strictnullcheck/lib/StrictNullCheckExtensionTest.java index 21f0b27..a3f181d 100644 --- a/src/test/java/io/github/joselion/strictnullcheck/lib/StrictNullCheckExtensionTest.java +++ b/src/test/java/io/github/joselion/strictnullcheck/lib/StrictNullCheckExtensionTest.java @@ -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"); } } @@ -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"); } } @@ -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"); } } } diff --git a/src/testkit/java/io/github/joselion/strictnullcheck/StrictNullCheckPluginTkTest.java b/src/testkit/java/io/github/joselion/strictnullcheck/StrictNullCheckPluginTkTest.java index 5a72952..6a670ac 100644 --- a/src/testkit/java/io/github/joselion/strictnullcheck/StrictNullCheckPluginTkTest.java +++ b/src/testkit/java/io/github/joselion/strictnullcheck/StrictNullCheckPluginTkTest.java @@ -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"); } } @@ -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"); } }