gapic-generator-java icon indicating copy to clipboard operation
gapic-generator-java copied to clipboard

chore: generate poms with grpc dependencies as test scoped

Open diegomarquezp opened this issue 1 year ago • 2 comments

Fixes https://github.com/googleapis/google-cloud-java/issues/10037 ☕

Overview

This will modify the behavior of library generation at the postprocessing stage. The main change is that generated cloud poms (i.e. google-cloud-${service}/pom.xml) will now have the dependencies proto-google-common-protos and grpc-google-iam-v1 declared as <scope>test</scope>, except for three cases described below.

Integration test

It will be failing until we update the test branch. Once this approach is validated, I will proceed with updating the branch.

Approach

For new libraries

Via template in owlbot/teplates/poms/cloud_pom.xml.j2. New libraries will have these two dependencies declared as test scope if they are not one of java-spanner, java-bigtable or java-dataproc

For existing libraries

The script fix_poms.py will now modify the existing poms by setting the two dependencies as test-scoped, only if they are not one of java-spanner, java-bigtable or java-dataproc

Confirmation that it works

diegomarquezp avatar Jul 26 '24 13:07 diegomarquezp