Skip to content

spotlessPredeclare accessor is not available in kotlin scripts #2580

@bric3

Description

@bric3

In Gradle kotlin scripts, spotlessPredeclare is not available as an assessor. In order to use this , one has to access it via the extensions API, e.g. using kotlin's with.

with(extensions["spotlessPredeclare"] as SpotlessExtension) { ... }

Looking at the codebase, I noticed the spotlessPredeclare is not created when the plugin is applied.

// setup the extension
project.getExtensions().create(SpotlessExtension.class, SpotlessExtension.EXTENSION, SpotlessExtensionImpl.class, project);

Maybe it's on purpose and I wonder why, but maybe it's not and maybe this can be added relatively easily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions