Plugin-publish plugin does not include transitive dependency rules in Pom

I have some transitive dependency excludes in my custom-plugin build script. Like so:

configurations {
    compile.exclude group: 'commons-math3', module: 'commons-math3'
}

dependencies {
    'org.apache.jmeter:ApacheJMeter:2.13',
}

When publishing to plugins.gradle.org using com.gradle.plugin-publish version 0.9.1, the excludes are not propagated to the generated POM:

<dependency>
  <groupId>org.apache.jmeter</groupId>
  <artifactId>ApacheJMeter</artifactId>
  <version>2.13</version>
  <scope>compile</scope>
</dependency>

Is there a workaround? Can I somehow use plugin-publish’s withDependencies extension?

Maven-publish plugin has (or at least, used to have) a similar issue. See here

Can I get a comment from any of the devs please? I feel like this should be a new defect along the lines of https://issues.gradle.org/browse/GRADLE-2945 but for the plugin-publish plugin.

This is actually GRADLE-3274 which also applies to the plugin-publish plugin.

Good to know it’s already in the defect tracker. If there a reason this plugin code is not public? It contains some sort of publishing keys maybe?

There’s nothing really secret in there. It’s simply considered part of the plugin portal ecosystem which is closed source.