Skip to content

Task with name 'clean' not found in root project #1023

@ColtonIdle

Description

@ColtonIdle

Filing and closing so that this becomes searchable for others in the future (hopefully helpful if you're inheriting a project that you didn't originally setup)

I originally filed #858 (comment) a while back. The gist was that setting up spotless didn't work out of the box with an android project. There was a "workaround" needed, and now after updating spotless to the latest version the workaround isn't needed anymore so you can return the old code that used to be there.

Workaround:

tasks.named("clean", Delete::class) { delete(rootProject.buildDir) }

Fix: (basically revert to what a standard android app comes with out of the box)

tasks.register("clean", Delete::class) {
    delete(rootProject.buildDir)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions