I figured something out. I am able to generate a build artifact that works now.
My original question has not been answered pertaining to including local jar files in the shadowJar includes with the include statements.
These are the change that I had to make. Basically since I was using the local jar as a compileOnly dependency, it could not be added to the build artifact. So I excluded that jar from the “others” and made it a normal compile and then it’s classes appeared in the build artifact.
dependencies {
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'com.google.code.gson:gson:2.8.6'
compileOnly fileTree(dir: 'lib', include: ['*.jar'], exclude: ['FunctionalAPI-7.4.3.jar'])
compile fileTree(dir: 'lib', include: ['FunctionalAPI-7.4.3.jar'])
}
shadowJar {
dependencies {
include(dependency('org.apache.commons:commons-lang3:3.9'))
include(dependency('com.google.code.gson:gson:2.8.6'))
}
}
build.dependsOn(shadowJar)