Cannot add rule for model element is already Initialized

software-model

(David Cowden) #1

I’m trying to configure a component added by another plugin. However gradle is telling me the component is already initialized. The component is created by a plugin. Is this by design or am I simply using the wrong (rule creation) syntax?

eg.

apply plugin: 'foo-maker'

model {
    components {
        foo {
            targetPlatform 'another platform'
        }
    }
}

But foo is already Initialized.