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

fix non android gradle instructions #467

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ plugins {
}

dependencies {
annotationProcessor "com.uber.nullaway:nullaway:0.9.1"
errorprone("com.uber.nullaway:nullaway:0.9.1")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we also update the suggested version of net.ltgt.errorprone while we are at it? I noticed the latest version is 2.0.1, so maybe 0.6 is quite old now

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, lower down where it says "the annotationProcessor line loads NullAway", that should also be changed to "the first errorprone line" or something like that

Copy link
Author

@xenoterracide xenoterracide Apr 29, 2021

Choose a reason for hiding this comment

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

yeah, that version is ancient, honestly I didn't really notice, or worry about fixing that, but maybe that's why this was written this way. Maybe the better change would just be to point to the plugin's documentation as it actually covers all of this... let me know if you'd rather I do it that way.


// Optional, some source of nullability annotations.
// Not required on Android if you use the support
// library nullability annotations.
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
compileOnly("com.google.code.findbugs:jsr305:3.0.2")

errorprone "com.google.errorprone:error_prone_core:2.4.0"
errorproneJavac "com.google.errorprone:javac:9+181-r4173-1"
errorprone("com.google.errorprone:error_prone_core:2.4.0")

// if using java 8 or less
// errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
}

import net.ltgt.gradle.errorprone.CheckSeverity
Expand Down Expand Up @@ -73,7 +75,7 @@ Snapshots of the development version are available in [Sonatype's snapshots repo

The configuration for an Android project is very similar to the Java case, with one key difference: The `com.google.code.findbugs:jsr305:3.0.2` dependency can be removed; you can use the `android.support.annotation.Nullable` annotation from the Android Support library.

```gradle
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this change?

Copy link
Author

Choose a reason for hiding this comment

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

you know, I don't actually know how this happened, I'm questioning whether githubs web editor removed it, as an unrecognized extension, really it should probably be groovy or kts

dependencies {
annotationProcessor "com.uber.nullaway:nullaway:0.9.1"
errorprone "com.google.errorprone:error_prone_core:2.4.0"
Expand Down