No such property: CustomSpec for class: org.gradle.model.ModelMap

Is there anything that I can do to make it where my users don’t have to define the fully qualified path to a spec? I don’t want them to have to have an import statement either.

Right now I get No such property: CustomSpec for class: org.gradle.model.ModelMap if I don’t specify the full path.

Common way this is done for custom task types (and the same should work for custom model types using the model DSL) is to add an extra property to the project.

ext {
    MyType = com.org.model.MyType
}
1 Like