Skip to content

Commit 94f7593

Browse files
authored
Update GoogleUtils.java to read absolute path of google-api-client.properties
- Make it file shading friendly like googleapis/google-http-java-client#1046 - Avoid set proguard config to read this file. b/279795343#comment2
1 parent 26bec5b commit 94f7593

File tree

1 file changed

+2
-1
lines changed
  • google-api-client/src/main/java/com/google/api/client/googleapis

1 file changed

+2
-1
lines changed

google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ private static String getVersion() {
9393
// this value should be read and cached for later use
9494
String version = null;
9595
try (InputStream inputStream =
96-
GoogleUtils.class.getResourceAsStream("google-api-client.properties")) {
96+
GoogleUtils.class.getResourceAsStream(
97+
"/com/google/api/client/googleapis/google-api-client.properties")) {
9798
if (inputStream != null) {
9899
Properties properties = new Properties();
99100
properties.load(inputStream);

0 commit comments

Comments
 (0)