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

[NNP] PT-392: up to date check support #258

Merged
merged 6 commits into from Jan 23, 2017

Conversation

tasomaniac
Copy link
Contributor

Problem

Currently, we plugin works on java and android modules. 👍
But the task runs in every build process. This is not something we want to have.

If no package structure has changed, we don't want to run again.

Solution

A field called packages created with annotation @Input
The code block that computes the packages is extracted into a @Memoized getter method: getPackages

Tests

  • A test is added that runs the project again and asserts that we get the UP-TO-DATE check
  • Another test is added that adds a new file to a new package and asserts that we didn't get UP-TO-DATE check.

Paired with @tobiasheine

@stefanhoth stefanhoth closed this Jan 19, 2017
Then assert that the code generation happens.

Also modified the TestRule to use TestWatcher to clear the tempDir on `finished`
@tasomaniac tasomaniac reopened this Jan 19, 2017
Copy link
Contributor

@mr-archano mr-archano left a comment

Choose a reason for hiding this comment

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

LGTM. Question: do we need to add an integration test to check the behavior against java-only projects?

@tasomaniac
Copy link
Contributor Author

tasomaniac commented Jan 23, 2017

Thanks for the review.

The integration tests only tests the java-only core module
See this line in the PR: https://github.com/novoda/spikes/pull/258/files#diff-cd2de1e0d8c93526b5ee0b102ca0b326R66

We actually did it like that because building java module is slightly faster.

@mr-archano
Copy link
Contributor

Sorry @tasomaniac, I actually meant non-java-only modules (edit fail), just to be safe. I understand this can be considered enough tho. So I'm happy to ship it 👍

@mr-archano mr-archano merged commit 212844c into master Jan 23, 2017
@mr-archano mr-archano deleted the PT-392/up_to_date_check_support branch January 23, 2017 10:05
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

4 participants