[mock] Create task :mirai-core-mock:buildRuntimeClasspath

This commit is contained in:
Karlatemp 2022-11-25 23:49:34 +08:00
parent 5618333a9d
commit ca840f88be
No known key found for this signature in database
GPG Key ID: BA173CA2B9956C59

View File

@ -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 }