-
Notifications
You must be signed in to change notification settings - Fork 25.1k
/
Copy pathbuild.gradle
134 lines (122 loc) · 3.17 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/*
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
* License v3.0 only", 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(String distributionType, String os, String architecture, boolean isTestDistro) {
return copySpec {
into("elasticsearch-${version}") {
into('lib') {
with libFiles(os, architecture)
}
into('config') {
dirPermissions {
unix 0750
}
filePermissions {
unix 0660
}
with configFiles(distributionType, isTestDistro)
from {
dirPermissions {
unix 0750
}
jvmOptionsDir.getParent()
}
}
into('bin') {
with binFiles(distributionType, isTestDistro)
}
into("darwin".equals(os) ? 'jdk.app' : 'jdk') {
if (isTestDistro == false) {
with jdkFiles(project, os, architecture)
}
}
into('') {
from {
dirPermissions {
unix 0755
}
logsDir.getParent()
}
}
into('') {
from {
dirPermissions {
unix 0755
}
pluginsDir.getParent()
}
}
from(layout.settingsDirectory.asFile) {
filePermissions {
unix(0644)
}
include 'README.asciidoc'
}
from(layout.settingsDirectory.file('licenses').asFile) {
include isTestDistro ? 'AGPL-3.0+SSPL-1.0+ELASTIC-LICENSE-2.0.txt' : 'ELASTIC-LICENSE-2.0.txt'
filePermissions {
unix(0644)
}
rename { 'LICENSE.txt' }
}
with noticeFile(isTestDistro)
into('modules') {
if (isTestDistro) {
with integTestModulesFiles
} else {
with modulesFiles(os, architecture)
}
}
}
}
}
distribution_archives {
integTestZip {
content {
archiveFiles('zip', null, null, true)
}
}
windowsZip {
archiveClassifier = 'windows-x86_64'
content {
archiveFiles('zip', 'windows', 'x64', false)
}
}
darwinTar {
archiveClassifier = 'darwin-x86_64'
content {
archiveFiles('tar', 'darwin', 'x64', false)
}
}
darwinAarch64Tar {
archiveClassifier = 'darwin-aarch64'
content {
archiveFiles('tar', 'darwin', 'aarch64', false)
}
}
linuxAarch64Tar {
archiveClassifier = 'linux-aarch64'
content {
archiveFiles('tar', 'linux', 'aarch64', false)
}
}
linuxTar {
archiveClassifier = 'linux-x86_64'
content {
archiveFiles('tar', 'linux', 'x64', false)
}
}
}
subprojects {
apply plugin: 'distribution'
apply plugin: 'elasticsearch.internal-distribution-archive-check'
group = "org.elasticsearch.distribution.default"
}