Skip to content

Commit

Permalink
Configure install task and add to assemble task
Browse files Browse the repository at this point in the history
Signed-off-by: Hai Yan <[email protected]>
  • Loading branch information
oeyh committed Sep 16, 2022
1 parent a452485 commit 7aff8a1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
12 changes: 11 additions & 1 deletion release/archives/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ subprojects {
def distName = "${platform}${architecture}" //eg linuxarm64
def distNameWithJDK = "${distName}WithJDK"
def downloadJDKTask = "download${architecture}JDK"
def installTaskName = "install${distName.capitalize()}Dist"

//This adds two distributions for each supported architecture e.g. linuxarm64DistTar, linuxarm64WithJDKDistTar
distributions {
Expand Down Expand Up @@ -66,6 +67,12 @@ subprojects {
project.version = ""
}

tasks.getByName(installTaskName) {
dependsOn ':release:releasePrerequisites'
}

assemble.dependsOn(installTaskName)

//Adds one task per supported architecture for downloading appropriate JDK e.g. downloadarm64JDK
tasks.create("${downloadJDKTask}") {
doLast {
Expand All @@ -78,6 +85,10 @@ subprojects {
}
}

tasks.withType(Zip) {
enabled false
}

tasks.withType(Tar) {
dependsOn ':release:releasePrerequisites'
compression = Compression.GZIP
Expand Down Expand Up @@ -123,7 +134,6 @@ subprojects {
}
}


CopySpec archiveToTar() {
return copySpec {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
Expand Down
4 changes: 2 additions & 2 deletions release/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ allprojects {
}

dependencies {
implementation project(':data-prepper-core')
implementation project(':data-prepper-main')
}
}

Expand All @@ -44,4 +44,4 @@ task releasePrerequisites {
dependsOn 'buildMain'
dependsOn 'endToEndTests'
dependsOn 'benchmarkTests'
}
}
12 changes: 5 additions & 7 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ pluginManagement {

rootProject.name = 'opensearch-data-prepper'

if(startParameter.getProjectProperties().containsKey('release')){
include 'release'
include 'release:archives'
include 'release:archives:linux'
include 'release:docker'
include 'release:maven'
}
include 'data-prepper-api'
include 'data-prepper-plugins'
include 'data-prepper-core'
Expand Down Expand Up @@ -56,3 +49,8 @@ include 'data-prepper-plugins:s3-source'
include 'data-prepper-plugins:csv-processor'
include 'data-prepper-plugins:parse-json-processor'
include 'data-prepper-plugins:trace-peer-forwarder-processor'
include 'release'
include 'release:archives'
include 'release:archives:linux'
include 'release:docker'
include 'release:maven'

0 comments on commit 7aff8a1

Please sign in to comment.