Could not create task ':zip'

Hi there,

I am using gradle 8.5.0 and using a task for Zip as below

tasks.register('zip', Zip) {
            from('build/intermediates/dependency-libs')
            into 'jars/'
            include('*.jar', '*.aar')
            archiveName fullVersion + '-dependency.zip'
            destinationDir file('build/outputs/')
        }

On running this task, I am getting below error

Could not create task ':zip'.
   > No signature of method: org.gradle.api.tasks.bundling.Zip.archiveName() is applicable for argument types: (String) values: [development-dependency.zip]

Any help appreciated.

Please do not necropost on hijacked threads, but better create a new thread for only maybe lightly related topics.

What is your actual question?
The error is quite clear, isn’t it?
You try to set archiveName which does not exist (since 8.0) on that task type.

Hi Björn Kautler,

Never mind, I corrected the code and here it is…

tasks.register('zip', Zip) {
            from('build/intermediates/dependency-libs')
            into 'jars/'
            include('*.jar', '*.aar')
            archiveFileName.set fullVersion + '-dependency.zip'
            destinationDirectory.set file('build/outputs/')
        }
1 Like