Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions notifications/build-tools/merged-coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,18 @@ allprojects {
}
}

task jacocoMerge(type: JacocoMerge) {
task jacocoReport(type: JacocoReport, group: 'verification') {
description = 'Generates an aggregate report from all subprojects'
gradle.projectsEvaluated {
subprojects.each {
jacocoMerge.dependsOn it.tasks.withType(JacocoReport)
jacocoMerge.executionData it.tasks.withType(JacocoReport).collect { it.executionData }
subprojects.each {
jacocoReport.dependsOn it.tasks.withType(JacocoReport)
jacocoReport.executionData it.tasks.withType(JacocoReport).collect { it.executionData }
}
}
doFirst {
executionData = files(executionData.findAll { it.exists() })
}
}

task jacocoReport(type: JacocoReport, group: 'verification') {
description = 'Generates an aggregate report from all subprojects'
dependsOn jacocoMerge
executionData jacocoMerge.destinationFile

reports {
html.enabled = true // human readable
xml.enabled = true
html.required = true // human readable
xml.required = true
}

gradle.projectsEvaluated {
Expand Down
4 changes: 2 additions & 2 deletions notifications/build-tools/plugin-coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jacocoTestReport {
getSourceDirectories().from(sourceSets.main.allSource)
getClassDirectories().from(sourceSets.main.output)
reports {
html.enabled = true // human readable
xml.enabled = true // for coverlay
html.required = true // human readable
xml.required = true // for coverlay
}
}

Expand Down
2 changes: 1 addition & 1 deletion notifications/core-spi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,5 @@ shadowJar {
relocate 'org.apache.commons.codec', 'org.opensearch.notifications.core.repackage.org.apache.commons.codec'
relocate 'com.amazonaws', 'org.opensearch.notifications.core.repackage.com.amazonaws'
relocate 'software.amazon.ion', 'org.opensearch.notifications.core.repackage.software.amazon.ion'
classifier = null
archiveClassifier.set('')
}
20 changes: 16 additions & 4 deletions notifications/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
id 'jacoco'
id 'maven-publish'
id 'signing'
id 'nebula.ospackage' version "8.5.4"
id "com.netflix.nebula.ospackage" version "11.3.0"
}

repositories {
Expand Down Expand Up @@ -187,7 +187,7 @@ afterEvaluate {
version = "${project.version}" - "-SNAPSHOT"

into '/usr/share/opensearch/plugins'
from(zipTree(bundlePlugin.archivePath)) {
from(zipTree(bundlePlugin.archiveFile)) {
into opensearchplugin.name
}

Expand All @@ -213,13 +213,25 @@ afterEvaluate {

buildRpm {
arch = 'NOARCH'
archiveName "${packageName}-${version}.rpm"
dependsOn 'assemble'
finalizedBy 'renameRpm'
task renameRpm(type: Copy) {
from("$buildDir/distributions")
into("$buildDir/distributions")
rename "$archiveFileName", "${packageName}-${version}.rpm"
doLast { delete file("$buildDir/distributions/$archiveFileName") }
}
}

buildDeb {
arch = 'amd64'
archiveName "${packageName}-${version}.deb"
dependsOn 'assemble'
finalizedBy 'renameRpm'
task renameDeb(type: Copy) {
from("$buildDir/distributions")
into("$buildDir/distributions")
rename "$archiveFileName", "${packageName}-${version}.deb"
doLast { delete file("$buildDir/distributions/$archiveFileName") }
}
}
}
Binary file modified notifications/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion notifications/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 12 additions & 7 deletions notifications/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions notifications/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 17 additions & 6 deletions notifications/notifications/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask
import java.util.concurrent.Callable

plugins {
id 'nebula.ospackage' version "8.5.4"
id "com.dorongold.task-tree" version "2.0"
id "com.dorongold.task-tree" version "2.1.1"
id "com.netflix.nebula.ospackage" version "11.3.0"
}

apply plugin: 'java'
Expand All @@ -21,7 +21,6 @@ apply plugin: 'opensearch.pluginzip'
apply plugin: 'opensearch.testclusters'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'org.jetbrains.kotlin.plugin.allopen'
apply plugin: 'nebula.ospackage'

def usingRemoteCluster = System.properties.containsKey('tests.rest.cluster') || System.properties.containsKey('tests.cluster')
def usingMultiNode = project.properties.containsKey('numNodes')
Expand Down Expand Up @@ -472,13 +471,25 @@ afterEvaluate {

buildRpm {
arch = 'NOARCH'
archiveName "${packageName}-${version}.rpm"
dependsOn 'assemble'
finalizedBy 'renameRpm'
task renameRpm {
from("$buildDir/distributions")
into("$buildDir/distributions")
rename "$archiveFileName", "${packageName}-${version}.rpm"
doLast { delete file("$buildDir/distributions/$archiveFileName") }
}
}

buildDeb {
arch = 'amd64'
archiveName "${packageName}-${version}.deb"
arch = 'all'
dependsOn 'assemble'
finalizedBy 'renameDeb'
task renameDeb(type: Copy) {
from("$buildDir/distributions")
into("$buildDir/distributions")
rename "$archiveFileName", "${packageName}-${version}.deb"
doLast { delete file("$buildDir/distributions/$archiveFileName") }
}
}
}