Open edloidas opened 3 years ago
A configuration may look like this:
plugins {
// ...
id 'nebula.deb' version '8.4.1'
id 'nebula.rpm' version '8.4.1'
}
// ...
task distDeb( type: Deb, dependsOn: [copyDist, jdk] ) {
description = 'Build full distribution DEB package'
packageName = targetArtifactId()
version = version
arch = 'X86_64'
os = 'LINUX'
from installDir
into archiveBase
}
task distRpm( type: Rpm, dependsOn: [copyDist, jdk] ) {
description = 'Build full distribution RPM package'
packageName = targetArtifactId()
version = version
arch = 'X86_64'
os = 'LINUX'
from installDir
into archiveBase
}
// ...
publishing {
publications {
mavenJava( MavenPublication ) {
artifactId targetArtifactId()
artifact distTar
artifact distDeb
artifact distRpm
}
}
}
There are high-quality plugins from Nebula (Netflix) for creating DED and RPM artifacts. Investigate and add it to the publishing along with other Linux artifacts.