api / org.gradle.model / ReadOnlyModelViewException

ReadOnlyModelViewException

@Incubating open class ReadOnlyModelViewException : GradleException

Thrown when an attempt is made to change the value of a model element that is not writable at the time.

Constructors

<init>

ReadOnlyModelViewException(message: String)
ReadOnlyModelViewException(path: ModelPath, type: ModelType, ruleDescriptor: ModelRuleDescriptor)

Inheritors

ModelViewClosedException

open class ModelViewClosedException : ReadOnlyModelViewException

Thrown when at attempt is made to mutate a subject of a rule after the rule has completed.

This can potentially happen when a reference to the subject is retained during a rule and then used afterwards, Such as when an anonymous inner class or closure “closes over” the subject.