The Gradle team is pleased to bring you Gradle 2.12. This release brings support for compile only dependencies, improved build script compilation speed and even better IDE support.
Gradle 2.12 now finally includes support for modeling compile only dependencies when using the Java plugin. This capability establishes a much clearer migration path for those coming from Maven and have build requirements for which leveraging ‘provided’ scope was typically the solution.
We’ve introduced some improvements to test execution from the Gradle command line. Support has been added for executing specific test suites and parameterized tests making test-driven development using Gradle even easier.
With each Gradle release we strive to not only make the command line Gradle experience better but also using Gradle in conjunction with your favorite IDE even more enjoyable. Using Gradle with IntelliJ IDEA and the IDEA plugin now works better than ever. Manually managing Java target compatibility settings is no longer necessary as the IDEA plugin will now ensure that Gradle and the IDE consistently use the same compiler settings.
Additionally, our commitment to improving performance with each release continues. Gradle 2.12 has the fastest build script compilation speeds of any Gradle version to date.
Check the 2.12-rc-1 release notes for more information. If no regressions are reported, a final release will typically follow in the next week.
Upgrade Instructions
Switch your build to use Gradle 2.12-rc-1 quickly by updating your wrapper properties:
If you find a problem with Gradle 2.12-rc-1, please post a reply to this topic or create a new topic in Bugs. Be sure to include which operating system you are using, the version of Gradle you upgraded from and any steps you have found that reproduces your problem.
Everything fine with the usual three projects.
Except the stuff mentioned here but I didn’t expect it to be fixed since we couldn’t pinpoint the problem so far.
Regarding the new compileOnly:
Unlike provided with the propdeps-plugin, compileOnly is not written to the resulting Maven pom as a provided dependency. Not sure if this is intended…
Regarding the IDEA plugin:
We also have the following code in our Gradle files.
This ensures that main and test resources are registered properly in IDEA 15. It seems something has changed in the .iml IDEA files with IDEA 15. Without the above code, tests aren’t able to find resources addressed by getClass().getResourceAsStream() if executed in IDEA.
You might consider adding this or something similar if you are working on the idea plugin anyway.
Are you reporting that this code is needed only when you use 2.12-rc-1 to generate your .iml files, or are you saying that this code is needed for IDEA 15 (independent of the version of gradle you are using to generate the .iml files?)
This is the intended behavior at this point. We might consider adding compileOnly dependencies to the Maven pom in future iterations. But right now, this is how it is supposed to work.
The clojuresque plugin stops working with 2.12-rc-1:
...
Caused by: java.lang.NoSuchMethodError: org.gradle.api.internal.file.DefaultSourceDirectorySet.<init>(Ljava/lang/String;Lorg/gradle/api/internal/file/FileResolver;)V
at clojuresque.tasks.ClojureSourceDirectorySet.<init>(ClojureSourceDirectorySet.groovy)
at clojuresque.tasks.ClojureSourceSet.initSourceSet(ClojureSourceSet.groovy:32)
at kotka.gradle.utils.tasks.GenericSourceSetConvention.<init>(GenericSourceSetConvention.groovy:57)
at clojuresque.tasks.ClojureSourceSet.<init>(ClojureSourceSet.groovy)
at clojuresque.ClojureBasePlugin$_configureSourceSets_closure2.doCall(ClojureBasePlugin.groovy:77)
at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:110)
at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:115)
at org.gradle.api.DomainObjectCollection$all$1.call(Unknown Source)
at clojuresque.ClojureBasePlugin.configureSourceSets(ClojureBasePlugin.groovy:75)
at clojuresque.ClojureBasePlugin.this$2$configureSourceSets(ClojureBasePlugin.groovy)
at clojuresque.ClojureBasePlugin.apply(ClojureBasePlugin.groovy:55)
at clojuresque.ClojureBasePlugin.apply(ClojureBasePlugin.groovy)
at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35)
at org.gradle.api.internal.plugins.RuleBasedPluginApplicator.applyImperative(RuleBasedPluginApplicator.java:43)
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:137)
at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:112)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyType(DefaultObjectConfigurationAction.java:112)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:35)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:79)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:135)
at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:46)
at org.gradle.api.plugins.PluginAware$apply.call(Unknown Source)
at clojuresque.ClojurePlugin.apply(ClojurePlugin.groovy:31)
Unfortunately the clojuresque plugin is largely unmaintained so I’m stuck at Gradle 2.11 with many projects. Is there a chance that the old c’tor might be restored?