Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide library resources #188

Merged
merged 2 commits into from
Jan 20, 2020
Merged

Hide library resources #188

merged 2 commits into from
Jan 20, 2020

Conversation

vbuberen
Copy link
Collaborator

📷 Screenshots

Before:
Screen Shot 2020-01-16 at 21 59 33
After:
Screen Shot 2020-01-16 at 23 04 53

📄 Context

After fixing visibility for internal classes I decided to also try to make all the resources we have (like strings, drawables, values, etc.) private, so users won't see them in autocomplete suggestions.
According to https://developer.android.com/studio/projects/android-library#PrivateResources
all we need to do is to create some public resource (might be even empty), so others are marked as private in final aar.
Unfortunately, this approach won't work when the library added as module, like we have in sample app, so wasn't able to check locally.

📝 Changes

Added a single resource marked as public.

⚠️ Breaking

Nothing wrong expected.

📝 How to test

Try to get snapshot from Jitpack as com.github.ChuckerTeam:Chucker:fix~hide_resources-SNAPSHOT and try to check autocomplete in the app using this dependency.

Copy link
Member

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

@cortinico cortinico merged commit 09b722d into develop Jan 20, 2020
@cortinico cortinico deleted the fix/hide_resources branch January 20, 2020 22:21
kmayoral pushed a commit to kmayoral/chucker that referenced this pull request Jan 21, 2020
* Attempt to generate private resources

* Update public.xml
@vbuberen vbuberen mentioned this pull request Jan 29, 2020
@vbuberen vbuberen mentioned this pull request Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants