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 — fix: use embedded Proguard configuration instead of compile-time annotation by anuraaga · Pull Request #1491 · googleapis/google-api-java-client

Conversation

@anuraaga

@anuraaga anuraaga commented Feb 14, 2020 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

R8 provides a mechanism for embedding proguard files, which obviates the need for a compile-time dependency on an Android library in core.

Not well documented but reasonably commonly used.

https://twitter.com/jakewharton/status/1004401938467876865?lang=en
https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro

Unfortunately, without a regression test I'm not 100% sure this works, nor am I an Android developer with much confidence, just following the pattern of other libraries :)

Fixes #1487

Sorry, something went wrong.

Uh oh!

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

All reactions
anuraaga added 2 commits February 14, 2020 14:10
@anuraaga
Revert "keep GoogleUtils (googleapis#1467)"
115556d
This reverts commit b70e8ef.
@anuraaga
Add proguard resource file to ensure GoogleUtils is kept for Android …
afba0e4
…users.
@anuraaga
anuraaga requested a review from a team February 14, 2020 05:17
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 14, 2020
@anuraaga anuraaga changed the title Proguard configuration instead Use embedded Proguard configuration instead of compile-time annotation Feb 14, 2020
@anuraaga anuraaga changed the title Use embedded Proguard configuration instead of compile-time annotation fix: use embedded Proguard configuration instead of compile-time annotation Feb 14, 2020
@anuraaga

anuraaga commented Feb 14, 2020

Copy link
Copy Markdown
Contributor Author

/cc @JakeWharton mainly since your tweet helped me out a lot :)

All reactions

Sorry, something went wrong.

Uh oh!

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

@anuraaga anuraaga mentioned this pull request Feb 14, 2020
Unresolvable dependency after 1.30.8 #1487
Closed
@anuraaga
Revert "Add google android repository to Gradle instructions (googlea…
5a227e9
…pis#1489)"

This reverts commit 57a7bb7.
elharo
elharo reviewed Feb 14, 2020
View reviewed changes

@elharo elharo left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks promising. Does this change anything about Android versions supported? I may need to find an android developer to look at this.

Sorry, something went wrong.

Uh oh!

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

All reactions
elharo
elharo reviewed Feb 14, 2020
View reviewed changes
Comment thread README.md
```gradle
repositories {
mavenCentral()
google()

@elharo elharo Feb 14, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably want to leave this here until we're ready to release 1.30.9

Sorry, something went wrong.

Uh oh!

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

All reactions

@anuraaga anuraaga Feb 14, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah - reverted!

Sorry, something went wrong.

Uh oh!

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

All reactions
@anuraaga
Restore README
95744d0
@anuraaga

anuraaga commented Feb 14, 2020

Copy link
Copy Markdown
Contributor Author

Not sure of versions - I don't see any reason for Android API level to be affected since this is purely compilation but there might be an SDK tooling implication.

@JakeWharton do you happen to know?

All reactions

Sorry, something went wrong.

Uh oh!

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

@elharo elharo added the kokoro:run Add this label to force Kokoro to re-run the tests. label Feb 14, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Feb 14, 2020
@IanGClifton

IanGClifton commented Feb 14, 2020

Copy link
Copy Markdown

I can at least confirm that it won't impact Android OS versions, but I don't know if this works when not compiling with R8.

All reactions

Sorry, something went wrong.

Uh oh!

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

justcla
justcla approved these changes Feb 14, 2020
View reviewed changes

@justcla justcla left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

You might be able to define more precise keep-rules that allow better code shrinking for apps that include this library.
But for now, it's a reasonable replacement for the AndroidX @keep annotation.

Sorry, something went wrong.

Uh oh!

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

JakeWharton reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
elharo
elharo approved these changes Feb 14, 2020
View reviewed changes
@elharo
elharo merged commit 8a59ed0 into googleapis:master Feb 14, 2020
@elharo elharo mentioned this pull request Feb 14, 2020
Tighten keep rule #1494
Open
@elharo elharo mentioned this pull request Feb 28, 2020
Storage: Dependency issue: Could not find androidx.annotation:annotation:1.1.0 googleapis/java-storage#148
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@elharo elharo elharo approved these changes
@justcla justcla justcla approved these changes
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

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Unresolvable dependency after 1.30.8

Uh oh!

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

6 participants

@anuraaga @IanGClifton @elharo @justcla @googlebot @kokoro-team
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.