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

Declare runtime dependency on JUnit and Hamcrest, not compile dependency #2

Open
npryce opened this issue Mar 18, 2015 · 2 comments
Open

Comments

@npryce
Copy link
Contributor

npryce commented Mar 18, 2015

This makes dependency management in client code easier.

@TWiStErRob
Copy link

Yes, as it currently stands this project is pointless:

build.gradle

testCompile 'org.hamcrest:hamcrest-junit:2.0.0.0'

Nothing else.

gradle dependencies --configuration testCompile

testCompile - Classpath for compiling the test sources.
\--- org.hamcrest:hamcrest-junit:2.0.0.0
     +--- junit:junit:4.12
     |    \--- org.hamcrest:hamcrest-core:1.3
     \--- org.hamcrest:java-hamcrest:2.0.0.0

This makes things worse since java-hamcrest duplicates what's inside hamcrest-core.

@npryce
Copy link
Contributor Author

npryce commented May 1, 2015

You are not meant to use hamcrest-junit by itself. The intended use is to allow JUnit to be used with the latest versions of Hamcrest. So, in your project, depend on the latest JUnit excluding transitive dependencies on Hamcrest, and depend on Hamcrest JUnit.

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

No branches or pull requests

2 participants