diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 4dc9b41..3472d4e 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -119,9 +119,17 @@ chaquopy { version = "3.11" pip { - // Pre-built wheels directory (for pydantic-core etc.) - // Must use absolute file:// URI with forward slashes - options("--find-links", "file:///${rootDir.absolutePath.replace("\\", "/")}/wheels/") + // Pre-built wheels directory (for pydantic-core etc.) as an + // absolute file:// URI with forward slashes. Pip requires + // exactly three slashes after `file:` for an empty-host local + // path; the path-normalization differs by platform: + // Windows: absolute path is "C:/..." → prefix "file:///" + // Linux: absolute path is "/..." → prefix "file://" + // Using a fixed "file:///" prefix on both made CI produce + // "file:////workspace/…", which pip rejects as non-local. + val wheelsPath = rootDir.absolutePath.replace("\\", "/") + val wheelsUrlPrefix = if (wheelsPath.startsWith("/")) "file://" else "file:///" + options("--find-links", "$wheelsUrlPrefix$wheelsPath/wheels/") // ── Android-compatible dependencies ───────────────── // Listed explicitly because pyproject.toml includes