Skip to content

Commit

Permalink
Patch Hadoop Client API also in JMH builds
Browse files Browse the repository at this point in the history
  • Loading branch information
lbulej committed Oct 9, 2024
1 parent f786eaf commit 6d955f2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ lazy val generatePatchedHadoopClientApiJar = taskKey[Seq[File]](
"allows running with GraalVM Native Image."
)

renaissance / generatePatchedHadoopClientApiJar :=
def generatePatchedHadoopClientApiJarTask = {
Def.task {
val log = sLog.value
val targetDir = (Compile / target).value / "patched"
Expand All @@ -793,7 +793,8 @@ renaissance / generatePatchedHadoopClientApiJar :=
patchedJar
}
}
}.value
}
}

//
// Tasks related to generating metadata-only jars for benchmarks.
Expand Down Expand Up @@ -909,6 +910,7 @@ lazy val renaissance = (project in file("."))
name := "renaissance",
// Reflect the distribution license in the package name.
moduleName := name.value + "-" + (if (nonGplOnly.value) "mit" else "gpl"),
generatePatchedHadoopClientApiJar := generatePatchedHadoopClientApiJarTask.value,
inConfig(Compile)(
Seq(
// The main class for the JAR is the Launcher from the core package.
Expand Down Expand Up @@ -1078,6 +1080,7 @@ lazy val renaissanceJmh = (project in file("renaissance-jmh"))
"org.openjdk.jmh" % "jmh-generator-bytecode" % jmhVersion,
"org.openjdk.jmh" % "jmh-generator-reflection" % jmhVersion
),
generatePatchedHadoopClientApiJar := generatePatchedHadoopClientApiJarTask.value,
inConfig(Compile)(
Seq(
// Split result from the JMH generator task between sources and resources.
Expand All @@ -1104,7 +1107,7 @@ lazy val renaissanceJmh = (project in file("renaissance-jmh"))
// Include benchmark dependency JAR files in the output JAR.
packageBin / mappings ++= mapModuleDependencyJarsToAssemblyTask(
renaissanceModules
).value
).dependsOn(generatePatchedHadoopClientApiJar).value
)
)
)
Expand Down

0 comments on commit 6d955f2

Please sign in to comment.