Files
IM-server-new/distribution/build.gradle
T

61 lines
1.3 KiB
Groovy

apply plugin: 'application'
// adds task shadowJar - Create a combined JAR of project and runtime dependencies
description = 'Moquette - distribution'
apply plugin: 'com.github.johnrengelman.shadow'
mainClassName = "io.moquette.integration.Server"
dependencies {
compile project(':moquette-broker')
compile group: 'org.slf4j', name: 'slf4j-log4j12', version:'1.7.5'
}
def packageSet = project.copySpec {
from 'src/main/resources/README.txt'
into ('bin') {
from 'src/main/scripts/'
fileMode=0755
}
into ('lib') {
from "build/libs/${project.name}-${version}.jar"
rename { "moquette-${version}.jar" }
}
into ('lib') {
from configurations.compile
}
into ('config') {
from 'src/main/resources/moquette.conf'
from 'src/main/resources/password_file.conf'
// from 'src/main/resources/acl.conf'
}
into ('config') {
from 'src/main/resources/log4j.properties'
rename { 'moquette-log.properties' }
}
}
task distMoquetteTar(type: Tar) {
archiveName = "moquette-${version}.tar.gz"
destinationDir file('build')
extension 'tar'
compression = Compression.GZIP
with packageSet
}
distMoquetteTar.dependsOn jar
task distMoquetteZip(type: Zip) {
archiveName = "moquette-${version}.zip"
destinationDir file('build')
with packageSet
}
distMoquetteZip.dependsOn jar