Publishing plugin crashes when combined with maven-publish

(Paul de Vrieze) #1

The publish plugin breaks in the case that the maven-publish plugin (or the bintray publish plugin) is present. It complains that the method “org.apache.maven.model.Dependency.getOptional()Ljava/lang/String” cannot be found. It is likely a version conflict in loaded maven model classes. This is on gradle 2.12

Other relevant plugins:

    id "com.jfrog.bintray" version "1.6"
    id "com.gradle.plugin-publish" version "0.9.4"

The entire script is on github:

(Eric Wendelin) #2

This is a bug with the publishing plugin.

I will increase the priority of it, but in the meantime you can fix it by switching the order of your plugins like so:

 plugins {
     id "com.gradle.plugin-publish" version "0.9.4"
     id "com.jfrog.bintray" version "1.6"


(Marco Vermeulen) #3

Created new issue GRADLE-3516.

(Marco Vermeulen) #4

Issue GRADLE-3516 has been fixed and has gone out as part of release 0.9.5 of the Plugin Publish plugin. Please see the Plugin Portal page for this plugin for more details.