- 
                Notifications
    You must be signed in to change notification settings 
- Fork 19
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Currently the properties that Knit considers are not compatible with Gradle lazy configuration
kotlinx-knit/src/KnitPlugin.kt
Lines 97 to 104 in c4e77da
| var siteRoot: String? = globalDefaults.siteRoot | |
| var moduleRoots: List<String> = globalDefaults.moduleRoots | |
| var moduleMarkers: List<String> = globalDefaults.moduleMarkers | |
| var moduleDocs: String = globalDefaults.moduleDocs | |
| var files: FileCollection? = null | |
| var rootDir: File? = null | |
| var dokkaMultiModuleRoot: String = globalDefaults.dokkaMultiModuleRoot | |
| var defaultLineSeparator: String? = null | 
This is a particular problem with the Knit files. I would like to be able to share the Markdown files using Gradle best practices, but because the Knit files use FileCollection, not a ConfigurableFileCollection, the files must be evaluated instantly, not on-demand.
Here is an example of how the properties could be made compatible with the Gradle Provider API
abstract class KnitPluginExtension {
    abstract val knitVersion: Property<String>
    abstract val siteRoot: Property<String>
    abstract val moduleRoots: ListProperty<String>
    abstract val moduleMarkers: ListProperty<String>
    abstract val moduleDocs: Property<String>
    abstract val files: ConfigurableFileCollection
    abstract val rootDir: RegularFileProperty
    abstract val dokkaMultiModuleRoot: Property<String>
    abstract val defaultLineSeparator: Property<String>
}Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers