diff --git a/CHANGELOG.md b/CHANGELOG.md index dffc2cbc3..5a0b3a60a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `org.json4s:json4s-jackson_2.12` from 4.0.6 to 4.0.7 ### Changed -- Update Gradle to 8.5 ([#377](https://github.com/opensearch-project/opensearch-hadoop/pull/377)) +- Update Gradle to 8.5 ([#377](https://github.com/opensearch-project/opensearch-hadoop/pull/377), [#386](https://github.com/opensearch-project/opensearch-hadoop/pull/386)) ### Deprecated diff --git a/buildSrc/src/main/groovy/org/opensearch/hadoop/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/opensearch/hadoop/gradle/BuildPlugin.groovy index f64437f06..d39e73f0c 100644 --- a/buildSrc/src/main/groovy/org/opensearch/hadoop/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/opensearch/hadoop/gradle/BuildPlugin.groovy @@ -679,7 +679,7 @@ class BuildPlugin implements Plugin { // Set the pom's destination to the distribution directory project.tasks.withType(GenerateMavenPom).all { GenerateMavenPom pom -> if (pom.name == "generatePomFileFor${publication.name.capitalize()}Publication") { - pom.destination = project.provider({"${project.buildDir}/poms/${project.base.archivesName}-${project.getVersion()}.pom"}) + pom.destination = project.provider({"${project.buildDir}/poms/${project.base.archivesName.get()}-${project.getVersion()}.pom"}) } } @@ -738,7 +738,7 @@ class BuildPlugin implements Plugin { private static void updateVariantPomLocationAndArtifactId(Project project, MavenPublication publication, SparkVariant variant) { // Add variant classifier to the pom file name if required String classifier = variant.shouldClassifySparkVersion() && variant.isDefaultVariant() == false ? "-${variant.getName()}" : '' - String filename = "${project.base.archivesName}_${variant.scalaMajorVersion}-${project.getVersion()}${classifier}" + String filename = "${project.base.archivesName.get()}_${variant.scalaMajorVersion}-${project.getVersion()}${classifier}" // Fix the pom name project.tasks.withType(GenerateMavenPom).all { GenerateMavenPom pom -> if (pom.name == "generatePomFileFor${publication.name.capitalize()}Publication") { @@ -749,7 +749,7 @@ class BuildPlugin implements Plugin { publication.getPom().withXml { XmlProvider xml -> Node root = xml.asNode() Node artifactId = (root.get('artifactId') as NodeList).get(0) as Node - artifactId.setValue("${project.base.archivesName}_${variant.scalaMajorVersion}") + artifactId.setValue("${project.base.archivesName.get()}_${variant.scalaMajorVersion}") } } diff --git a/dist/build.gradle b/dist/build.gradle index d73ce7ddb..ef7269159 100644 --- a/dist/build.gradle +++ b/dist/build.gradle @@ -145,7 +145,7 @@ publishing { repository.appendNode('url', 'https://clojars.org/repo') // Correct the artifact Id, otherwise it is listed as 'dist' - root.get('artifactId').get(0).setValue(project.base.archivesName) + root.get('artifactId').get(0).setValue(project.base.archivesName.get()) } } }