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

Update Gradle, Error Prone plugin, and Android Gradle Plugin #294

Merged
merged 3 commits into from Apr 8, 2019

Conversation

ZacSweers
Copy link
Contributor

Modernizes the android example with the new lazy task configuration APIs. Based on implementation figured out here: uber/AutoDispose#330

This switches to the new lazy task configuration APIs
@ZacSweers
Copy link
Contributor Author

@msridhar @lazaroclapp thoughts?

Copy link
Collaborator

@msridhar msridhar left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@lazaroclapp lazaroclapp left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, but let's check on that commit hook script and on the manual testing below before merging this.

gradlew Outdated
@@ -1,7 +1,20 @@
#!/usr/bin/env sh

# added manually
./config/hooks/install-pre-commit
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this the GJF hook installer? Why are we getting rid of it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@lazaroclapp I just opened #297 on this. We should find a different way to do this. gradlew is an auto-generated file so this was a hack all along.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I vote we re-add this for now, then we remove it again at the same time as we implement #297

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure, but then let's land #298 before this one. We really shouldn't let master be red with respect to this, hack or not :)

@@ -31,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems very very low, but if it works for building NullAway, then all the better, I suppose.

option("NullAway:AnnotatedPackages", "com.uber")
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have we tried manually injecting a null dereference on the sample app and seeing that NullAway does trigger on it? (e.g. uncomment https://github.com/uber/NullAway/blob/master/sample-app/src/main/java/com/uber/myapplication/MainActivity.java#L33 do .\gradlew build, observe error).

I am not sure we have integration tests for this config, so is worth doing that small manual sanity check :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey @ZacSweers, would you mind rebasing and testing this? After that I'd be glad to merge this.

Edit: Actually, never mind, testing it now :)

@msridhar
Copy link
Collaborator

msridhar commented Apr 5, 2019 via email

@lazaroclapp
Copy link
Collaborator

To clarify master won’t turn red unless we land a PR with bad formatting. We still check for proper formatting on Travis independent of the commit hook. Without this gradlew hack GJF needs to be run manually

On Fri, Apr 5, 2019 at 8:49 AM Lázaro Clapp @.> wrote: @.* commented on this pull request. ------------------------------ In gradlew <#294 (comment)>: > @@ -1,7 +1,20 @@ #!/usr/bin/env sh -# added manually -./config/hooks/install-pre-commit Sure, but then let's land #298 <#298> before this one. We really shouldn't let master be red with respect to this, hack or not :) — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#294 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AALyUYO17l814vOrb5Wnobv6_aCJ-fx-ks5vd3CmgaJpZM4cVTub .

I forgot about the CI check. That makes it less of an issue. Still, I feel is better if we guarantee that checking out the repo and building at any commit results on the git hook being installed, but "master will be red" is definitely an exaggeration there :)

Either way, I think we can land #298 , then just merge this (preferring this version of gradlew anyways), and we will have guaranteed that the commit hook is added when building every commit.

@msridhar
Copy link
Collaborator

msridhar commented Apr 5, 2019 via email

@msridhar
Copy link
Collaborator

msridhar commented Apr 8, 2019

@lazaroclapp could you merge this and #295 assuming they are ok with you? I think they are all set but don't want to mess something up

@lazaroclapp lazaroclapp merged commit 4d7b4d0 into uber:master Apr 8, 2019
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.

None yet

3 participants