Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Fix test compile #192

Merged
merged 3 commits into from Sep 12, 2017
Merged

Fix test compile #192

merged 3 commits into from Sep 12, 2017

Conversation

yanokwa
Copy link
Member

@yanokwa yanokwa commented Sep 12, 2017

Closes #172 and uses latest version of mockito for consistency.

What has been done to verify that this works as intended?

Ran ./gradlew clean test and confirmed there were test reports.
Ran ./gradlew clean run and confirmed the application ran.
Ran ./gradlew clean jar and double clicked the jar and confirmed the application ran.

Why is this the best possible solution? Were any other approaches considered?

I found the idea for this solution at https://stackoverflow.com/a/15029935/152938. I believe java.srcDirs is where gradle looks for non-test code. If tests are inside that folder, it causes classpath problems. We could change java.srcDirs to src/org but then we have to add to that array if we have code that doesn't start with org. Seems easier to move the test folder to where gradle expects it.

And as a pleasant side effect, the binary has gone from 11 MB to 7 MB.

Are there any risks to merging this code? If so, what are they?

Not really. But please squash before merging.

@dcbriccetti
Copy link
Contributor

Cool. I’ll look right now.

Copy link
Contributor

@dcbriccetti dcbriccetti left a comment

Choose a reason for hiding this comment

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

I know little about Gradle, but if run and test are still working, I approve! Thanks for this.

@lognaturel lognaturel merged commit a922a82 into getodk:master Sep 12, 2017
@yanokwa yanokwa deleted the fix-test-compile branch January 18, 2018 19:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants