chore: align Nix build tooling with Android Kotlin requirements

This commit is contained in:
Blendman974 committed 2026-11-06 00:11:03 +01:00
1 parent 19cf564251
commit 096510f5ad
2 files changed
+11 -3

No files matched your search

+6 -1
View File
@@ -6,7 +6,8 @@
}; };
languages.java = { languages.java = {
enable = true; enable = true;
jdk.package = pkgs.jdk17; jdk.package = pkgs.jdk21;
lsp.enable = false;
}; };
android = { android = {
enable = true; enable = true;
@@ -22,6 +23,9 @@
packages = with pkgs; [ git gh curl jq ripgrep python3 pkg-config gnumake gcc unzip zip ]; packages = with pkgs; [ git gh curl jq ripgrep python3 pkg-config gnumake gcc unzip zip ];
# Gradle's downloaded aapt2 cannot run directly on NixOS. # 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"; 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-setup.exec = "npm ci";
scripts.faceclaw-test.exec = "npm test"; scripts.faceclaw-test.exec = "npm test";
enterShell = '' enterShell = ''
@@ -32,5 +36,6 @@
java -version java -version
test -f "$ANDROID_HOME/platforms/android-35/android.jar" test -f "$ANDROID_HOME/platforms/android-35/android.jar"
test -x "$ANDROID_HOME/build-tools/35.0.0/aapt2" 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`. (or `nix run nixpkgs#devenv -- shell`). With direnv, `direnv allow` loads `.envrc`.
The committed `devenv.lock` pins the environment inputs. 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. 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 Android SDK licenses are accepted through `devenv.yaml`. Gradle uses the
Nix-patched SDK aapt2. Gradle itself comes from the repository's wrapper. 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`), Run `faceclaw-setup` (`npm ci`) once, then `faceclaw-test` (`npm test`),
`npm run lint` and `npm run test:kotlin`. `devenv test` checks the environment. `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. additional downloaded native executables may require the host's nix-ld support.
iOS builds still require macOS/Xcode and are outside this Linux environment. iOS builds still require macOS/Xcode and are outside this Linux environment.