# Could not create task ':zip'

**URL:** <https://discuss.gradle.org/t/could-not-create-task-zip/48974>\
**Category:** Help/Discuss\
**Created:** [July 23, 2024, 7:23am UTC](https://discuss.gradle.org/t/could-not-create-task-zip/48974 "2024-07-23T07:23:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lajish](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/lajish/32/11187_2.png) [@lajish](https://discuss.gradle.org/u/lajish)\
**Post date:** [July 23, 2024, 7:23am UTC](https://discuss.gradle.org/t/could-not-create-task-zip/48974/1 "2024-07-23T07:23:30Z")

</div>

Hi there,

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

```gradle
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

```gradle
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.

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [July 24, 2024, 7:34pm UTC](https://discuss.gradle.org/t/could-not-create-task-zip/48974/2 "2024-07-24T19:34:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lajish](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/lajish/32/11187_2.png) [@lajish](https://discuss.gradle.org/u/lajish)\
**Post date:** [July 25, 2024, 5:47am UTC](https://discuss.gradle.org/t/could-not-create-task-zip/48974/3 "2024-07-25T05:47:49Z")

</div>

Hi [Björn Kautler](https://discuss.gradle.org/u/Vampire),

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

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

```
