36 lines
1.3 KiB
Groovy
36 lines
1.3 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.
|
|
*/
|
|
|
|
subprojects {
|
|
/*
|
|
* All subprojects are java projects using Elasticsearch's standard build
|
|
* tools.
|
|
*/
|
|
apply plugin: 'elasticsearch.build'
|
|
|
|
/*
|
|
* Subprojects may depend on the "core" lib but may not depend on any
|
|
* other libs. This keeps our dependencies simpler.
|
|
*/
|
|
project.afterEvaluate {
|
|
configurations.all { Configuration conf ->
|
|
dependencies.matching { it instanceof ProjectDependency }.all { ProjectDependency dep ->
|
|
Project depProject = dep.dependencyProject
|
|
if (depProject != null
|
|
&& false == depProject.path.equals(':libs:elasticsearch-core')
|
|
&& depProject.path.startsWith(':libs')) {
|
|
throw new InvalidUserDataException("projects in :libs "
|
|
+ "may not depend on other projects libs except "
|
|
+ ":libs:elasticsearch-core but "
|
|
+ "${project.path} depends on ${depProject.path}")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|