gax-java should put its dependencies on the compile classpath, not just the runtime classpath #1540
Comments
(GAX 2.6.0 declared every dependency as runtime scope. This was unexpected result from Gradle version upgrade.) That change #1535 is moving the "runtime" scope to "compile" scope for the classes in the API surface of GAX. It was released as 2.6.1. In general,
This follows Gradle's "API and implementation separation". In Google Cloud Java client libraries, we also use the compatible versions GAX, gRPC, protobuf, defined in https://github.com/googleapis/java-shared-dependencies. I might be missing the specific problem you're facing. Would you give me the URL of the project? |
Oh cool, I wasn't aware of https://github.com/googleapis/java-shared-dependencies. This solves my problem, ty! https://github.com/googleads/google-ads-java/ is our project if you're curious. |
(Sorry for confusion I thought you're part of googleapis organization.) https://github.com/googleapis/java-shared-dependencies is not intended to be used outside googleapis organization (at least for now). Doesn't GAX 2.6.1, which declares the API surface, resolve your problem? |
@nwbirnie If you still need a BOM, how about using the Libraries BOM? This includes GAX, gRPC, protobuf, etc. and intended to be used by outside Google Cloud organization (targeted for Cloud customers). |
Well maybe googleapis is actually suitable, since we publish our protos there and use the same GAPIC generators as everyone else? WDYT? |
@Neenu1995 You own this shared dependencies BOM. What do you think about https://github.com/googleads/google-ads-java/ using the shared dependencies BOM? |
As long as we do not have to add more dependencies to shared-dependencies you are welcome to use it. It is purely for version management and have a biweekly release cadence. |
Not an issue. Closing. |
A recent change removed most of the transitive dependencies from the compile time classpath in maven.
This means that downstream projects need to re-declare all the dependencies and keep these in sync with what GAX requires. This creates the risk that overtime our dependency sets diverge, leading to subtle bugs. As a downstream project I just want to bump the GAX version as required by the GAPIC generators and have that include all the transitive dependencies for me.
Before this change this was working. We used to depend on
com.google.api:gax-java
and that would pull in the the correct version of gRPC, protobuf etc. as needed by the generated code, and GAX itself.Now to get this to compile I need to copy the GAX dependencies to my project and make sure these are kept in sync.
Can we revert this change?
The text was updated successfully, but these errors were encountered: