Skip to content

Gradle: SourceSets added after plugin loading don't get tasks #138

Closed
@uschindler

Description

@uschindler

I found this by testing Elasticsearch. ES adds a sourceset named "java9", but this does not get tasks setup, so a task named forbiddenApisJava9 is missing.

The reason is that at the time the plugin is applied, the additional sourcesets are not yet defined. Instead of using the standard collect groovy closure, it should use all, which applies a closure to already existing and later added sourcesets: all method of DomainObjectCollection

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions