ConventionMapping doesn't work correctly for DirectoryProperty and RegularFileProperty after upgrade #29177
Labels
a:bug
in:provider-api
property lazy provider MapProperty ListProperty DirectoryProperty
p:lazy-migration
Issues covered by migration to an all-lazy API
Milestone
If we upgrade a property from a File to
DirectoryProperty
orRegularFileProperty
, and there are some convention mapping defined in plugins, we incorrectly handle them. The logic that modifies that code is here:gradle/platforms/core-configuration/model-core/src/main/java/org/gradle/internal/extensibility/ConventionAwareHelper.java
Lines 101 to 119 in 063b470
For example user can have code like:
(see spring-boot plugin).
Failure looks like:
The problem is, that convention mapping returns a
File
, whileDirectoryProperty.convention()
expects aDirectory
andRegularFileProperty.convention()
expects aRegularFile
.The text was updated successfully, but these errors were encountered: