In previous versions of Groovy, when you had multiple setter methods (same name but different parameter types), the method chosen was undefined (it depends on the JVM and order of declaration).
The setProperties(Properties) method was chosen most of the time. In 2.4.x, this fails with:
Caused by: groovy.lang.MissingMethodException: No signature of method: aQute.bnd.osgi.Builder.setProperties() is applicable for argument types: (java.util.LinkedHashMap) values: []
Possible solutions: setProperties(java.io.File), setProperties(java.util.Properties), getProperties(), getProperties(), setProperties(java.io.File, java.io.File), addProperties(java.io.File)
The fix is to convert things to the correct type manually (e.g., builder.properties = properties as Properties) or use Properties as the type coming into the method.
Fixing this doesn't cause incompatibilities with older versions of Groovy/Gradle.
We've updated Gradle to use Groovy 2.4.x (https://docs.gradle.org/2.8-rc-1/release-notes#upgraded-to-groovy-2.4.4).
In previous versions of Groovy, when you had multiple setter methods (same name but different parameter types), the method chosen was undefined (it depends on the JVM and order of declaration).
There's a problem here: https://github.com/TomDmitriev/gradle-bundle-plugin/blob/master/src/main/groovy/org/dm/gradle/plugins/bundle/JarBuilder.groovy#L81
The
setProperties(Properties)
method was chosen most of the time. In 2.4.x, this fails with:The fix is to convert things to the correct type manually (e.g.,
builder.properties = properties as Properties
) or use Properties as the type coming into the method.Fixing this doesn't cause incompatibilities with older versions of Groovy/Gradle.