Skip to content

Commit ae46517

Browse files
authored
Fix warning in idea gradle sync (elastic#138749) (elastic#138861)
This simplifies the expand map in client:rest to use a simple model that is understood by Idea This api also has a known flaw of memory issues and we use ReplaceTokens already in other places
1 parent b46a4f6 commit ae46517

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

client/rest/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import org.elasticsearch.gradle.internal.precommit.CheckForbiddenApisTask
2020

2121
import org.elasticsearch.gradle.VersionProperties
2222
import org.elasticsearch.gradle.internal.conventions.precommit.LicenseHeadersTask
23+
import org.apache.tools.ant.filters.ReplaceTokens
2324

2425
apply plugin: 'elasticsearch.build'
2526
apply plugin: 'elasticsearch.publish'
@@ -55,9 +56,9 @@ dependencies {
5556
}
5657

5758
tasks.named("processResources").configure {
58-
expand versions: [
59-
elasticsearch: VersionProperties.getElasticsearch()
60-
]
59+
def expansions = [elasticsearch:VersionProperties.getElasticsearch()]
60+
inputs.properties(expansions)
61+
filter(ReplaceTokens, tokens:expansions)
6162
}
6263

6364
tasks.withType(CheckForbiddenApisTask).configureEach {

client/rest/src/main/resources/org/elasticsearch/client/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
elasticsearch-client=${versions.elasticsearch}
18+
elasticsearch-client=@elasticsearch@

0 commit comments

Comments
 (0)