Skip to content

Commit f7ac79f

Browse files
authored
[Stable plugin api] Clean up comments and variable names in gradle (#93501)
in example plugins a pluginApiVersion is more appropriate than elasticsearchVersion as it better implies that it can be different then the version of ES cluster
1 parent 60ff86d commit f7ac79f

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

build-tools/src/main/resources/plugin-descriptor.properties

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Elasticsearch plugin descriptor file
2-
# This file must exist as 'plugin-descriptor.properties' inside a plugin.
2+
# This file must exist as 'plugin-descriptor.properties' or 'stable-plugin-descriptor.properties inside a plugin.
33
#
44
### example plugin for "foo"
55
#
@@ -31,7 +31,9 @@ name=${name}
3131
# separated by "."'s and may have leading zeros
3232
java.version=${javaVersion}
3333
#
34-
# 'elasticsearch.version': version of elasticsearch compiled against
34+
# 'elasticsearch.version': version of elasticsearch compiled against.
35+
# Plugins implementing plugin-api.jar this version only has to match a major version of the ES server
36+
# For all other plugins it has to be the same as ES server version
3537
elasticsearch.version=${elasticsearchVersion}
3638
### optional elements for plugins:
3739
<% if (classname) { %>

plugins/examples/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ gradle.rootProject {
2222
def props = new Properties()
2323
props.load(is)
2424
elasticsearchVersion = "${props.get('elasticsearch')}-SNAPSHOT"
25+
// for example plugins the pluginApiVersion is the same as ES version, but for real plugins it only has to match a major
26+
pluginApiVersion = "${props.get('elasticsearch')}-SNAPSHOT"
2527
log4jVersion = props.get('log4j')
2628
luceneVersion = props.get('lucene')
2729
}

plugins/examples/stable-analysis/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ esplugin {
1010
dependencies {
1111

1212
//TODO transitive dependency off and plugin-api dependency?
13-
compileOnly "org.elasticsearch.plugin:elasticsearch-plugin-api:${elasticsearchVersion}"
14-
compileOnly "org.elasticsearch.plugin:elasticsearch-plugin-analysis-api:${elasticsearchVersion}"
13+
compileOnly "org.elasticsearch.plugin:elasticsearch-plugin-api:${pluginApiVersion}"
14+
compileOnly "org.elasticsearch.plugin:elasticsearch-plugin-analysis-api:${pluginApiVersion}"
1515
compileOnly "org.apache.lucene:lucene-analysis-common:${luceneVersion}"
1616

1717
//TODO for testing this also have to be declared
18-
testImplementation "org.elasticsearch.plugin:elasticsearch-plugin-api:${elasticsearchVersion}"
19-
testImplementation "org.elasticsearch.plugin:elasticsearch-plugin-analysis-api:${elasticsearchVersion}"
18+
testImplementation "org.elasticsearch.plugin:elasticsearch-plugin-api:${pluginApiVersion}"
19+
testImplementation "org.elasticsearch.plugin:elasticsearch-plugin-analysis-api:${pluginApiVersion}"
2020
testImplementation "org.apache.lucene:lucene-analysis-common:${luceneVersion}"
2121

2222
testImplementation ('junit:junit:4.13.2'){

0 commit comments

Comments
 (0)