142 lines
3.5 KiB
Groovy
142 lines
3.5 KiB
Groovy
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
import java.nio.file.Files
|
|
import java.nio.file.Path
|
|
|
|
apply plugin: 'elasticsearch.internal-distribution-archive-setup'
|
|
|
|
CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String platform, String architecture, boolean oss, boolean jdk) {
|
|
return copySpec {
|
|
into("elasticsearch-${version}") {
|
|
into('lib') {
|
|
with libFiles(oss)
|
|
}
|
|
into('config') {
|
|
dirMode 0750
|
|
fileMode 0660
|
|
with configFiles(distributionType, oss, jdk)
|
|
from {
|
|
dirMode 0750
|
|
jvmOptionsDir.getParent()
|
|
}
|
|
}
|
|
into('bin') {
|
|
with binFiles(distributionType, oss, jdk)
|
|
}
|
|
if (jdk) {
|
|
into("darwin".equals(platform) ? 'jdk.app' : 'jdk') {
|
|
with jdkFiles(project, platform, architecture)
|
|
}
|
|
}
|
|
into('') {
|
|
from {
|
|
dirMode 0755
|
|
logsDir.getParent()
|
|
}
|
|
}
|
|
into('') {
|
|
from {
|
|
dirMode 0755
|
|
pluginsDir.getParent()
|
|
}
|
|
}
|
|
from(rootProject.projectDir) {
|
|
include 'README.asciidoc'
|
|
}
|
|
from(rootProject.file('licenses')) {
|
|
include oss ? 'SSPL-1.0+ELASTIC-LICENSE-2.0.txt' : 'ELASTIC-LICENSE-2.0.txt'
|
|
rename { 'LICENSE.txt' }
|
|
}
|
|
|
|
with noticeFile(oss, jdk)
|
|
into('modules') {
|
|
with modulesFiles
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
distribution_archives {
|
|
integTestZip {
|
|
content {
|
|
archiveFiles(transportModulesFiles, 'zip', null, 'x64', true, false)
|
|
}
|
|
}
|
|
|
|
windowsZip {
|
|
archiveClassifier = 'windows-x86_64'
|
|
content {
|
|
archiveFiles(modulesFiles('windows-x86_64'), 'zip', 'windows', 'x64', false, true)
|
|
}
|
|
}
|
|
|
|
noJdkWindowsZip {
|
|
archiveClassifier = 'no-jdk-windows-x86_64'
|
|
content {
|
|
archiveFiles(modulesFiles('windows-x86_64'), 'zip', 'windows', 'x64', false, false)
|
|
}
|
|
}
|
|
|
|
darwinTar {
|
|
archiveClassifier = 'darwin-x86_64'
|
|
content {
|
|
archiveFiles(modulesFiles('darwin-x86_64'), 'tar', 'darwin', 'x64', false, true)
|
|
}
|
|
}
|
|
|
|
darwinAarch64Tar {
|
|
archiveClassifier = 'darwin-aarch64'
|
|
content {
|
|
archiveFiles(modulesFiles('darwin-aarch64'), 'tar', 'darwin', 'aarch64', false, true)
|
|
}
|
|
}
|
|
|
|
noJdkDarwinTar {
|
|
archiveClassifier = 'no-jdk-darwin-x86_64'
|
|
content {
|
|
archiveFiles(modulesFiles('darwin-x86_64'), 'tar', 'darwin', 'x64', false, false)
|
|
}
|
|
}
|
|
|
|
noJdkDarwinAarch64Tar {
|
|
archiveClassifier = 'no-jdk-darwin-aarch64'
|
|
content {
|
|
archiveFiles(modulesFiles('darwin-aarch64'), 'tar', 'darwin', 'aarch64', false, false)
|
|
}
|
|
}
|
|
|
|
linuxAarch64Tar {
|
|
archiveClassifier = 'linux-aarch64'
|
|
content {
|
|
archiveFiles(modulesFiles('linux-aarch64'), 'tar', 'linux', 'aarch64', false, true)
|
|
}
|
|
}
|
|
|
|
linuxTar {
|
|
archiveClassifier = 'linux-x86_64'
|
|
content {
|
|
archiveFiles(modulesFiles('linux-x86_64'), 'tar', 'linux', 'x64', false, true)
|
|
}
|
|
}
|
|
|
|
noJdkLinuxTar {
|
|
archiveClassifier = 'no-jdk-linux-x86_64'
|
|
content {
|
|
archiveFiles(modulesFiles('linux-x86_64'), 'tar', 'linux', 'x64', false, false)
|
|
}
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
apply plugin: 'distribution'
|
|
apply plugin: 'elasticsearch.internal-distribution-archive-check'
|
|
|
|
group = "org.elasticsearch.distribution.default"
|
|
}
|