-
Notifications
You must be signed in to change notification settings - Fork 11
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
0.1.4: the plugin fails to account for gradle 2.12's new (and longly awaited) compileOnly #13
Comments
Im just thinking about the best way to support this, will need to refactor a little. |
Are still on this? I could as well try to provide a PR. |
Hi @otrosien, I had a little play with this awhile back and it wasnt quite as clear cut. Will did it back up and have another go! |
Nowadays |
I have released 1.0-RC1 this supports compileOnly, can you give it a go please :) |
As mentioned in #19
I'm using |
@arturbosch i cant reproduce this on your project, here is my diff:
|
Ok I analyzed the behaviour again: I get the exceptions but they do not make the build fail. I can |
OK so the plugin extends compile with the provided configuration, as such when its provided your tests are also getting the class in the classpath. However when using compileOnly this wasnt happening for your tests (the plugin still works as expected creating the jar). Since they have started seperating out the various configurations (especially with kotlin) i'll have a think and see if there is a better way to handle this. |
@iwarapter maybe it's a case of trying to do too much.. Inside build.gradle you usually have the sonarqube version, maybe even as an ext-parameter. So why infer the version from the dependencies if the user can just pass it as string property? |
@otrosien it's not just a case of knowing the version unfortunately, its used to identify all the jars that are part of it and hence don't need to be packaged in the plugin. I just need to check with the recent split of configurations whats the best approach. |
@iwarapter isn't that what compileOnly is for? No need to reinvent the wheel.. |
See here:
https://docs.gradle.org/current/release-notes#support-for-declaring-compile-time-only-dependencies-with-java-plugin
This means that in theory, we do not have to declare anymore a new
provided
configuration and use that for the sonar-plugin-api jar.If I try and use
compileOnly
for the sonar-plugin-api jar, the plugin says that the jar cannot be found.The text was updated successfully, but these errors were encountered: