v1.1.0: Stable!

This commit is contained in:
particle-box
2026-01-13 23:27:32 +05:30
parent dd27ed9450
commit 1bf6335ca2
305 changed files with 13061 additions and 5218 deletions

View File

@@ -245,23 +245,25 @@ val syncTasks = cargoTargets.mapIndexed { index, target ->
dependsOn(cargoTask)
val outputLibName = nativeLibFileName
inputs.property("outputLibName", outputLibName)
val builtLibProvider = providers.provider {
val wslCandidate = File(wslStagingDir, "native/rust/target/${target.triple}/release/libpurrfectsnap.so")
val localCandidate = layout.projectDirectory.file("rust/target/${target.triple}/release/libpurrfectsnap.so").asFile
when {
wslCandidate.exists() -> wslCandidate
localCandidate.exists() -> localCandidate
else -> error("Native library not found for ${target.abi}. Tried $wslCandidate and $localCandidate")
}
val wslCandidate = File(wslStagingDir, "native/rust/target/${target.triple}/release/libpurrfectsnap.so")
val localCandidate = layout.projectDirectory.file("rust/target/${target.triple}/release/libpurrfectsnap.so").asFile
val sourceLibProvider = providers.provider {
if (wslCandidate.exists()) wslCandidate else localCandidate
}
from(builtLibProvider) {
from(sourceLibProvider) {
rename { outputLibName }
}
from(sourceLibProvider) {
rename { "libpurrfectsnap.so" }
}
into(layout.buildDirectory.dir("rustJniLibs/android/${target.abi}"))
inputs.files(builtLibProvider)
inputs.files(sourceLibProvider)
val checksumsDir = layout.buildDirectory.dir("checksums")
doLast {
val file = File(destinationDir, outputLibName)
if (!file.exists()) {
error("Native library not found for ${target.abi}. Expected ${file.absolutePath}")
}
val crc = CRC32()
crc.update(file.readBytes())
val checksumsDirFile = checksumsDir.get().asFile
@@ -334,5 +336,6 @@ tasks.matching { it.name.startsWith("pre") && it.name.endsWith("Build") }.config
}
dependencies {
implementation("androidx.annotation:annotation:1.7.1")
implementation("com.google.code.gson:gson:2.10.1")
}