Open
Description
Right now, the extension object directly configures default values of its properties in the constructor:
dataDir = project.objects.property(File)
dataDir.set(new File(project.buildDir, 'scoverage'))
This is, however, a problem, because project.buildDir
may be changed by other plugins. This results in the plugin producing output in unexpected places if the plugins are applied in a certain order.
Instead, the lazy properties API has the "convention" mechanism accepting providers, which is supposed to be be used for default values:
dataDir = project.objects.property(File)
.convention(project.layout.buildDirectory.dir('scoverage')) // dynamic default values should be providers
highlighting = project.objects.property(Boolean)
.convention(true) // static default values can be immediate
Metadata
Metadata
Assignees
Labels
No labels