Merge Nix Android build configuration fixes

This commit is contained in:
Blendman974 committed 2026-11-06 00:11:03 +01:00
commit 66f4147e38
2 files changed
+11 -3

No files matched your search

+6 -1
View File
@@ -6,7 +6,8 @@
};
languages.java = {
enable = true;
jdk.package = pkgs.jdk17;
jdk.package = pkgs.jdk21;
lsp.enable = false;
};
android = {
enable = true;
@@ -22,6 +23,9 @@
packages = with pkgs; [ git gh curl jq ripgrep python3 pkg-config gnumake gcc unzip zip ];
# Gradle's downloaded aapt2 cannot run directly on NixOS.
env.GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${config.env.ANDROID_HOME}/build-tools/35.0.0/aapt2";
# NativeScript's doctor rejects a valid build-only SDK without an emulator.
# enterTest below checks the actual tools used by our local builds.
env.NS_SKIP_ENV_CHECK = "1";
scripts.faceclaw-setup.exec = "npm ci";
scripts.faceclaw-test.exec = "npm test";
enterShell = ''
@@ -32,5 +36,6 @@
java -version
test -f "$ANDROID_HOME/platforms/android-35/android.jar"
test -x "$ANDROID_HOME/build-tools/35.0.0/aapt2"
test -x "$ANDROID_HOME/platform-tools/adb"
'';
}
+5 -2
View File
@@ -4,14 +4,17 @@ Install Nix with flakes and devenv, then run `devenv shell` in this directory
(or `nix run nixpkgs#devenv -- shell`). With direnv, `direnv allow` loads `.envrc`.
The committed `devenv.lock` pins the environment inputs.
The environment provides Node 22/npm, Java 17, Android SDK/platform 35,
The environment provides Node 22/npm, Java 21, Android SDK/platform 35,
build-tools 35.0.0, NDK 27, CMake, Git/GitHub CLI, Python and build utilities.
Android SDK licenses are accepted through `devenv.yaml`. Gradle uses the
Nix-patched SDK aapt2. Gradle itself comes from the repository's wrapper.
The emulator and system images are omitted. `NS_SKIP_ENV_CHECK=1` bypasses
NativeScript doctor's mandatory emulator check; `devenv test` checks the actual
SDK/JDK build prerequisites instead.
Run `faceclaw-setup` (`npm ci`) once, then `faceclaw-test` (`npm test`),
`npm run lint` and `npm run test:kotlin`. `devenv test` checks the environment.
`./build.sh` builds the Android app; it does not install it. On NixOS, any
`bash build.sh` builds the Android app; it does not install it. On NixOS, any
additional downloaded native executables may require the host's nix-ld support.
iOS builds still require macOS/Xcode and are outside this Linux environment.