addArtifact() removed - what do I use instead?

(ben.halton) #1

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

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

(carl.quinn) #2

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



But I have not heard from him.

(Luke Daley) #3

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

(ben.halton) #4

Thanks guys that’s really helpful