New model: HeaderExportingSourceSet cannot be constructed

When I look in the source for LanguageSourceSet and HeaderExportingSourceSet, they are pretty much identical, but I can’t use HeaderExportingSourceSet in my model, why?

They both have a SourceDirectorySet, but just in a different path in the model.

Example:

@Managed interface FruitLanguage extends HeaderExportingSourceSet {}

Gives:

> Exception thrown while executing model rule: juiceComponent(JuiceComponent) { ... } @ build.gradle line 36, column 9 > create(apple)
   > A model element of type: 'FruitLanguage' can not be constructed.
     Its property 'org.gradle.api.file.SourceDirectorySet exportedHeaders' can not be constructed
     It must be one of:
         - A managed type (annotated with @Managed)
         - A managed collection. A valid managed collection takes the form of ModelSet<T> or ModelMap<T> where 'T' is:
             - A managed type (annotated with @Managed)
             - or a type which Gradle is capable of constructing:
                 - org.gradle.platform.base.ApplicationSpec
                 - org.gradle.platform.base.BinarySpec
                 - org.gradle.platform.base.ComponentSpec
                 - FruitLanguage
                 - org.gradle.platform.base.GeneralComponentSpec
                 - JuiceBinarySpec
                 - JuiceComponent
                 - org.gradle.language.base.LanguageSourceSet
                 - org.gradle.platform.base.LibrarySpec

This is Gradle 2.14-rc-1.

1 Like