-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Hello!
In Gradle 7.3.3, providing a directory path to nugetPack.basePath:
plugins {
id 'com.ullink.nuget' version '2.23'
}
nugetPack {
basePath = new File(projectDir, 'ThisIsADirectory')
}...results in an error when nugetPack task is run:
> Task :nugetPack FAILED
:nugetPack (Thread[Execution worker for ':',5,main]) completed. Took 0.002 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Some problems were found with the configuration of task ':nugetPack' (type 'NuGetPack').
- In plugin 'nuget-base' type 'com.ullink.NuGetPack' property 'basePath' specifies file 'W:\Repositories\gradle-plugins\gradle-test\ThisIsADirectory' which doesn't exist.
Reason: An input file was expected to be present but it doesn't exist.
Possible solutions:
1. Make sure the file exists before the task is called.
2. Make sure that the task which produces the file is declared as an input.
Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#input_file_does_not_exist for more details about this problem.
Looking at the source, this is because the property is annotated as @InputFile which is incorrect in this case.
Changing it to @InputDirectory would fix the error, but then the contents of the directory would be considered for determining whether the task is up-to-date which in this case doesn't make sense, so this should just be @Input instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels