rodm/gradle-teamcity-plugin

do not create extensions if they might be there already

Closed this issue · 0 comments

You unconditionally do things lke descriptor = extensions.create('descriptor', ServerPluginDescriptor, project), but there might already be an extension with that name and the build will fail.

An example of what I mean is:

configure([project(':server'), project(':serverPre2018.2')]) {
    teamcity {
        server {
            descriptor {
                // stuff for both versions
            }
        }
    }
}

project(':server') {
    teamcity {
        server {
            descriptor {
                allowRuntimeReload true
            }
        }
    }
}

This fails with said exception.