Gradle 4.3 RC1 is available for testing

Gradle 4.3 RC1 is available for testing; see the release notes.

I get the following exception with Gradle 4.3-rc-1 and spring-boot 1.5.4.RELEASE:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':foo:bootRepackage'.
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(
        at org.gradle.internal.concurrent.ManagedExecutorImpl$
        at org.gradle.internal.concurrent.ThreadFactoryImpl$
Caused by: org.gradle.internal.typeconversion.UnsupportedNotationException: Cannot convert the provided notation to a File or URI: task ':foo:jar'.
The following types/formats are supported:
  - A String or CharSequence path, for example 'src/main/java' or '/usr/include'.
  - A String or CharSequence URI, for example 'file:/usr/include'.
  - A File instance.
  - A Path instance.
  - A Directory instance.
  - A RegularFile instance.
  - A URI or URL instance.
        at org.gradle.internal.typeconversion.ErrorHandlingNotationParser.parseNotation(
        at org.gradle.api.internal.file.AbstractFileResolver.convertObjectToFile(
        at org.gradle.api.internal.file.AbstractBaseDirFileResolver.doResolve(
        at org.gradle.api.internal.file.AbstractFileResolver.resolve(
        at org.gradle.api.internal.file.AbstractFileResolver.resolve(
        at org.gradle.api.internal.tasks.DefaultTaskInputs.toFile(
        at org.gradle.api.internal.tasks.DefaultTaskInputs.access$100(
        at org.gradle.api.internal.tasks.DefaultTaskInputs$6.validate(
        at org.gradle.api.internal.tasks.StaticValue.validate(
        at org.gradle.api.internal.tasks.DefaultTaskInputFilePropertySpec.validate(
        at org.gradle.api.internal.tasks.DefaultTaskInputs.validate(
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(
        ... 24 more

I have a task that has a property outputFormatter that can take a Closure<Result>. When I run the task with 4.3-rc-1, I get

Caused by: java.lang.NullPointerException: Cannot get property 'outdated' on null object
        at init_ee2krdz9v7kavbv5i3saf2frz$_run_closure1$_closure3.doCall(/home/jochen/.gradle/init.gradle:9)
        at org.gradle.util.GUtil.uncheckedCall(
        at org.gradle.util.DeferredUtil.unpack(
        at org.gradle.api.internal.project.taskfactory.TaskPropertyInfo$3.validate(
        at org.gradle.api.internal.tasks.TaskPropertyValue.validate(
        at org.gradle.api.internal.tasks.DefaultTaskInputPropertySpec.validate(
        at org.gradle.api.internal.tasks.DefaultTaskInputs.validate(
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(

outdated is a property of the Result object. This does not happen with earlier versions.

@huxi Thanks for reporting this issue. It might be that the Spring Boot plugin version has become incompatible with 4.3-rc1. Could you please provide a sample project that reproduces the issue? I think it would also be helpful if you’d open an issue with the Spring Boot project. Did the project still work with 4.2?

@jochenberger Thanks for reporting this issue. Could you open an issue and provide some sample project that reproduces the issue? At the moment I am not clear with Result type you are using here.


Filing an issue with spring-boot would be futile since their official stance is that “Gradle 4 isn’t officially supported with Boot 1.5.” (i.e. their latest release version).

The related issues (links are provided in the Github issue I just created) have been around for more than 3 years and we have to live with 20-30s of Gradle configuration time in our main build because of this.

Quite frustrating…

For the record: This is a minimal version that reproduces the issue for me:

plugins {
  id 'com.github.ben-manes.versions' version '0.15.0'

apply plugin: 'java'

repositories {

dependencies {
  compile 'org.slf4j:slf4j-api:1.7.25'

dependencyUpdates {
  outputFormatter = { result->
    println "Outdated dependencies: ${result.outdated.dependencies.collect {}}"

cc @Benjamin_Manes

@jochenberger Thanks, I can reproduce the issue. It’s unclear to me why you assign a closure to the property with a parameter called “result”. The documentation of the plugin does not mention the type of the parameter. In your provided example “result” is null.

Could you please open an issue against the plugin? I’d like the plugin author to comment on that behavior. If you or the plugin author happen to identify an issue in Gradle then please open an issue here:

It appears the new validation introduced by Validate all properties not just the annotated ones · gradle/gradle@22b9d7b · GitHub surfaced some errors in our plugin. This bug report contains a stack track of what happens: Doesnt work with Gradle 4.3 RC1 · Issue #170 · google/protobuf-gradle-plugin · GitHub . It looks like only files and directories can be used as inputs going forward.

Today, we pass a subclass of DefaultSourceDirectorySet to the TaskInput:

I’ve tried to change it to add each proto file from the sourceset, rather than passing in the sourceset:

sourceSet.proto.files.each {
    Utils.addFilesToTaskInputs(project, inputs, it)

But the result is that the copied file goes to the top level directory and the directory structure is lost. For example, this file would be incorrectly be placed here


Rather than here:


I am having some trouble finding resources about the correct way to do this. Is it wrong to pass runtime objects across task boundaries? By the way, I am trying to get a working version of the code in Gradle 4.0 that avoids passing around source sets to the TaskInput before I try it again with Gradle 4.3-rc-1, so the above snippet reflects 4.0.

The resultparameter is a plugin-specific type and is passed to the closure by the plugin.
I don’t think that it is an issue with the plugin given it worked with earlier Gradle versions.

btw, RC-2 also produces the error.

I created an issue with the plugin: and am awaiting some feedback from the plugin author.

You can use inputs.files() instead of inputs.file(). The just released Gradle 4.3-rc-2 should not break the build even if you don’t, and instead produce a warning like this:

Using TaskInputs.file() with something that doesn’t resolve to a File object has been deprecated and is scheduled to be removed in Gradle 5.0. Use TaskInputs.files() instead.

Can you please check if it works as you’d expect with Gradle 4.3-rc-2?

Thank you for your help. I can confirm that with 4.3-rc-2 the build succeeds with a warning if I make no changes, and if I switch to using TaskInput.files I do not get a warning.