Question on compile vs runtime versions. I have an...
# gradle
s
Question on compile vs runtime versions. I have an app that has a transitive dependency that shows up on the compile classpath
grpc 1.17
. I depend on another library that uses
implementation grpc 1.32
. So on the runtime classpath it correctly resolves to
|    |         +--- io.grpc:grpc-netty:1.17.1 -> 1.32.2 (*)
. The problem is when you actually run the application you get a noclassdef found error for something that exists in
1.32
. A hack to fix this is for the app to depend on
1.32
itself but I'm trying to understand why this is a problem. The runtime classpath is resolving how I expect it to. Are the compile classpath versions strictly preferred or something?
v
No, at runtime the runtime class path should be used. How do your run the program?
s
I'm not able to reproduce the problem. Thanks for the clarification though - that is what I expected to be used as well.