blob: 9252105ef4f8608473b0cb3267180941aec41988 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
plugins {
id 'java'
id 'distribution'
id "com.github.vlsi.stage-vote-release"
}
description = 'Apache BookKeeper :: Dist (All)'
dependencies {
implementation project(':bookkeeper-benchmark')
implementation project(':bookkeeper-http:http-server')
implementation project(':bookkeeper-http:vertx-http-server')
implementation project(':bookkeeper-server')
implementation project(':bookkeeper-stats-providers:codahale-metrics-provider')
implementation project(':bookkeeper-stats-providers:prometheus-metrics-provider')
implementation project(':bookkeeper-stats')
implementation project(':stream:distributedlog:core')
implementation project(':stream:server')
implementation project(':bookkeeper-tools')
compileOnly depLibs.lombok
compileOnly depLibs.spotbugsAnnotations
implementation depLibs.slf4jLog4j
testCompileOnly depLibs.lombok
annotationProcessor depLibs.lombok
testAnnotationProcessor depLibs.lombok
}
jar {
archiveBaseName = 'bookkeeper-dist-all'
}
releaseArtifacts {
artifact(tasks.named("distTar"))
}
def depLicences = [
"checker-qual-3.5.0/LICENSE",
"google-auth-library-credentials-0.20.0/LICENSE",
"javax.servlet-api-4.0.0/CDDL+GPL-1.1",
"bouncycastle-1.0.2/LICENSE.html",
"jsr-305/LICENSE",
"netty-4.1.63.Final/*",
"paranamer-2.8/LICENSE.txt",
"protobuf-3.14.0/LICENSE",
"protobuf-3.12.0/LICENSE",
"scala-library-2.11.7/LICENSE.md",
"scala-parser-combinators_2.11-1.0.4/LICENSE.md",
"scala-reflect-2.11.8/LICENSE.md",
"slf4j-1.7.25/LICENSE.txt",
]
distributions {
main {
def distname = "bookkeeper-all-${buildVersion}"
distributionBaseName = "${distname}"
contents {
into("/${distname}/conf") {
from("../../conf")
}
into("/${distname}/bin") {
fileMode = 0755
from("../../bin")
from("../../bookkeeper-benchmark/bin")
}
into("/${distname}/deps") {
fileMode = 0644
from("../src/main/resources/deps/") {
include depLicences
}
}
into("/${distname}/") {
fileMode = 0644
from("../../README.md")
from("../src/main/resources/") {
include "*-all.bin.txt"
rename "(.*)-all.bin.txt", '$1'
}
}
into("/${distname}/lib").with {
configurations.runtimeClasspath.resolvedConfiguration.resolvedArtifacts.each {
dep ->
from(dep.file) {
String archiveName;
if (dep.id.componentIdentifier.hasProperty("projectName")) {
def p = project.findProject("${dep.id.componentIdentifier.projectPath}")
p.publishing.publications.matching({
it.artifactId == dep.name
}).each { pub ->
archiveName = "${pub.groupId}-${pub.artifactId}-${pub.version}.jar"
}
} else {
// External dependencies
def id = dep.moduleVersion.id
archiveName = "${id.group}-${id.name}-${id.version}.jar"
}
rename {archiveName}
}
}
from jar
}
}
}
}