GradleRunner fails for custom plugin with @InputFile

Hi.

I am developing a Gradle plugin using Gradle 5.2.1. In my DefaultTask implementation (Kotlin), I have a property as follows:

@get:InputFile val inputSpec = project.objects.property<String>()

When running a Test with GradleRunner, it fails with:

* What went wrong:
Could not determine the dependencies of task ':openApiGenerate'.
> Cannot resolve object of unknown type String to a Task.

The plugin works if used in a standard Gradle project. When removing the @InputFile annotation, GradleRunner works.

GradleRunner is called with the following gradle file:

    plugins {
      id 'my.plugin'
    }
    generator {
        inputSpec = file("./spec.yaml").absolutePath
    }

GradleRunner is invoked like this:

        val result = GradleRunner.create()
                .withProjectDir(temp)
                .withArguments("generate")
                .withPluginClasspath()
                .withDebug(true)
                .build()

Any idea why the @InputFile annotation wrecks havok with GradleRunner?

Thanks!

Turns out this issue is resolved when updating my gradle runtime to 5.6.4. Issue solved.