destinationDir is deprecated/archiveName is deprecated

I use gradle 5.3. The properties above is marked as deprecated. What must I use instead? Is that available in the documentation?

Hello,

If you download Gradle with source code and javadoc and use an IDE, then it should be very easy to access the javadoc. You should be able to pinpoint replacements. Alternatively, you can browse the javadoc online AbstractArchiveTask.getArchiveName.

The info is also in the user guide, although it is not always highlighted that it is featuring the newest API replacing the deprecated one: working with file doc page.

Lastly, the DSL doc pages (example with Zip) may also help to pinpoint replacements.

To answer your question:
destinationDir is replaced by destinationDirectory
archiveName is replaced by archiveFileName

The deprecated API uses File and String while the new API uses the types introduced with the lazy configuration API.

1 Like