Build: Guard adding project substitution for bwc zip with snapshot check (elastic/x-pack-elasticsearch#1485)
We should only be adding a project substitution if the last wire compat
version is a snapshot.
Original commit: elastic/x-pack-elasticsearch@c4a08bd50353f0a28f811d2005d958b79741ee7f
@@ -43,8 +43,9 @@ subprojects {
approvedLicenses = ['Elasticsearch Confidential']
additionalLicense 'ESCON', 'Elasticsearch Confidential', 'ELASTICSEARCH CONFIDENTIAL'
}
+ ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-api:${version}": ':x-pack-elasticsearch:plugin']
+ if (wireCompatVersions[-1].snapshot) {
ext.projectSubstitutions += [
- "org.elasticsearch.plugin:x-pack-api:${version}": ':x-pack-elasticsearch:plugin',
- "org.elasticsearch.plugin:x-pack:${wireCompatVersions[-1]}": ':x-pack-elasticsearch:plugin:bwc-zip'
- ]
+ "org.elasticsearch.plugin:x-pack:${wireCompatVersions[-1]}": ':x-pack-elasticsearch:plugin:bwc-zip']
+ }
}
