Skip to content

Make project.properties path independent per API#1863

Merged
shinfan merged 10 commits intogoogleapis:masterfrom
shinfan:master
Apr 12, 2017
Merged

Make project.properties path independent per API#1863
shinfan merged 10 commits intogoogleapis:masterfrom
shinfan:master

Conversation

@shinfan
Copy link
Copy Markdown
Contributor

@shinfan shinfan commented Apr 5, 2017

  • Previously we generate all project.properties files into root which is
    incorrect
  • Now the caller API client needs to pass in package path to retrieve the
    corresponding version
  • Create project.properties for Veneer-only clients as well

The new properties file will be stored at:
{ROOT}/com/google/cloud/{api}/project.properties

Follow-up: Update Gapic clients

- Previously we generate all project.properties files into root which is
incorrect
- Now the caller API client needs to pass in artifact ID to retrieve the
corresponding version
- Create project.properties for Veneer-only clients as well
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 5, 2017
@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling b72db11 on shinfan:master into ** on GoogleCloudPlatform:master**.

}
String projectPropertiesPath = PROPERTIES_ROOT
+ artifactId + "/"
+ PROPERTIES_FILE;

This comment was marked as spam.

public static String getLibraryVersion(String artifactId) {
String version = getPomVersion(artifactId);
if (version == null) {
version = getManifestVersion();

This comment was marked as spam.

*/
public HttpRequestInitializer getHttpRequestInitializer(ServiceOptions<?, ?> serviceOptions) {
public HttpRequestInitializer getHttpRequestInitializer(
ServiceOptions<?, ?> serviceOptions, final String artifactId) {

This comment was marked as spam.

Attributes manifestAttributes = manifest.getMainAttributes();
String artifactId = manifestAttributes.getValue(MANIFEST_ARTIFACT_ID_KEY);
if (artifactId != null && artifactId.equals(ARTIFACT_ID)) {
String currentArtifactId = manifestAttributes.getValue(MANIFEST_ARTIFACT_ID_KEY);

This comment was marked as spam.

This comment was marked as spam.

import com.google.api.gax.grpc.UnaryCallable;
import com.google.cloud.logging.spi.v2.PagedResponseWrappers.ListLogEntriesPagedResponse;
import com.google.cloud.logging.spi.v2.PagedResponseWrappers.ListLogsPagedResponse;
import com.google.cloud.logging.spi.v2.PagedResponseWrappers.ListMonitoredResourceDescriptorsPagedResponse;

This comment was marked as spam.

This comment was marked as spam.

HttpTransport transport = transportOptions.getHttpTransportFactory().create();
HttpRequestInitializer initializer = transportOptions.getHttpRequestInitializer(options);
HttpRequestInitializer initializer =
transportOptions.getHttpRequestInitializer(options);

This comment was marked as spam.

This comment was marked as spam.

public static ChannelProvider setUpChannelProvider(
InstantiatingChannelProvider.Builder providerBuilder, ServiceOptions<?, ?> serviceOptions) {
InstantiatingChannelProvider.Builder providerBuilder,
ServiceOptions<?, ?> serviceOptions) {

This comment was marked as spam.

This comment was marked as spam.

Comment thread google-cloud-language/pom.xml Outdated
</goals>
<configuration>
<outputFile>${project.build.outputDirectory}/project.properties</outputFile>
<outputFile>${project.build.outputDirectory}/properties/${project.artifactId}/project.properties</outputFile>

This comment was marked as spam.

This comment was marked as spam.

@shinfan
Copy link
Copy Markdown
Contributor Author

shinfan commented Apr 11, 2017

@garrettjonesgoogle PTAL

As discussed offline, I have modified the properties file path to be /{package_path}/project.properties

private String getPackagePath() {
List<String> fullClassName = Splitter.on(".").splitToList(this.getClass().getCanonicalName());
if (fullClassName.size() > 2) {
return String.join("/", fullClassName.subList(0, fullClassName.size() - 1));

This comment was marked as spam.

This comment was marked as spam.

@garrettjonesgoogle
Copy link
Copy Markdown
Contributor

LGTM if tests pass

@shinfan
Copy link
Copy Markdown
Contributor Author

shinfan commented Apr 12, 2017

3 of 4 tests passed and 1 failed for timeout (most likely due to the flakiness of pubsub) Going to merge

@shinfan shinfan merged commit 3f0f645 into googleapis:master Apr 12, 2017
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
🤖 I have created a release *beep* *boop*
---


## [2.25.1](https://togithub.com/googleapis/java-spanner-jdbc/compare/v2.25.0...v2.25.1) (2024-12-14)


### Dependencies

* Update dependency com.google.cloud:google-cloud-spanner-bom to v6.83.0 ([googleapis#1863](https://togithub.com/googleapis/java-spanner-jdbc/issues/1863)) ([bcb40d5](https://togithub.com/googleapis/java-spanner-jdbc/commit/bcb40d5aeade1df6722101055729905883537843))
* Update dependency com.google.cloud:sdk-platform-java-config to v3.41.0 ([googleapis#1857](https://togithub.com/googleapis/java-spanner-jdbc/issues/1857)) ([ca02222](https://togithub.com/googleapis/java-spanner-jdbc/commit/ca02222968e25c3a0cb42994cfe9fdbe35059947))
* Update dependency io.opentelemetry:opentelemetry-bom to v1.45.0 ([googleapis#1853](https://togithub.com/googleapis/java-spanner-jdbc/issues/1853)) ([7ec5cf2](https://togithub.com/googleapis/java-spanner-jdbc/commit/7ec5cf2d7695ce32f7e8fab9f2af5b48ee739f05))
* Update dependency org.springframework.data:spring-data-bom to v2024.1.1 ([googleapis#1859](https://togithub.com/googleapis/java-spanner-jdbc/issues/1859)) ([bb8af53](https://togithub.com/googleapis/java-spanner-jdbc/commit/bb8af533a5be747c507489eb5f4142d92aab9d73))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
…o v1.126.0 (#1863)

* chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.126.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>
meltsufin pushed a commit that referenced this pull request May 1, 2026
…o v1.126.0 (#1863)

* chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.126.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>
meltsufin pushed a commit that referenced this pull request May 2, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants