Add libsignal-version file

Fixes #1964
This commit is contained in:
AsamK 2026-04-03 11:40:08 +02:00
parent 62fc96c4c9
commit b2bab0d0dc
2 changed files with 15 additions and 0 deletions

View File

@ -146,3 +146,17 @@ tasks.register("fatJar", type = Jar::class) {
}
with(tasks.jar.get())
}
tasks.register("writeLibsignalVersion") {
doLast {
val resolutionResult = configurations.runtimeClasspath.get().incoming.resolutionResult
val libsignalDep =
resolutionResult.allDependencies.find { dep -> dep.requested is ModuleComponentSelector && (dep.requested as ModuleComponentSelector).group == "org.signal" && (dep.requested as ModuleComponentSelector).moduleIdentifier.name == "libsignal-client" }
if (libsignalDep != null) {
val version = (libsignalDep.requested as ModuleComponentSelector).version
file("libsignal-version").writeText(version + "\n")
} else {
throw GradleException("Could not find libsignal-client dependency")
}
}
}

1
libsignal-version Normal file
View File

@ -0,0 +1 @@
0.90.0