Skip to content

Add a way to exclude entire source directories #6

@msrd0

Description

@msrd0

Consider the following source set:

sourceSets {
    main {
        java.srcDirs = ['src/', 'generated/']
        resources.srcDirs = ['res/']
    }
}

Right now, it is not possible to write something like this to exclude the generated/ folder:

license {
    exclude 'generated/**'
}

However, it doesn't make sense to add the license header to the generated source files. The only option right now is either put all generated sources into their own package and exclude that one (only works when your code generator supports this), or by excluding every file on its own, which requires you to know the name of that file.

Can we please have an option to exclude an entire source directory?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions