diff --git a/.github/workflows/opensearch-observability-test-and-build-workflow.yml b/.github/workflows/opensearch-observability-test-and-build-workflow.yml index 171bd34c6..439f7b8cf 100644 --- a/.github/workflows/opensearch-observability-test-and-build-workflow.yml +++ b/.github/workflows/opensearch-observability-test-and-build-workflow.yml @@ -14,7 +14,7 @@ jobs: # Run all jobs fail-fast: false matrix: - java: [11, 17] + java: [11, 17, 21] runs-on: ubuntu-latest container: # using the same image which is used by opensearch-build team to build the OpenSearch Distribution diff --git a/build-tools/opensearchplugin-coverage.gradle b/build-tools/opensearchplugin-coverage.gradle index de94a5375..51d7f99cd 100644 --- a/build-tools/opensearchplugin-coverage.gradle +++ b/build-tools/opensearchplugin-coverage.gradle @@ -54,8 +54,8 @@ jacocoTestReport { sourceDirectories.from = "src/main/kotlin" classDirectories.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 } } @@ -64,10 +64,7 @@ allprojects{ jacocoTestReport.dependsOn integTest testClusters.integTest { - if (Os.isFamily(Os.FAMILY_WINDOWS)) { - // Replacing build with absolute path to fix the error "error opening zip file or JAR manifest missing : /build/tmp/expandedArchives/..../jacocoagent.jar" - jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}".replace('build',"${buildDir}") - } else { + if (!Os.isFamily(Os.FAMILY_WINDOWS)) { jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}".replace('javaagent:','javaagent:/') } systemProperty 'com.sun.management.jmxremote', "true" diff --git a/build-tools/pkgbuild.gradle b/build-tools/pkgbuild.gradle index 7507461b7..2c261ad60 100644 --- a/build-tools/pkgbuild.gradle +++ b/build-tools/pkgbuild.gradle @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -apply plugin: 'nebula.ospackage' +apply plugin: 'com.netflix.nebula.ospackage' // This is afterEvaluate because the bundlePlugin ZIP task is updated afterEvaluate and changes the ZIP name to match the plugin name afterEvaluate { @@ -39,13 +39,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 'renameDeb' + task renameDeb(type: Copy) { + from("$buildDir/distributions") + into("$buildDir/distributions") + rename "$archiveFileName", "${packageName}-${version}.deb" + doLast { delete file("$buildDir/distributions/$archiveFileName") } + } } } diff --git a/build.gradle b/build.gradle index 8c4b0d32e..3f4eb494c 100644 --- a/build.gradle +++ b/build.gradle @@ -35,13 +35,13 @@ buildscript { classpath "org.opensearch.gradle:build-tools:${opensearch_version}" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}" - classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.22.0" - classpath "org.jacoco:org.jacoco.agent:0.8.8" + classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.4" + classpath "org.jacoco:org.jacoco.agent:0.8.11" } } plugins { - id 'nebula.ospackage' version "8.3.0" + id "com.netflix.nebula.ospackage" version "11.6.0" id "com.dorongold.task-tree" version "1.5" id 'java-library' } @@ -122,7 +122,9 @@ configurations.testImplementation { configurations.all { if (it.state != Configuration.State.UNRESOLVED) return resolutionStrategy { + force "org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}" force "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" + force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}" force "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}" force "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}" force "org.mockito:mockito-core:${versions.mockito}" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 508322917..3499ded5c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists