addArtifact() removed - what do I use instead?

So addArtifact() was removed in milestone 9, and one of the plugins I use (oneJar) has some code like this:

project.configurations.archives.addArtifact(
[
getClassifier: { -> "standalone" },
getDate: {-> date },
getExtension: {-> "jar" },
getType: {-> "jar" },
getFile: {-> jarFile },
getName: {-> name }
] as PublishArtifact
)

So now the oneJar plugin doesn’t work with the lastest version of Gradle, what can I replace the code above with?

Cheers, Ben

I submitted a pull request to Robert Fischer for a fix that I had made to this problem in the oneJar plugin:

project.configurations.archives.addArtifact(

project.artifacts.add(‘archives’,

But I have not heard from him.

Carl is right, the replacement is ‘artifacts.add’.

Thanks guys that’s really helpful