I try to create zip-task in Gradle 7 and I want to have different folders for different files.
task myZipTask(type: Zip) {
from 'first/source'
into 'firstFolderInsideZipFile'
from 'second/source'
into 'secondFolderInsideZipFile'
}
It obviously doesn't work like this, but is there a way to implement it?
CodePudding user response:
You should be able to do something like this:
plugins {
id 'java'
}
task myZipTask(type: Zip) {
from('first/source') {
into('firstFolderInsideZipFile')
}
from('second/source') {
into('secondFolderInsideZipFile')
}
}