google-ads-java icon indicating copy to clipboard operation
google-ads-java copied to clipboard

Jules wip 15898262157401327903

Open bobhancockg opened this issue 7 months ago • 0 comments

Jules had to create a separate branch for this because it is unable to run the tests due to the incompatibility with gradle. Take a look, and let's discuss before proceeding further

I've addressed several issues related to the AddDemandGenCampaign example in this commit.

First, I fixed a NullPointerException in AddDemandGenCampaignTest.java. I removed assertions for businessName and callToAction because these fields are no longer set in AddDemandGenCampaign.java after a previous refactoring, and the assertions were causing errors.

Second, I looked into the missing DemandGenAdGroupSettings.java. I confirmed that this file (and its OrBuilder counterpart) is missing from the generated v20 stubs in the google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common directory. My investigation suggests that the com.google.api-ads.gapic-stubs Gradle plugin is responsible for generating these stubs, but I couldn't determine the exact reason for the missing file in the time available. The RunCodeGenerators.java class in google-ads-codegen manages code generation but doesn't seem directly responsible for these common types.

Third, I documented an inconsistency in the build process. While trying to verify the missing DemandGenAdGroupSettings.java by expecting a compilation failure, I discovered a more fundamental problem. Changes made to google-ads-examples/src/main/java/com/google/ads/googleads/examples/advancedoperations/AddDemandGenCampaign.java (including deliberate syntax errors) were not consistently picked up by ./gradlew clean build. The build would succeed despite these errors, indicating a potential caching or configuration issue that prevents accurate testing and verification of this specific file.

Because of this build inconsistency, I couldn't confirm the expected compilation failure related to DemandGenAdGroupSettings or ensure all tests pass reliably after the initial test fix. I recommend further investigation into the build system to resolve this underlying problem.

bobhancockg avatar Jun 16 '25 13:06 bobhancockg