Hi,

Just to let people know: We usually add API changes like this to the 'breaking changes' wiki page:

http://docs.codehaus.org/display/GRADLE/Gradle+0.9+Breaking+Changes

I try to keep this page up-to-date as soon as the change is committed (sometimes I forget). The javadocs and userguide and the wiki and everything else tends to take a bit longer to get updated.


Steven Devijver wrote:
Hey,

It seems the Jar class doesn't have the merge() method (anymore?):

println jar.metaClass.methods*.name

[equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait, capt ureStandardOutput, compareTo, compareTo, deleteAllActions, dependsOn, dependsOnT askDidWork, disableStandardOutputCapture, doFirst, doLast, equals, execute, getA ctions, getAdditionalProperties, getAnt, getAsDynamicObject, getConvention, getD ependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExe cuted, getExecuter, getInputs, getLogger, getName, getOnlyIf, getOutput, getOutp uts, getPath, getProject, getStandardOutputCapture, getTaskDependencies, hasProp erty, hashCode, injectIntoNewInstance, isEnabled, onlyIf, onlyIf, property, setA ctions, setAdditionalProperties, setConvention, setDependsOn, setDescription, se tDidWork, setEnabled, setExecuter, setName, setOutputHandler, setProject, setPro perty, setStandardOutputCapture, toString, configure, doFirst, doLast, getMetaCl ass, getProperty, invokeMethod, leftShift, setMetaClass, setProperty, convention Mapping, getConventionMapping, setConventionMapping, antDirective, fileSet, file Set, fileSet, fileSet, from, generateArchive, getAllSource, getAppendix, getArch iveName, getArchivePath, getBaseDir, getBaseName, getClassifier, getCreateIfEmpt y, getCustomName, getDestinationDir, getExtension, getMetaClass, getProperty, ge tResourceCollections, getVersion, invokeMethod, isCreateIfEmpty, resourceCollect ions, setAppendix, setBaseDir, setBaseName, setClassifier, setCreateIfEmpty, set CustomName, setDestinationDir, setExtension, setMetaClass, setProperty, setResou rceCollections, setVersion, createAntArchiveTask, getAntZip, setAntZip, zipFileS et, zipFileSet, zipFileSet, zipFileSet, createAntArchiveTask, getAntJar, getFile SetManifest, getManifest, getMetaInfResourceCollections, setAntJar, setFileSetMa nifest, setManifest, setMetaInfResourceCollections, getAllSource, getAntJar, get AntZip, getAppendix, getArchiveName, getArchivePath, getBaseDir, getBaseName, ge tClassifier, getCustomName, getDestinationDir, getExtension, getFileSetManifest, getManifest, getMetaInfResourceCollections, getResourceCollections, getVersion, methodMissing, propertyMissing, propertyMissing, setAntJar, setAntZip, setAppen dix, setBaseDir, setBaseName, setClassifier, setCustomName, setDestinationDir, s etExtension, setFileSetManifest, setManifest, setMetaInfResourceCollections, set
ResourceCollections, setVersion]

Strangely the cookbook does use it:

"Creating a fat jar":

jar.doFirst {
    for(file in configurations.compile) {
        jar.merge(file)
    }
}
http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-Creatingafatjar

The 0.8 groovydoc still has the merge() method:

http://gradle.org/0.8/docs/groovydoc/org/gradle/api/tasks/bundling/AbstractArchiveTask.html#merge(Object[]) <http://gradle.org/0.8/docs/groovydoc/org/gradle/api/tasks/bundling/AbstractArchiveTask.html#merge%28Object%5B%5D%29>

I'm using the latest HEAD:

------------------------------------------------------------
Gradle 0.9-20091026143227+0100
------------------------------------------------------------

Gradle buildtime: maandag 26 oktober 2009 14.32 u. CET
Groovy: 1.6.4
Ant: Apache Ant version 1.7.0 compiled on December 13 2006
Ivy: 2.1.0-rc2
Java: 1.6.0_16
JVM: 14.2-b01
JVM Vendor: Sun Microsystems Inc.
OS Name: Windows XP

Is there supposed to be a merge method or not?

Thanks

Steven


--
Adam Murdoch
Gradle Developer
http://www.gradle.org

Reply via email to