Consider the following simple build:
status = 'release'
apply plugin: 'java'
assert status=='release'
The assertion on the last line would fail, because the Java plugin applies the base plugin (even if it already has been applied once) and the base plugin unconditionally sets the project status to ‘integration’.
This can be difficult to spot in large multi-project builds, and the end result in our case is that the project always publishes to the integration repo.
The culprit is https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/BasePlugin.java#L142
A possible fix would be to change line 142 to:
if (!project.hasProperty('status')) {
project.setProperty("status", "integration");
}