Application/Distribution plugin discrepancy

Using 2.5, if I shift from distribution plugin to application plugin, my distribution syntax is rejected. The documentation simply says that application “automatically applies” the distribution plugin, not that it applies a different, undocumented one.

def compositeJarSubprojects = [':P1', ':P2', ':P3'] task compositeJar(type: Jar , dependsOn: compositeJarSubprojects.collect{ it + ":compileJava"}) { baseName = 'composite' from files(compositeJarSubprojects.collect{ project(it).sourceSets.main.output }) }

artifacts {
compositeJar
}

distributions {
main {
baseName = 'cmpst’
contents {
// compositeJar names a jar task and and the artifact produced by the task; it brings in the single jar produced from the classes from a list of subprojects
from(compositeJar)
// this brings in all jars except the jars produced by the subprojects included in the compositeJar
from compositeJarSubprojects.collect{ project(it).configurations.runtime {
exclude serverJarSubprojects.collect{project(it).jar.archiveName }
exclude 'a*.jar’
exclude ‘b*.jar’
} }
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
}

Exception comes from application plugin only: distribution plugin accepts the syntax. Thus it appears that application plugin applies a private, different distribution plugin. The exception occurs with a variety of combinations of lines in the distribution block commented out.

Caused by: org.gradle.api.internal.MissingMethodException: Could not find method distributions() for arguments [build_6mog33379cd2v0ks0zepygbgf$_run_closure4@73e1ec2e] on project ‘:standalone’.
at org.gradle.api.internal.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:68)
at org.gradle.api.internal.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:56)
at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:172)
at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)
at build_6mog33379cd2v0ks0zepygbgf.run(C:…mypath…\standalone\build.gradle:27)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)