Closed curtisullerich closed 2 years ago
A friend found the answer. This ended up being all it took to make it work:
tasks.named("shadowJar", ShadowJar::class) {
mergeServiceFiles()
}
I wasn't familiar with this aspect of jar files before. I wonder if shadowJar could show a warning when service files are getting omitted/clobbered during the jar building process?
Please check the User Guide before submitting "how do I do 'x'?" questions!
Shadow Version
7.1.2
Gradle Version
7.4.2
Expected Behavior
A simple gRPC client is able to issue an RPC when run with both
./gradlew run
and./gradlew runShadow
Actual Behavior
with
runShadow
, the RPC attempt fails with this exception:Gradle Build Script(s)
Content of Shadow JAR (
jar tf <jar file>
- post link to GIST if too long)https://gist.github.com/curtisullerich/ddc07cf6869135c50b5fc20ef1f272d4
I uploaded a sample project here that exhibits the behavior: https://github.com/curtisullerich/shadow-grpc