Skip to content

Commit d68899d

Browse files
committed
Add gradle task to build platform specific distro
This adds the gradle task ':assemblePlatformArchive' that depends on the platform specific distro archive tasks and allows using the same task for building only the archive according to the local platform. This delegates to :distribution:archives:windows-zip:assemble on windows :distribution:archives:linux-tar:assemble on linux :distribution:archives:darwin-tar:assemble on osx Closes #53682
1 parent fb86184 commit d68899d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import org.elasticsearch.gradle.Version
2727
import org.elasticsearch.gradle.VersionProperties
2828
import org.elasticsearch.gradle.info.BuildParams
2929
import org.elasticsearch.gradle.plugin.PluginBuildPlugin
30+
import org.elasticsearch.gradle.OS
3031
import org.gradle.plugins.ide.eclipse.model.AccessRule
3132
import org.gradle.plugins.ide.eclipse.model.SourceFolder
3233
import org.gradle.util.DistributionLocator
@@ -507,6 +508,14 @@ allprojects {
507508
}
508509
}
509510

511+
tasks.register('assemblePlatformArchive') {
512+
def osDependetProjectName = OS.conditionalString().onWindows({"windows-zip"})
513+
.onLinux({"linux-tar"})
514+
.onMac({"darwin-tar"})
515+
.supply()
516+
dependsOn ":distribution:archives:${osDependetProjectName}:assemble"
517+
}
518+
510519
// TODO: remove this once 7.7 is released and the 7.x branch is 7.8
511520
subprojects {
512521
pluginManager.withPlugin('elasticsearch.testclusters') {

0 commit comments

Comments
 (0)