chore: consolidate build configuration to parent#8637
chore: consolidate build configuration to parent#8637gcf-merge-on-green[bot] merged 8 commits intomainfrom
Conversation
Also, remove all uses of profiles outside of parent.
It's a good practice to declare the dependency if a project touches a class from it, without relying on transitive dependencies ("Undeclared but used"). Can you move the javax.annotation part to google-cloud-jar-parent? |
Since we flatten the poms, I guess it will be declared. Declaring and not using a dependency is also a bad practice. So, I'm torn on this one. |
Co-authored-by: Tomo Suzuki <suztomo@google.com>
That's correct, it will be declared anyway. However, skipping dependency declaration (for the flatten plugin's effect) means we can/should remove lots of other dependencies as well. The reasoning would become complex. For example, you had to reason "javax-annotation dependency is already present transitively through api-common". I don't want people spending time on such dependency analysis to decide whether a dependency should be declared. Therefore, I think we should reason about dependency declaration without considering the effect of the flatten plugin. |
| <jdk>[9,)</jdk> | ||
| </activation> | ||
| <dependencies> | ||
| <!-- needed for @Generated annotation at compile-time --> |
There was a problem hiding this comment.
Nice survey.
suztomo@suztomo2:~/google-cloud-java$ grep -ir 'import javax.annotation' . |grep -v Generated
./README.md:import javax.annotation.Nullable;
suztomo@suztomo2:~/google-cloud-java$
Moving this block from jar modules to jar-parent.
Removing this block from module parents. Since
dependencies.shis not run at all, it's not clear if these exclusions are still needed.Removing
javax.annotationdeclaration for Java 9+, since the dependency is already present transitively throughapi-common.