GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Expose static methods to get the default project ID and credentials by mziccard · Pull Request #1241 · googleapis/google-cloud-java

Conversation

@mziccard

@mziccard mziccard commented Sep 12, 2016

Copy link
Copy Markdown
Contributor

This fixes #1207

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mziccard
Expose static methods to get the default project ID and credentials
325d4cd
@mziccard mziccard added the api: core label Sep 12, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 12, 2016
@coveralls

coveralls commented Sep 12, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.009%) to 85.053% when pulling 325d4cd on mziccard:expose-default into 4d5a86c on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lukecwik
lukecwik reviewed Sep 23, 2016
View reviewed changes
Comment thread google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java
* be found. This method returns the first available credentials among the following sources:
* <ol>
* <li>App Engine credentials
* <li>JSON credentials pointed to by the {@code GOOGLE_APPLICATION_CREDENTIALS} environment

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java
* Returns the default project ID, or {@code null} if no default project ID could be found. This
* method returns the first available project ID among the following sources:
* <ol>
* <li>App Engine project ID

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mziccard mziccard added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 26, 2016
@mziccard

mziccard commented Sep 26, 2016

Copy link
Copy Markdown
Contributor Author

@lukecwik thanks for the feedback. I am putting this on hold as we are right now working on a better integration with https://github.com/google/google-auth-library-java/ that will eventually lead to us dropping our AuthCredentials classes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lukecwik

lukecwik commented Sep 26, 2016

Copy link
Copy Markdown

Does the same apply to the other google cloud languages?
I'm mainly interested in python as well but consistency of features across languages would be convenient.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mziccard

mziccard commented Sep 26, 2016

Copy link
Copy Markdown
Contributor Author

Not 100% sure what python guys are doing. Also, the availability of libraries and tools across different platforms/languages is far from uniform, this makes the comparison hard if at all useful.

I believe that google-cloud-python is using credentials classes (GoogleCredentials) from https://github.com/google/oauth2client and they possibly provide some more utility functions (see https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/core/google/cloud/credentials.py).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lukecwik

lukecwik commented Oct 7, 2016

Copy link
Copy Markdown

Any updates?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mziccard

mziccard commented Oct 7, 2016

Copy link
Copy Markdown
Contributor Author

@lukecwik We are working on getting the features we need in google-auth-library-java, see this PR for instance. ETA is end of the month.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lukecwik

lukecwik commented Oct 7, 2016

Copy link
Copy Markdown

Thanks for the update.

On Fri, Oct 7, 2016 at 11:12 AM, Marco Ziccardi [email protected]
wrote:

@lukecwik https://github.com/lukecwik We are working on getting the
features we need in google-auth-library-java, see this PR
googleapis/google-auth-library-java#69 for
instance. ETA is end of the month.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1241 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJnK7AjOBQnwXFsKh9sQtPJUNe6W5eu8ks5qxotxgaJpZM4J6qNv
.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lukecwik

lukecwik commented Nov 7, 2016

Copy link
Copy Markdown

Update?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mziccard

mziccard commented Nov 7, 2016

Copy link
Copy Markdown
Contributor Author

PR to switch to google-auth-library-java is at #1375, review is pending. You can start using GoogleCredentials.getApplicationDefault() by depending on google-auth-library-java 0.6.0. Once that is done I will then expose a static method for project discovery.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lukecwik

lukecwik commented Nov 7, 2016

Copy link
Copy Markdown

Swapped to use google-auth-library-java 0.6.0 GoogleCredentials.getApplicationDefault in apache/beam#1294

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mziccard mziccard mentioned this pull request Nov 9, 2016
Expose static method to get default project ID #1380
Merged
@mziccard

mziccard commented Nov 9, 2016

Copy link
Copy Markdown
Contributor Author

This was replaced by #1380

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mziccard mziccard closed this Nov 9, 2016
github-actions Bot pushed a commit that referenced this pull request Jun 23, 2022
@renovate-bot
deps: update dependency com.google.cloud:google-cloud-shared-dependen…
2ebe221
…cies to v2.13.0 (#1241)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.12.0` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/compatibility-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/confidence-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/java-shared-dependencies</summary>

### [`v2.13.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#&#8203;2130-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2120v2130-2022-06-22)

[Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.12.0...v2.13.0)

##### Dependencies

-   update dependency com.google.api-client:google-api-client-bom to v1.35.0 ([#&#8203;709](https://togithub.com/googleapis/java-shared-dependencies/issues/709)) ([239f8c3](https://togithub.com/googleapis/java-shared-dependencies/commit/239f8c33a11e233e6af79aee8c7e68cd156a0554))
-   update dependency com.google.api-client:google-api-client-bom to v1.35.1 ([#&#8203;713](https://togithub.com/googleapis/java-shared-dependencies/issues/713)) ([6559b45](https://togithub.com/googleapis/java-shared-dependencies/commit/6559b45b027dba783a9525d35e32183d78773cbe))
-   update dependency com.google.api:api-common to v2.2.1 ([#&#8203;710](https://togithub.com/googleapis/java-shared-dependencies/issues/710)) ([650d4c5](https://togithub.com/googleapis/java-shared-dependencies/commit/650d4c5f8c3cfce711257d47280ad773cd2e2414))
-   update dependency com.google.errorprone:error_prone_annotations to v2.14.0 ([#&#8203;701](https://togithub.com/googleapis/java-shared-dependencies/issues/701)) ([d24730f](https://togithub.com/googleapis/java-shared-dependencies/commit/d24730f78669f80b109e590b903446e5552e3e36))
-   update dependency com.google.http-client:google-http-client-bom to v1.42.0 ([#&#8203;711](https://togithub.com/googleapis/java-shared-dependencies/issues/711)) ([5168a18](https://togithub.com/googleapis/java-shared-dependencies/commit/5168a181722128d434a0d0d2ab5cc485686bbc78))
-   update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.0 ([#&#8203;708](https://togithub.com/googleapis/java-shared-dependencies/issues/708)) ([620336e](https://togithub.com/googleapis/java-shared-dependencies/commit/620336e6733e2017116e5e8a7b403b183a728bc1))
-   update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.1 ([#&#8203;712](https://togithub.com/googleapis/java-shared-dependencies/issues/712)) ([a2c18a5](https://togithub.com/googleapis/java-shared-dependencies/commit/a2c18a5bc4152cc9034cec691a29f54a35c38a51))
-   update dependency com.google.protobuf:protobuf-bom to v3.21.0 ([#&#8203;703](https://togithub.com/googleapis/java-shared-dependencies/issues/703)) ([5f9fe12](https://togithub.com/googleapis/java-shared-dependencies/commit/5f9fe1200b4bdf4c54bf947c21bd3ed02f26f990))
-   update dependency com.google.protobuf:protobuf-bom to v3.21.1 ([#&#8203;705](https://togithub.com/googleapis/java-shared-dependencies/issues/705)) ([c68edfb](https://togithub.com/googleapis/java-shared-dependencies/commit/c68edfbe7e1993e1112640b867b29aa2fbcf7579))
-   update dependency io.grpc:grpc-bom to v1.47.0 ([#&#8203;707](https://togithub.com/googleapis/java-shared-dependencies/issues/707)) ([d02918a](https://togithub.com/googleapis/java-shared-dependencies/commit/d02918a0418cd65d1d247f27afb0637f1f8f5666))
-   update dependency org.checkerframework:checker-qual to v3.22.1 ([#&#8203;706](https://togithub.com/googleapis/java-shared-dependencies/issues/706)) ([545843b](https://togithub.com/googleapis/java-shared-dependencies/commit/545843b492cead230b8cc72a1dae7d4922f33b39))
-   update dependency org.checkerframework:checker-qual to v3.22.2 ([#&#8203;717](https://togithub.com/googleapis/java-shared-dependencies/issues/717)) ([142852a](https://togithub.com/googleapis/java-shared-dependencies/commit/142852a37140f221197f5c71aed451def353b1e0))
-   update gax.version to v2.18.2 ([#&#8203;718](https://togithub.com/googleapis/java-shared-dependencies/issues/718)) ([5f8156e](https://togithub.com/googleapis/java-shared-dependencies/commit/5f8156e55c6a07b018a8c5efafa68be781b4288b))
-   update google.common-protos.version to v2.9.0 ([#&#8203;714](https://togithub.com/googleapis/java-shared-dependencies/issues/714)) ([9e5591e](https://togithub.com/googleapis/java-shared-dependencies/commit/9e5591ec3035350450ecbfebd00e08216433b06c))
-   update google.core.version to v2.8.0 ([#&#8203;719](https://togithub.com/googleapis/java-shared-dependencies/issues/719)) ([4023c60](https://togithub.com/googleapis/java-shared-dependencies/commit/4023c6063a2c5b5308da531df1a08c90c491965d))
-   update iam.version to v1.4.0 ([#&#8203;700](https://togithub.com/googleapis/java-shared-dependencies/issues/700)) ([c1097a4](https://togithub.com/googleapis/java-shared-dependencies/commit/c1097a46ab0739b0b7234bc510e4c3d9ce2c2861))
-   update iam.version to v1.4.1 ([#&#8203;716](https://togithub.com/googleapis/java-shared-dependencies/issues/716)) ([e2dc7c2](https://togithub.com/googleapis/java-shared-dependencies/commit/e2dc7c21c39e007878841e2664d548ec44a72d54))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-asset).
github-actions Bot pushed a commit to suztomo/google-cloud-java that referenced this pull request Jul 1, 2022
@release-please
chore(main): release 3.4.0 (googleapis#1232)
856ea8c
🤖 I have created a release *beep* *boop*
---


## [3.4.0](googleapis/java-asset@v3.3.1...v3.4.0) (2022-06-30)


### Features

* Enable REST transport for most of Java and Go clients ([googleapis#1242](googleapis/java-asset#1242)) ([86eb248](googleapis/java-asset@86eb248))


### Bug Fixes

* update gapic-generator-java with mock service generation fixes ([googleapis#1249](googleapis/java-asset#1249)) ([7d124ad](googleapis/java-asset@7d124ad))


### Dependencies

* update dependency com.google.api.grpc:proto-google-cloud-orgpolicy-v1 to v2.2.1 ([googleapis#1245](googleapis/java-asset#1245)) ([9b0d4e9](googleapis/java-asset@9b0d4e9))
* update dependency com.google.api.grpc:proto-google-cloud-pubsub-v1 to v1.101.0 ([googleapis#1228](googleapis/java-asset#1228)) ([c5f1712](googleapis/java-asset@c5f1712))
* update dependency com.google.api.grpc:proto-google-cloud-pubsub-v1 to v1.101.1 ([googleapis#1233](googleapis/java-asset#1233)) ([42031ef](googleapis/java-asset@42031ef))
* update dependency com.google.api.grpc:proto-google-identity-accesscontextmanager-v1 to v1.3.1 ([googleapis#1246](googleapis/java-asset#1246)) ([d868803](googleapis/java-asset@d868803))
* update dependency com.google.cloud:google-cloud-bigquery to v2.13.1 ([googleapis#1227](googleapis/java-asset#1227)) ([113c52f](googleapis/java-asset@113c52f))
* update dependency com.google.cloud:google-cloud-bigquery to v2.13.3 ([googleapis#1234](googleapis/java-asset#1234)) ([7006c44](googleapis/java-asset@7006c44))
* update dependency com.google.cloud:google-cloud-bigquery to v2.13.4 ([googleapis#1239](googleapis/java-asset#1239)) ([9c59632](googleapis/java-asset@9c59632))
* update dependency com.google.cloud:google-cloud-bigquery to v2.13.6 ([googleapis#1244](googleapis/java-asset#1244)) ([a305745](googleapis/java-asset@a305745))
* update dependency com.google.cloud:google-cloud-core to v2.8.0 ([googleapis#1238](googleapis/java-asset#1238)) ([8224b02](googleapis/java-asset@8224b02))
* update dependency com.google.cloud:google-cloud-resourcemanager to v1.4.0 ([googleapis#1230](googleapis/java-asset#1230)) ([5655582](googleapis/java-asset@5655582))
* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([googleapis#1241](googleapis/java-asset#1241)) ([2ebe221](googleapis/java-asset@2ebe221))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions Bot pushed a commit that referenced this pull request Sep 15, 2022
@release-please
chore(main): release 2.3.9 (#1241)
c7fe8ff
🤖 I have created a release *beep* *boop*
---


## [2.3.9](googleapis/java-automl@v2.3.8...v2.3.9) (2022-09-13)


### Dependencies

* Update dependency com.google.cloud:google-cloud-bigquery to v2.16.0 ([#1240](googleapis/java-automl#1240)) ([1dc7d55](googleapis/java-automl@1dc7d55))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
meltsufin pushed a commit that referenced this pull request Dec 22, 2025
@renovate-bot @gcf-owl-bot
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
8d5fc7f
…3.0 (#1241)

* chore(deps): update dependency com.google.cloud:libraries-bom to v26.3.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
chingor13 pushed a commit that referenced this pull request Jan 6, 2026
@renovate-bot @gcf-owl-bot
chore(deps): update dependency com.google.cloud:google-cloud-logging-…
7ddb951
…logback to v0.130.29-alpha (#1241)

* chore(deps): update dependency com.google.cloud:google-cloud-logging-logback to v0.130.29-alpha

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 11, 2026
@renovate-bot @gcf-owl-bot
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
bcbc2a6
…3.0 (googleapis#1241)

* chore(deps): update dependency com.google.cloud:libraries-bom to v26.3.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
@renovate-bot
build(deps): update dependency org.apache.maven.plugins:maven-project…
d57fbdb
…-info-reports-plugin to v3.4.4 (googleapis#1241)
suztomo pushed a commit that referenced this pull request Mar 30, 2026
@release-please
chore(main): release 0.127.2 (#1241)
1428a7b
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
lqiu96 pushed a commit that referenced this pull request Apr 1, 2026
@release-please
chore(main): release 0.127.2 (#1241)
b5b7366
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
@renovate-bot @gcf-owl-bot
chore(deps): update dependency com.google.cloud:google-cloud-pubsub t…
9661d0c
…o v1.120.11 (#1241)

* chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.120.11

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
meltsufin pushed a commit that referenced this pull request May 1, 2026
@renovate-bot @gcf-owl-bot
chore(deps): update dependency com.google.cloud:google-cloud-pubsub t…
0533fd9
…o v1.120.11 (#1241)

* chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.120.11

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@lukecwik lukecwik lukecwik left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: core cla: yes This human has signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Google Cloud Dataflow/Apache Beam and gcloud-java-core

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mziccard @coveralls @lukecwik @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.