From ca840f88be6f04e2fc7ab42a19edf9a1db96e8f6 Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Fri, 25 Nov 2022 23:49:34 +0800 Subject: [PATCH] [mock] Create task `:mirai-core-mock:buildRuntimeClasspath` --- mirai-core-mock/build.gradle.kts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mirai-core-mock/build.gradle.kts b/mirai-core-mock/build.gradle.kts index 351de933b..bf77fd8c1 100644 --- a/mirai-core-mock/build.gradle.kts +++ b/mirai-core-mock/build.gradle.kts @@ -33,5 +33,18 @@ dependencies { } +tasks.register("buildRuntimeClasspath") { // this task is used for mirai-mock-framework (external) + dependsOn("assemble") + doLast { + val out = temporaryDir.also { it.mkdirs() }.resolve("classpath.txt") + out.bufferedWriter().use { writer -> + configurations["runtimeClasspath"].files.forEach { f -> + writer.write(f.absolutePath) + writer.write("\n") + } + } + } +} + configurePublishing("mirai-core-mock") tasks.named("shadowJar") { enabled = false }