#Adding *.jar dependency to shadowjar
1 messages ยท Page 1 of 1 (latest)
Here is an AI assisted attempt to answer your question ๐ค. Maybe it helps! In any case, a human is on the way ๐. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
To add a filetree dependency to your shadowJar, you can use the "from" method along with the "fileTree" method. Here is an example code snippet:
shadowJar {
from(fileTree("path/to/dependency/directory"))
}
Replace "path/to/dependency/directory" with the actual path to the directory containing the dependency JAR files. This will include all JAR files in that directory as dependencies in your shadowJar.
Alternatively, if you want to include specific JAR files, you can specify them like this:
shadowJar {
from(fileTree("path/to/dependency/directory") {
include("**/*.jar")
})
}
This will only include JAR files in the specified directory that match the "*.jar" pattern.
After adding the filetree dependency to your shadowJar configuration, you can compile your project and generate a shadowJar file with all the necessary dependencies included.
Feel free to ask if you have any further questions or issues!