File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -45,21 +45,17 @@ if (project == rootProject) {
4545// we update the version property to reflect if we are building a snapshot or a release build
4646// we write this back out below to load it in the Build.java which will be shown in rest main action
4747// to indicate this being a snapshot build or a release build.
48- File propsFile = project. file(' version.properties' )
49- Properties props = VersionPropertiesLoader . loadBuildSrcVersion(propsFile)
48+ Properties props = VersionPropertiesLoader . loadBuildSrcVersion(project. file(' version.properties' ))
5049version = props. getProperty(" elasticsearch" )
50+
51+ task generateVersionProperties (type : WriteProperties ) {
52+ outputFile = " ${ buildDir} /version.properties"
53+ comment = ' Generated version properties'
54+ properties(props)
55+ }
56+
5157processResources {
52- inputs. file(propsFile)
53- // We need to be explicit with the version because we add snapshot and qualifier to it based on properties
54- inputs. property(" dynamic_elasticsearch_version" , props. getProperty(" elasticsearch" ))
55- doLast {
56- Writer writer = file(" $destinationDir /version.properties" ). newWriter()
57- try {
58- props. store(writer, " Generated version properties" )
59- } finally {
60- writer. close()
61- }
62- }
58+ from(generateVersionProperties)
6359}
6460
6561/* ****************************************************************************
You can’t perform that action at this time.
0 commit comments