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

Build fails on lint error due to okio dep #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

virtualandy
Copy link

What's this PR do?

Changes "InvalidPackage" lint errors to a warning so that the build can proceed. This should allow someone to clone/download the repo, run ./gradlew build and have it succeed. I've tested locally and it seems good.

How should this be manually tested?

Clone the repo, run ./gradlew build.

Any background context you want to provide?

./gradlew build will fail due to a lint error caused by the inclusion of OkHttp/Okio. The error is something like:

Invalid package reference in library; not included in Android: java.nio.file.
Referenced from okio.Okio.

Issue in the Okio repo documenting this along with steps to lower the level of the flag to a "warning", which is what I've done here.

Granted, that affects the entire build, not just the one package. Here's a similar proposed fix for a similar lint error via StackOverflow.

What are the relevant issues?

square/okio#58

`./gradlew build` will fail due to a lint error caused by the inclusion of OkHttp/Okio. The error is something like:
```
Invalid package reference in library; not included in Android: java.nio.file.
Referenced from okio.Okio.
```

[Issue in the Okio repo documenting this](square/okio#58) along with steps to lower the level of the flag to a "warning", which is what I've done here.

Granted, that affects the entire build, not just the one package. [Here's a similar proposed fix for a similar lint error](http://stackoverflow.com/questions/21827004/gradle-dagger-lint-ignore-by-package) via StackOverflow.

This should allow someone to clone/download the repo, run `./gradlew build` and have it succeed. I've tested locally and it seems good.
@virtualandy
Copy link
Author

Thanks for these examples, just noticed this error as I went to pull down the deps and build it yesterday. :)

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.

1 participant