lajish
(Lajish Lakshmanan)
July 23, 2024, 7:23am
1
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.
Vampire
(Björn Kautler)
July 24, 2024, 7:34pm
2
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.
lajish
(Lajish Lakshmanan)
July 25, 2024, 5:47am
3
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