Hi
I need to create a custom artifact (a zip file) that should contain a collection of txt files and xml descriptor. My project structure is Maven based. The txt files and the xml descriptor are under src/main
I manage to do this using the task below:
task srcZip(type: Zip) {
archiveName project.name + '_' + project.version + '.zip'
destinationDir file('./target')
include '**/**/*'
from 'src/main'
}
The project may have a dependency in one or more artifacts and I want to represent those dependencies using
dependencies {
}
I am not using java plugin - the project has nothing with java.
The dependencies are zip files that contains the same type of txt files that were mentioned above.
Each dependency zip should be unzipped and the txt files should be merged into the artifact zip.
I am using > apply plugin: 'maven-publish'
in order to deploy artifacts to maven repo.
I need a direction/example… Do I have to develop a custom plugin here?
It works fine and it installs the artifact zip at the local Maven repo.
From another gradle build script (the ‘app’ script) I need to:
Consume the artifact[s] (I would like to declare them as dependencies) I just created using the script above.
Each dependency should be unpacked and the source code should be pushed into the final artifact
So the ‘app’ script should be able to declare dependencies (anyway to do it without java plugin?)
It should create a zip with its own sources and add the unpacked dependencies.
I hope I am more clear now with what I need help with.