-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add gradle instructions for Android projects #452
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
Hopefully someone more familiar with Gradle on Android than me can review this? I also think we should update the AutoValue version number, but that's a problem that's already there. |
This is fine as far as an official recommendation. The use of |
@JakeWharton can you explain more? AutoValue shades Guava, so I don't see how an IDE could pick up classes from it. |
Well it'd pick up com.google.auto.value.shaded.guava or whatever the package is in autocomplete when you typed "ImmutableList". The goal is such that the only class that is on the classpath for compilation and in the IDE is the annotation such that you don't get accidental imports of things that won't be present at runtime. |
The shaded name is |
Yeah that's really great. Not all processors are as considerate to their downstream consumers! Also I'd think shading is something that becomes less of a pressing of an issue with a separate annotations artifact since build systems should resolve the classpath and processorpath (and any conflicts therein) entirely separately. |
@cypressf can you sign the CLA? It looks as if the recommendation itself is fine (apart from the version number, which we'll fix). Google's processes mean that we won't actually be merging the PR, but will make the same change (duly credited) internally and sync it out. |
Yup, I signed it. |
CLAs look good, thanks! |
Using The only way to avoid shading in the processing code is to split the annotations and other classes needed at runtime into its own module, like #268 suggests, and include this module as a EDIT: It seems |
That was fixed.
…On Tue, Jun 6, 2017 at 3:45 PM Tobias ***@***.***> wrote:
Using provided and annotationProcessor is not sufficient anymore, as the
generated Factory classes import
com.google.auto.factory.internal.Preconditions.
The only way to avoid shading in the processing code is to split the
annotations and other classes needed at runtime into its own module, like
#268 <#268> suggests, and include
this module as a compile dependency, I think.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#452 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEUP-YzxNYgFZmINdDhXNPLk_ZlB8ks5sBax0gaJpZM4Mfp_d>
.
|
Let me know if this is not correct. I assume we should be using
provided
andannotationProcessor
?