build: add reproducible Nix Android and Wear OS environment

This commit is contained in:
Blendman974 committed 2026-11-06 04:21:21 +01:00
1 parent 6df52021c8
commit 1b2095aa5b
8 files changed
+177

No files matched your search

+8
View File
@@ -162,6 +162,14 @@ tasks.register("prepareFaceclawNativeLibs") {
def faceclawLlamaCppTag = "b10333"
def faceclawFindSdkCmakeDir = {
// NixOS and other managed environments can provide patched host tools.
def explicitCmake = System.getenv("ANDROID_CMAKE_HOME")
if (explicitCmake != null) {
def explicitDir = file(explicitCmake)
if (faceclawHostExecutable(file("$explicitDir/bin"), "cmake").exists()
&& faceclawHostExecutable(file("$explicitDir/bin"), "ninja").exists()) return explicitDir
throw new GradleException("ANDROID_CMAKE_HOME must contain bin/cmake and bin/ninja: $explicitDir")
}
def sdkRoot = System.getenv("ANDROID_HOME") ?: System.getenv("ANDROID_SDK_ROOT")
if (sdkRoot == null) return null
def cmakeRoot = file("$sdkRoot/cmake")