Skip to content

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