Skip to content

Commit

Permalink
Changes for release v6.0. (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwbirnie authored Nov 12, 2020
1 parent 6391da8 commit 5d21ecd
Show file tree
Hide file tree
Showing 11,962 changed files with 1,632,954 additions and 3,132,352 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
10.0.0 - 2020-11-11
-------------------
- Added support and examples for Google Ads API v6.0.
- Updated logging to scrub personal information (email addresses) from logs.
- Ensure that GoogleAdsFailure is decoded for exceptions on server streaming
calls (#332).
- Fix FieldMasks util to return correct result for optional fields (#344).
- Removed reflection based catalog in favour of generated code.

9.0.0 - 2020-09-01
------------------
- Added support and examples for Google Ads API v5_0.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This project hosts the Java client library for the Google Ads API.
<dependency>
<groupId>com.google.api-ads</groupId>
<artifactId>google-ads</artifactId>
<version>9.0.0</version>
<version>10.0.0</version>
</dependency>

## Documentation
Expand Down
19 changes: 17 additions & 2 deletions google-ads-annotation-processing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>com.google.api-ads</groupId>
Expand All @@ -29,7 +31,8 @@
<version>9.0.1-SNAPSHOT</version>
<name>Google Ads API client library for Java annotation processor</name>
<description>
Handles code generation for with annotation processing for the client libraries for Java.
Handles code generation via annotation processing for the client
libraries for Java.
</description>

<build>
Expand Down Expand Up @@ -74,5 +77,17 @@
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.ads.googleads.annotations.api;
package com.google.ads.googleads.annotations.impl;

import static java.lang.Math.max;

import com.google.ads.googleads.annotations.impl.AbstractGoogleAdsClientCodeGenerator;
import com.google.ads.googleads.annotations.impl.GeneratedCatalogCodeGenerator;
import com.google.ads.googleads.annotations.impl.GoogleAdsAllVersionsCodeGenerator;
import com.google.ads.googleads.annotations.impl.VersionCatalogCodeGenerator;
import com.google.ads.googleads.annotations.api.VersionDescriptor;
import com.google.ads.googleads.annotations.impl.generators.AbstractGoogleAdsClientCodeGenerator;
import com.google.ads.googleads.annotations.impl.generators.CustomerUserAccessMessageProxyGenerator;
import com.google.ads.googleads.annotations.impl.generators.GeneratedCatalogCodeGenerator;
import com.google.ads.googleads.annotations.impl.generators.Generator;
import com.google.ads.googleads.annotations.impl.generators.GoogleAdsAllVersionsCodeGenerator;
import com.google.ads.googleads.annotations.impl.generators.SearchPagedResponseMessageProxyGenerator;
import com.google.ads.googleads.annotations.impl.generators.SearchStreamResponseMessageProxyGenerator;
import com.google.ads.googleads.annotations.impl.generators.VersionCatalogCodeGenerator;
import com.google.auto.service.AutoService;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.SortedSetMultimap;
import com.google.common.collect.TreeMultimap;
import java.util.Collection;
import java.util.Collections;
import java.util.Map.Entry;
import java.util.Set;
Expand Down Expand Up @@ -117,13 +124,9 @@ private boolean doProcess(RoundEnvironment roundEnv) {
int latestVersion = getLatestVersion(versions);

if (!versions.isEmpty()) {
GeneratedCatalogCodeGenerator.generate(
versions, latestVersion, catalogName, elementUtils, messager, filer);
VersionCatalogCodeGenerator.generate(versions, catalogName, messager, filer);
AbstractGoogleAdsClientCodeGenerator.generate(
versions, latestVersion, catalogName, messager, filer);
GoogleAdsAllVersionsCodeGenerator.generate(
versions, latestVersion, catalogName, messager, filer);
for (Generator generator : loadGenerators(catalogName, versions, latestVersion)) {
generator.generate();
}
}
}
hasWrittenFiles = true;
Expand All @@ -132,6 +135,22 @@ private boolean doProcess(RoundEnvironment roundEnv) {
return false;
}

/** Loads the generators to run. */
private Collection<Generator> loadGenerators(
String catalogName, Set<Integer> versions, int latestVersion) {
return ImmutableList.of(
new GeneratedCatalogCodeGenerator(
versions, latestVersion, catalogName, elementUtils, messager, filer),
new VersionCatalogCodeGenerator(versions, catalogName, messager, filer),
new AbstractGoogleAdsClientCodeGenerator(
versions, latestVersion, catalogName, messager, filer),
new GoogleAdsAllVersionsCodeGenerator(
versions, latestVersion, catalogName, messager, filer),
new SearchStreamResponseMessageProxyGenerator(versions, messager, filer),
new SearchPagedResponseMessageProxyGenerator(versions, messager, filer),
new CustomerUserAccessMessageProxyGenerator(versions, messager, filer));
}

/**
* Dynamically creates a SortedSetMultimap of the available versions of the Google Ads API, that
* is mapped by catalog name, by finding all of the unique catalogName (e.g. "v1" or "v1_v2") and
Expand Down
Loading

0 comments on commit 5d21ecd

Please sign in to comment.