-
Notifications
You must be signed in to change notification settings - Fork 25.2k
/
Copy pathbuild.gradle
48 lines (42 loc) · 1.52 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
/*
* 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".
*/
configure(childProjects.values()) {
apply plugin: 'base'
/*
* Although these libs are local to Elasticsearch, they can conflict with other similarly
* named libraries when downloaded into a single directory via maven. Here we set the
* name of all libs to begin with the "elasticsearch-" prefix. Additionally, subprojects
* of libs begin with their parents artifactId.
*/
def baseProject = project
def baseArtifactId = "elasticsearch-${it.name}"
base {
archivesName = baseArtifactId
}
subprojects {
apply plugin: 'base'
def subArtifactId = baseArtifactId
def currentProject = project
while (currentProject != baseProject) {
subArtifactId += "-${currentProject.name}"
currentProject = currentProject.parent
}
base {
archivesName = subArtifactId
}
}
// log4j is a hack, and not really a full elasticsearch built jar
if (project.name != 'log4j') {
/*
* All subprojects are java projects using Elasticsearch's standard build
* tools.
*/
apply plugin: 'elasticsearch.build'
}
}