Gradle 2.13-rc-1 is now available for testing

Gradle 2.13-rc-1 is now available for testing

The Gradle team is pleased to announce Gradle 2.13. This release brings many exciting execution performance improvements, community contributions and a new feature for Tooling API users.

Our commitment to improving the developer experience with each release continues. For Gradle 2.13, we’ve targeted performance improvements during Gradle’s execution phase, where we have measured 10-25% improvements to build time in our performance tests. No changes to your build script are necessary to start taking advantage of these improvements.

We’ve improved Gradle TestKit, so that plugin authors no longer need to add boilerplate to their build scripts. The development plugin automatically adds the necessary configuration to make it easier to test Gradle plugins.

The Gradle Community has contributed many fixes and new features in this release. The Checkstyle and FindBugs plugins now allow you to customize their HTML reports with stylesheets.
The Signing plugin supports OpenPGP subkeys, so you can keep your master signing keys safely off your CI server. These are just some of the great contributions we’ve received.

As we announced on our forums, we’re introducing a new way of putting multiple Gradle builds together with Eclipse Buildship. We’re calling this feature Composite Build.
A composite build allows you to combine multiple Gradle builds and replace external binary dependencies with project dependencies as if you were using a single multi-project build. For projects that use multiple distinct Gradle builds, this will allow you to mix and match your separate builds into one build in a very flexible way.

Upgrade to Gradle 2.13 and let us know what you think.

Check the 2.13-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.13-rc-1 quickly by updating your wrapper properties:

./gradlew wrapper --gradle-version=2.13-rc-1

Standalone downloads are available at https://gradle.org/release-candidate.

Reporting Problems

If you find a problem with Gradle 2.13-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.

This topic is now a banner. It will appear at the top of every page until it is dismissed by the user.

There are some minor glitches in the console output in case of javac warnings like [deprecation] or [unchecked].

Sometimes (quite rarely) parts of the build progress message stays on the screen, e.g. > Building 21% > written above the actual warning text and staying there.

I’m on Mac OS X 10.11.4 using latest iTerm2.

Our jenkins just exploded while I was writing this reply.
This is the stacktrace: http://pastebin.com/7YRXBPTT
This is the mentioned UploadNexus.gradle.
The issue is reproducible with 2.13-rc-1. I reverted back to 2.12 and it was gone again.

Hi Joern,

Thanks for reporting.

There are some minor glitches in the console output in case of javac warnings like [deprecation] or [unchecked].

Could you give us an example of such a message (maybe a screenshot)?

Sometimes (quite rarely) parts of the build progress message stays on the screen, e.g. > Building 21% > written above the actual warning text and staying there.

Is this related to the javac warning message? Does the progress message simply stay on the screen and a new line is written with a new progress message? I am having a hard time imagine it.

Our jenkins just exploded while I was writing this reply.

We’ll try to reproduce and report back.

See that bold > Build near the middle of the screen? It doesn’t always look exactly like this. Sometimes it also includes the current percentage of the build. Sometimes it even contains part of the module name that was in progress.

The other problem is likely a classloader isolation issue. I think I had a similar problem some while back.

Looks like there might be some regression with continuous mode. Given this simple buildscript:

plugins {
	id "idea"
	id "io.ratpack.ratpack-groovy" version "1.2.0"
}

repositories {
	mavenCentral()
}

wrapper {
	gradleVersion = "2.13-rc-1"
}

and a very basic Ratpack script at src/ratpack/ratpack.groovy:

import static  ratpack.groovy.Groovy.ratpack

ratpack {
    all {
        render "Hello World!"
    }
}

When running ./gradlew run -t --stacktrace with or without daemon I get the following stacktrace:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':run'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:68)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
	at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
	at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
	at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
	at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
	at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
	at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
	at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
	at org.gradle.internal.Factories$1.create(Factories.java:22)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
	at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
	at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
	at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
	at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
	at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
	at org.gradle.launcher.exec.ContinuousBuildActionExecuter.executeBuildAndAccumulateInputs(ContinuousBuildActionExecuter.java:183)
	at org.gradle.launcher.exec.ContinuousBuildActionExecuter.executeMultipleBuilds(ContinuousBuildActionExecuter.java:120)
	at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:79)
	at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
	at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
	at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
	at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
	at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
	at org.gradle.util.Swapper.swap(Swapper.java:38)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
	at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
	at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
	at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
	at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
	at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
	at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: org.gradle.internal.service.UnknownServiceException: No service of type Factory<WorkerProcessBuilder> available in TaskScopeServices.
	at org.gradle.internal.service.DefaultServiceRegistry.getServiceProvider(DefaultServiceRegistry.java:400)
	at org.gradle.internal.service.DefaultServiceRegistry.doGet(DefaultServiceRegistry.java:390)
	at org.gradle.internal.service.DefaultServiceRegistry.get(DefaultServiceRegistry.java:378)
	at ratpack.gradle.continuous.RatpackContinuousRun_Decorated.getWorkerProcessBuilderFactory(Unknown Source)
	at ratpack.gradle.continuous.RatpackContinuousRun.createAdapter(RatpackContinuousRun.java:94)
	at ratpack.gradle.continuous.RatpackContinuousRun.exec(RatpackContinuousRun.java:51)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
	... 70 more

This might be Ratpack specific so it’s probably worth @luke_daley having at least an initial look at this. Also, the error does not occur when using 2.13-20160320000030+0000 nightly which we are using at the moment because it contains a fix for https://issues.gradle.org/browse/GRADLE-3415.

This is due to a change in Gradle internal API, so doesn’t need any remedy on the Gradle side. Ratpack needs to be updated to deal with the classes that changed/moved.

Cool, thanks, we’ll stick to the nightly we’re currently using for the time being.

@huxi So far I wasn’t able to reproduce the issue you see on Jenkins. To reproduce I used this simplified script as init script or regular build script. Could you try to reproduce the issue on your local developer machine? Is the build failing with the reported stack trace consistently or only intermittently? If you delete <Gradle_USER_HOME>/caches/2.13-rc-1 and execute the build again, do you still see the issue?

FYI there’s a TODO in the release notes in the section titled “Project Dependencies now include classifiers and all artifacts in generated POM files”.

Couldn’t replicate the issue anymore either. Sorry about that.

So we have some lingering issue between Nexus, Jenkins and Gradle on our CI server that I can’t replicate.
Those are the best…

Does that source line where the > Buildi appears happen to use tab characters for indentation?

It’s very likely, yes.

2.13-rc-1 doesn’t work at all on Windows 64bits with JDK 7 or 8 (haven’t tried with 9). It works with JDK 6.

Running gradle -v outputs correct data, but trying any build (including a simple ‘tasks’) results in an empty output (no errors).
This was reproduced on Windows 8.1 64bits, and a 2008 R2 64bits VM, on both an empty folder and a folder containing a working project.
Running gradle -d tasks gives only this output:
15:17:26.184 [DEBUG] [org.gradle.internal.nativeintegration.services.NativeServices] Native-platform posix files is not available. Continuing with fallback. 15:17:26.193 [DEBUG] [org.gradle.internal.nativeintegration.filesystem.services.FileSystemServices] Using JDK 7 file service org.gradle.internal.nativeintegration.filesystem.jdk7.WindowsJdk7Symlink

With a JDK 6, the start of the output is:
15:08:52.398 [DEBUG] [org.gradle.internal.nativeintegration.services.NativeServices] Native-platform posix files is not available. Continuing with fallback. 15:08:52.410 [DEBUG] [org.gradle.internal.nativeintegration.filesystem.services.FileSystemServices] Unable to load org.gradle.internal.nativeintegration.filesystem.jdk7.WindowsJdk7Symlink. Continuing with fallback org.gradle.internal.nativeintegration.filesystem.services.WindowsSymlink.

Has anyone else tried this release on a 32bit Windows with a JDK > 6?

(edit: formatting)

Hi Thierry,

Are you using 32 or 64 bits JVMs?

Hi Paul, sorry, forgot to mention that: I’m using 32 bits JVMs.
I’m not at work ATM, I’ll try with a 64 bits JVM on monday.
Meanwhile, I tested on my home computer (windows 8.1 64 bits), and 2.13-rc-1 seems to work as expected with both 32 and 64 bits JVMs. Very strange.

Hi again, sorry for the late update:
tried again at work, on a Windows 8.1x64: I got exactly the same behavior (only two debug lines, then Gradle exits) on the following JDKs (changing the JAVA_HOME env var):
jdk1.7.0_05, jdk1.7.0_40, jdk1.7.0_51_x64, jdk1.7.0_80
jdk1.8.0_05, jdk1.8.0_40, jdk1.8.0_66, jdk1.8.0_74_x64, jdk1.8.0_77
The problem seems to be the same on 32 or 64 bits JVMs.

Is there a flag, aside from -d, that I can pass to get more output?

Edit: I looked with a debugger: the problem lies with the Jdk7Symlink class (or maybe the Oracle JVM): when the doesSystemSupportSymlinks method is called, the internal native method WindowsNativeDispatcher.CreateSymbolicLink0 returns a lovely “java.lang.InternalError: Should not get here” (full stack here: http://pastebin.com/w3PLQwj5)
The error is then not so well handled by Gradle and doesn’t get output on the console (even with the -s switch).

What’s really weird is that I created a small project, instanciating Jdk7Symlink and calling the isSymlinkSupported() method, and it returns false (as expected) with a JDK8. No error. So ‘something’ must have happened before this call.

Jdk7Symlink jdk7Symlink = new Jdk7Symlink();
System.out.println(jdk7Symlink.isSymlinkSupported());

I forgot to mention: recent Gradle versions up to 2.12 work as expected.

This looks similar: https://bugs.eclipse.org/bugs/show_bug.cgi?id=471027

Could you be running Gradle in XP compatibility mode somehow?

Gradle should be handling this case better.

Thank you Thierry for reporting this. I have pushed a tentative fix for this and we would like to make sure that it works before releasing rc2. Would you mind downloading

https://builds.gradle.org/repository/download/Gradle_Release_CommitPhase_BuildDistributions/733735:id/distributions/gradle-2.13-20160419045713%2B0000-bin.zip?guest=1

And tell us if this version fixes the issue you are seeing? Thanks a lot!