1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-18 07:45:27 +00:00

potential fix of publish.gradle

This commit is contained in:
InsanusMokrassar 2023-11-05 13:09:29 +06:00
parent cf5cee3e53
commit d7389dfcfe
2 changed files with 15 additions and 0 deletions

BIN
.publish.gradle.swp Normal file

Binary file not shown.

View File

@ -102,4 +102,19 @@ if (project.hasProperty("signing.gnupg.keyName")) {
def signingTasks = project.getTasks().withType(Sign.class)
mustRunAfter(signingTasks)
}
// Workaround to make test tasks use sign
project.getTasks().withType(Sign.class).configureEach { signTask ->
def pubName = signTask.name.removePrefix("sign").removeSuffix("Publication")
// These tasks only exist for native targets, hence findByName() to avoid trying to find them for other targets
// Task ':linkDebugTest<platform>' uses this output of task ':sign<platform>Publication' without declaring an explicit or implicit dependency
tasks.findByName("linkDebugTest$pubName")?.let {
signTask.mustRunAfter(it)
}
// Task ':compileTestKotlin<platform>' uses this output of task ':sign<platform>Publication' without declaring an explicit or implicit dependency
tasks.findByName("compileTestKotlin$pubName")?.let {
signTask.mustRunAfter(it)
}
}
}