Skip to content

Hide library resources#188

Merged
cortinico merged 2 commits into
developfrom
fix/hide_resources
Jan 20, 2020
Merged

Hide library resources#188
cortinico merged 2 commits into
developfrom
fix/hide_resources

Conversation

@vbuberen

Copy link
Copy Markdown
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.

@cortinico cortinico left a comment

Copy link
Copy Markdown
Member

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