Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ephemient committed Dec 3, 2024
1 parent b787e79 commit 124eafb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 24 deletions.
34 changes: 15 additions & 19 deletions kt/aoc2024-exe/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -135,25 +135,21 @@ benchmark {
}
}

afterEvaluate {
val jvmBenchBenchmarkJar by tasks.existing
configurations.consumable("jvmBenchmark") {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.LIBRARY))
attribute(
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
objects.named(TargetJvmEnvironment.STANDARD_JVM),
)
attribute(
LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE,
objects.named(LibraryElements.JAR),
)
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME))
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EMBEDDED))
}
outgoing {
capability("com.github.ephemient.aoc2024:aoc2024-bench:1.0")
artifact(jvmBenchBenchmarkJar)
configurations.consumable("jvmBenchmark") {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.LIBRARY))
attribute(
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
objects.named(TargetJvmEnvironment.STANDARD_JVM),
)
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR))
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME))
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EMBEDDED))
}
outgoing {
capability("com.github.ephemient.aoc2024:aoc2024-bench:1.0")
afterEvaluate {
artifact(tasks.named("jvmBenchBenchmarkJar"))
}
}
}
9 changes: 4 additions & 5 deletions kt/graalvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ application {
mainClass.set("com.github.ephemient.aoc2024.exe.Main")
}

val benchmarkDir = layout.buildDirectory
.dir(
"reports/benchmarks/main/" +
LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME).replace(':', '.')
)
val benchmarkDir = layout.buildDirectory.dir(
"reports/benchmarks/main/" +
LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME).replace(':', '.')
)

val benchmark by sourceSets.creating
val benchmarkRun by tasks.registering(JavaExec::class) {
Expand Down

0 comments on commit 124eafb

Please sign in to comment.