Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contributing, please review the guidelines and best practices below.
* [Style Guidelines & Naming Conventions](#style-guidelines--naming-conventions)
* [Claiming Requests](#claiming-requests)
* [Testing](#testing)
* [Community Guidelines](#community-guidelines)
* [Community Guidelines](#community-guidelines)

## Providing Feedback

Expand All @@ -33,7 +33,7 @@ will help improve this library.

If you see that someone has already created an issue that describes your proposed feature request,
please upvote their idea to avoid duplicates and help our team prioritize feature requests.
Github provides a similar issues search as you create new issues, which can help in this
GitHub provides a similar issues search as you create new issues, which can help in this
effort. In addition, if you have commentary or can build upon someone else’s idea, feel free to
do so by adding a comment.

Expand Down Expand Up @@ -78,8 +78,8 @@ that you only submit pull requests that we will be able to use (we don’t want
time). We automatically generate the majority of our client library code from these
[protocol buffers](https://github.com/googleapis/googleapis/tree/master/google/ads/googleads)
that define the API. As a result, the names of certain methods and variables may be
created automatically. Generated code is generally located in folders with the name of a
version, such as v1 or v2. We will not be able to accept pull requests for open source
created automatically. Generated code is generally located in modules named after an API
version, such as `google-ads-stubs-v26`. We will not be able to accept pull requests for open source
improvements to the codebase related to generated code. Please share any feedback of this
nature by [creating an issue](#providing-feedback) as we may be able to make fixes
to the code generation process internally. We also welcome any pull requests related to
Expand All @@ -93,7 +93,7 @@ ensure they align with the existing roadmap and are able to be accepted.
When making a pull request, first make your own forked copy of this repository, make any changes
on a separate branch of that forked copy, then submit the pull request from your new fork/branch.
Consult
[GitHub Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
[GitHub Docs](https://docs.github.com/en/pull-requests/reference/pull-requests)
for more information on using pull requests.

All submissions, including submissions by project members, require review. Upon receiving your
Expand All @@ -106,7 +106,7 @@ that you address feedback in a timely manner so that we can merge your changes i
Please conform your submitted code to Google’s official
[style guide for Java](https://google.github.io/styleguide/javaguide.html).
You can use this [style guide converter](https://github.com/google/google-java-format) to easily
reformat your code to to comply with Google Style. In addition, please leave comments in your code
reformat your code to comply with Google Style. In addition, please leave comments in your code
in a manner consistent with other code in this repository.

### Claiming Requests
Expand Down
55 changes: 46 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,61 @@ This project hosts the Java client library for the Google Ads API.
## Requirements

* Java 1.8+
* Maven 3.0+
* Maven 3.0+ or Gradle 5.0+

## Maven artifacts
## Bill of Materials (BOM)

Use the [Google Ads API Bill of Materials (BOM)](https://developers.google.com/google-ads/api/docs/client-libs/java/bill-of-materials) to manage dependency versions and avoid conflicts with shared transitive dependencies such as Guava, Protobuf, GAX, and gRPC.

Maven (`pom.xml`):

```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.api-ads</groupId>
<artifactId>google-ads</artifactId>
<artifactId>google-ads-bom</artifactId>
<version>48.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.google.api-ads</groupId>
<artifactId>google-ads</artifactId>
</dependency>
</dependencies>
```

Gradle (`build.gradle`):

```groovy
implementation platform('com.google.api-ads:google-ads-bom:48.2.0')
implementation 'com.google.api-ads:google-ads'
```

## Maven artifacts

```xml
<dependency>
<groupId>com.google.api-ads</groupId>
<artifactId>google-ads</artifactId>
<version>48.2.0</version>
</dependency>
```

## Gradle dependency

implementation 'com.google.api-ads:google-ads:48.2.0'
```groovy
implementation 'com.google.api-ads:google-ads:48.2.0'
```

## Documentation

Our documentation is available [here](https://developers.google.com/google-ads/api/docs/client-libs/java).
See the [Google Ads API client library for Java documentation](https://developers.google.com/google-ads/api/docs/client-libs/java).

## Miscellaneous

Expand All @@ -39,9 +77,9 @@ Our documentation is available [here](https://developers.google.com/google-ads/a

- https://github.com/googleads/google-ads-java/issues

### API Documentation:
### API documentation

- https://developers.google.com/google-ads/api/docs
- https://developers.google.com/google-ads/api

### Support

Expand All @@ -50,6 +88,5 @@ Our documentation is available [here](https://developers.google.com/google-ads/a
### Authors

- [Josh Radcliff](https://github.com/jradcliff)
- [Nick Birnie](https://github.com/nwbirnie)
- [Devin Chasanoff](https://github.com/devchas)
- [Natalie Ng](https://github.com/ngnatng)
- [Sarah Botwinick Pollack](https://github.com/sarahcaseybot)
16 changes: 8 additions & 8 deletions ads.properties.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# Defines configuration for Google Ads API client library for Java.
#
# See our developer documentation for more details:
# https://developers.google.com/google-ads/api/docs/client-libs/java/quick-start
# https://developers.google.com/google-ads/api/docs/client-libs/java/basic-usage
#
# - By default this is searched for in ~/ads.properties.
# e.g. GoogleAdsClient.newBuilder().fromPropertiesFile()
#
# - Can load from an arbitrary path.
# e.g. GoogleAdsClient.newBuilder().fromPropertiesFile("some/path")
# e.g. GoogleAdsClient.newBuilder().fromPropertiesFile(new File("some/path"))
#
# - All settings in this file can be set & overridden programmatically.
# e.g. GoogleAdsClient.newBuilder()
Expand All @@ -27,7 +27,7 @@
# Specifies the client ID that is used for Google's OAuth 2 API.
#
# - Must use the same client ID which originally generated the refresh token.
# - Created and managed via http://console.developers.google.com
# - Created and managed via https://console.cloud.google.com
# - Doesn't grant access to any specific ad account.
#api.googleads.clientId=

Expand All @@ -36,15 +36,15 @@
# Specifies the client secret that is used for Google's OAuth 2 API.
#
# - Must be the secret associated with the OAuth clientId.
# - Created and managed via http://console.developers.google.com.
# - Created and managed via https://console.cloud.google.com.
#api.googleads.clientSecret=

# OAuth refresh token
#
# Credential which authorizes access to a Google account.
#
# - See guide for instructions on how to obtain a refresh token.
# https://developers.google.com/google-ads/api/docs/oauth/client-library
# https://developers.google.com/google-ads/api/docs/oauth/single-user-authentication
# - Provides access to all Google Ads accounts on which the associated Google
# account is a user.
# - Ad account is specified by the customerId in each request.
Expand All @@ -58,7 +58,7 @@
# credentials.
# - If false or not specified, the library will use the OAuth credentials
# specified above.
# - See https://developers.google.com/identity/protocols/application-default-credentials
# - See https://cloud.google.com/docs/authentication/application-default-credentials
# for more information on how to configure ADC.
#
#api.googleads.useApplicationDefaultCredentials=false
Expand All @@ -72,7 +72,7 @@
# - Must be specified if your access to an ad account is via a manager account.
# - May be specified in all requests if your Google user has direct access to
# the ad account.
# - Ad account access can be managed via http://ads.google.com and navigating
# to Tools & Settings -> Account Access
# - Ad account access can be managed via https://ads.google.com and navigating
# to Admin > Access and security
#api.googleads.loginCustomerId=

Original file line number Diff line number Diff line change
Expand Up @@ -161,30 +161,23 @@ ext.configurePom = { publication, nameToSet, descriptionToSet ->
}
developers {
developer {
id = 'josh'
id = 'jradcliff'
name = 'Josh Radcliff'
email = 'jradcliff@users.noreply.github.com'
organization = 'Google'
organizationUrl = 'https://www.google.com'
}
developer {
id = 'nick'
name = 'Nick Birnie'
email = 'nwbirnie@users.noreply.github.com'
id = 'ngnatng'
name = 'Natalie Ng'
email = 'ngnatng@users.noreply.github.com'
organization = 'Google'
organizationUrl = 'https://www.google.com'
}
developer {
id = 'devin'
name = 'Devin Chasanoff'
email = 'devchas@users.noreply.github.com'
organization = 'Google'
organizationUrl = 'https://www.google.com'
}
developer {
id = 'sarah'
id = 'sarahcaseybot'
name = 'Sarah Pollack'
email = 'sarahbot@users.noreply.github.com'
email = 'sarahcaseybot@users.noreply.github.com'
organization = 'Google'
organizationUrl = 'https://www.google.com'
}
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/src/main/groovy/com.google.api-ads.release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ tasks.register('updateReadme') {
}
String text = readmeFile.text

// Replace version in Maven dependency snippet
// Replace version in Maven dependency snippets (google-ads and google-ads-bom)
text = text.replaceAll(
/(?s)(<groupId>com\.google\.api-ads<\/groupId>\s*<artifactId>google-ads<\/artifactId>\s*<version>)[^<]+(<\/version>)/,
/(?s)(<groupId>com\.google\.api-ads<\/groupId>\s*<artifactId>google-ads(?:-bom)?<\/artifactId>\s*<version>)[^<]+(<\/version>)/,
"\$1${versionToSet}\$2"
)

// Replace version in Gradle dependency snippet
// Replace version in Gradle dependency snippets (google-ads and google-ads-bom)
text = text.replaceAll(
/(implementation\s+['"]com\.google\.api-ads:google-ads:)[^'"]+(['"])/,
/(implementation\s+(?:platform\(\s*)?['"]com\.google\.api-ads:google-ads(?:-bom)?:)[^'"]+(['"]\s*\)?)/,
"\$1${versionToSet}\$2"
)

Expand Down
8 changes: 6 additions & 2 deletions google-ads-bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* transitive dependencies are using compatible versions.
*
* To use this BOM, add the following to the dependencyManagement section of your
* pom.xml file and replace REPLACE_WITH_CURRENT-VERSION with the current
* pom.xml file and replace REPLACE-WITH-CURRENT-VERSION with the current
* version of google-ads-bom:
*
* <dependencyManagement>
Expand Down Expand Up @@ -86,7 +86,7 @@ jreleaser {
documentation = 'https://developers.google.com/google-ads/api/docs/client-libs/java'
}
license = 'Apache-2.0'
authors = ['Josh Radcliff', 'Sarah Botwinick Pollack']
authors = ['Josh Radcliff', 'Natalie Ng', 'Sarah Botwinick Pollack']
}
signing {
active = 'ALWAYS'
Expand Down Expand Up @@ -165,6 +165,10 @@ publishing {
name = 'Josh Radcliff'
url = 'https://github.com/jradcliff'
}
developer {
name = 'Natalie Ng'
url = 'https://github.com/ngnatng'
}
developer {
name = 'Sarah Botwinick Pollack'
url = 'https://github.com/sarahcaseybot'
Expand Down
2 changes: 1 addition & 1 deletion google-ads-codegen/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ publishing {
maven(MavenPublication) { publication ->
configurePom(publication,
"Google Ads API client library for Java - codegen",
"Generated code (stus) and generators for library")
"Generated code (stubs) and generators for library")
}
}
}
2 changes: 1 addition & 1 deletion google-ads-shadowjar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ publishing {
publications {
maven(MavenPublication) { publication ->
configurePom(publication,
"Google Ads API client library for java - shadow jar",
"Google Ads API client library for Java - shadow jar",
"Provides a jar with all dependencies")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ public Builder fromEnvironment() {

/**
* Retrieves the headers to be provided in requests, generated from properties set on the
* builder, e.g. endpoint and developer token.
* builder, such as login customer ID and linked customer ID.
*/
ImmutableMap<String, String> getHeaders() {
return GoogleAdsHeaderProvider.newBuilder()
Expand Down