From 124eafba0b11bbf3a99948886b2e1dbd8472e64a Mon Sep 17 00:00:00 2001 From: Daniel Lin Date: Tue, 3 Dec 2024 02:07:38 -0500 Subject: [PATCH] Minor tweaks --- kt/aoc2024-exe/build.gradle.kts | 34 +++++++++++++++------------------ kt/graalvm/build.gradle.kts | 9 ++++----- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/kt/aoc2024-exe/build.gradle.kts b/kt/aoc2024-exe/build.gradle.kts index 8e9647c4..a7601d91 100644 --- a/kt/aoc2024-exe/build.gradle.kts +++ b/kt/aoc2024-exe/build.gradle.kts @@ -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")) } } } diff --git a/kt/graalvm/build.gradle.kts b/kt/graalvm/build.gradle.kts index 3e951a90..5a8ae021 100644 --- a/kt/graalvm/build.gradle.kts +++ b/kt/graalvm/build.gradle.kts @@ -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) {