Skip to content

Commit 2632202

Browse files
committed
Make sure to not accidentially match partial module notations
All the bouncycastle capability definitions contain module names that don't exist, e.g. org.bouncycastle:bcmail.
1 parent 06deb51 commit 2632202

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

gradle/plugins/documentation/src/main/kotlin/gradlexbuild/jvm/dependency/conflict/documentation/SamplesCompletenessCheck.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ abstract class SamplesCompletenessCheck : DefaultTask() {
3131

3232
val missing = definitions.enumConstants.map { rule ->
3333
val modules = definitions.getDeclaredMethod("getModules").invoke(rule) as List<*>
34-
modules.filter { module -> !testBuildFileContent.contains(module as String) }
34+
modules.filter { module -> !testBuildFileContent.contains("$module:") }
3535
}.flatten().distinct()
3636

3737
if (missing.isNotEmpty()) {

src/main/java/org/gradlex/jvm/dependency/conflict/detection/rules/CapabilityDefinition.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public enum CapabilityDefinition {
7070
"org.ow2.asm:asm"
7171
),
7272
BOUNCYCASTLE_BCMAIL(HIGHEST_VERSION,
73-
"org.bouncycastle:bcmail",
7473
"org.bouncycastle:bcmail-fips",
7574
"org.bouncycastle:bcmail-jdk14",
7675
"org.bouncycastle:bcmail-jdk15",
@@ -84,7 +83,6 @@ public enum CapabilityDefinition {
8483
"org.bouncycastle:bcjmail-jdk18on"
8584
),
8685
BOUNCYCASTLE_BCPG(HIGHEST_VERSION,
87-
"org.bouncycastle:bcpg",
8886
"org.bouncycastle:bcpg-fips",
8987
"org.bouncycastle:bcpg-jdk12",
9088
"org.bouncycastle:bcpg-jdk14",
@@ -96,15 +94,13 @@ public enum CapabilityDefinition {
9694
"org.bouncycastle:bcpg-jdk18on"
9795
),
9896
BOUNCYCASTLE_BCPKIX(HIGHEST_VERSION,
99-
"org.bouncycastle:bcpkix",
10097
"org.bouncycastle:bcpkix-fips",
10198
"org.bouncycastle:bcpkix-jdk14",
10299
"org.bouncycastle:bcpkix-jdk15on",
103100
"org.bouncycastle:bcpkix-jdk15to18",
104101
"org.bouncycastle:bcpkix-jdk18on"
105102
),
106103
BOUNCYCASTLE_BCPROV(HIGHEST_VERSION,
107-
"org.bouncycastle:bcprov",
108104
"org.bouncycastle:bcprov-debug-jdk14",
109105
"org.bouncycastle:bcprov-debug-jdk15on",
110106
"org.bouncycastle:bcprov-debug-jdk15to18",
@@ -131,23 +127,20 @@ public enum CapabilityDefinition {
131127
"org.bouncycastle:bc-fips-debug"
132128
),
133129
BOUNCYCASTLE_BCTLS(HIGHEST_VERSION,
134-
"org.bouncycastle:bctls",
135130
"org.bouncycastle:bctls-jdk14",
136131
"org.bouncycastle:bctls-jdk15on",
137132
"org.bouncycastle:bctls-jdk15to18",
138133
"org.bouncycastle:bctls-jdk18on",
139134
"org.bouncycastle:bctls-fips"
140135
),
141136
BOUNCYCASTLE_BCTSP(HIGHEST_VERSION,
142-
"org.bouncycastle:bctsp",
143137
"org.bouncycastle:bctsp-jdk14",
144138
"org.bouncycastle:bctsp-jdk15",
145139
"org.bouncycastle:bctsp-jdk15+",
146140
"org.bouncycastle:bctsp-jdk15on",
147141
"org.bouncycastle:bctsp-jdk16"
148142
),
149143
BOUNCYCASTLE_BCUTIL(HIGHEST_VERSION,
150-
"org.bouncycastle:bcutil",
151144
"org.bouncycastle:bcutil-jdk14",
152145
"org.bouncycastle:bcutil-jdk15on",
153146
"org.bouncycastle:bcutil-jdk15to18",

0 commit comments

Comments
 (0)