Repository: GradleUp/shadow (kotlin)

Issue:
dependency filtering doesn't default empty artifact field to wildcard
### Expected and Results

I was trying to build an IntelliJ plugin, and wanted to automatically relocate all dependencies (using `enableRelocation = true`) so I don't have to explicitly specify them all. This ended up relocating kotlin stdlib (`org.jetbrains.kotlin:kotlin-stdlib:1.9.25`), which caused issues as function signatures didn't match what IntelliJ was expecting. I tried to just exclude all of `org.jetbrains.` with the following config:
```
tasks {
    shadowJar {
        enableRelocation = true
        dependencies {
            exclude(dependency("org\\.jetbrains\\..*::"))
        }
    }
}
```
[The documentation](https://gradleup.com/shadow/configuration/dependencies/) states:

> Any of the individual fields can be safely absent and will function as though a wildcard was specified.

This does not appear to be true. The dependency was still being relocated until I specified `"org\\.jetbrains\\..*:.*:"` instead.

### Related environment and versions

shadow version 9.0.0-rc1
intellij platform 2.5.0

### Reproduction steps

1. Try to build an IntelliJ plugin with `enableRelocation = true`
2. Try to exclude dependency `org.jetbrains..*::`

### Anything else?

_No response_

Pull request description:
Closes #1510.

Patch:
diff --git a/docs/configuration/dependencies/README.md b/docs/configuration/dependencies/README.md
index d9ccc254a..c807de2df 100644
--- a/docs/configuration/dependencies/README.md
+++ b/docs/configuration/dependencies/README.md
@@ -229,7 +229,14 @@ Any of the individual fields can be safely absent and will function as though a
 
 The above code snippet is functionally equivalent to the previous example.
 
-This same pattern can be used for any of the dependency notation fields.
+This same pattern can be used for any of the dependency notation fields. e.g.
+
+- `org.apache.logging.log4j:.*`
+- `org.apache.logging.log4j:log4j.*`
+- `org.apache.logging.log4j:log4j-core:.*`
+- `org.apache.logging.*:log4j-core:.*`
+- `.*:log4j-core:.*`
+- ...
 
 === "Kotlin"
 


Test patch:
diff --git a/src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt b/src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt
index 1ddd065a8..0dc2a2e31 100644
--- a/src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt
+++ b/src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/FilteringTest.kt
@@ -8,6 +8,7 @@ import org.junit.jupiter.api.BeforeAll
 import org.junit.jupiter.api.BeforeEach
 import org.junit.jupiter.api.Test
 import org.junit.jupiter.params.ParameterizedTest
+import org.junit.jupiter.params.provider.MethodSource
 import org.junit.jupiter.params.provider.ValueSource
 
 class FilteringTest : BasePluginTest() {
@@ -73,8 +74,9 @@ class FilteringTest : BasePluginTest() {
     commonAssertions()
   }
 
-  @Test
-  fun excludeDependencyUsingWildcardSyntax() {
+  @ParameterizedTest
+  @MethodSource("wildcardDepProvider")
+  fun excludeDependencyUsingWildcardSyntax(wildcard: String) {
     projectScriptPath.appendText(
       """
         dependencies {
@@ -82,7 +84,7 @@ class FilteringTest : BasePluginTest() {
         }
         $shadowJar {
           dependencies {
-            exclude(dependency('my:d:.*'))
+            exclude(dependency('$wildcard'))
           }
         }
       """.trimIndent(),
@@ -240,4 +242,16 @@ class FilteringTest : BasePluginTest() {
       )
     }
   }
+
+  private companion object {
+    @JvmStatic
+    fun wildcardDepProvider() = listOf(
+      "my:d",
+      "m.*:d",
+      "my:d:.*",
+      "m.*:d:.*",
+      "m.*:d.*:.*",
+      ".*:d:.*",
+    )
+  }
 }