build: support Wear OS release SDK

This commit is contained in:
Blendman974 committed 2026-11-06 01:41:57 +01:00
1 parent a9b0644217
commit 2b14ea38b4
3 files changed
+6 -5

No files matched your search

+4 -3
View File
@@ -1,4 +1,4 @@
{ pkgs, config, ... }: { pkgs, config, lib, ... }:
{ {
languages.javascript = { languages.javascript = {
enable = true; enable = true;
@@ -12,7 +12,7 @@
android = { android = {
enable = true; enable = true;
platforms.version = [ "35" ]; platforms.version = [ "35" ];
buildTools.version = [ "35.0.0" "35.0.1" ]; buildTools.version = [ "34.0.0" "35.0.0" "35.0.1" ];
ndk.enable = true; ndk.enable = true;
ndk.version = [ "27.2.12479018" ]; ndk.version = [ "27.2.12479018" ];
cmake.version = [ ]; cmake.version = [ ];
@@ -22,7 +22,8 @@
}; };
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"; # Keep API 35 aapt2 for phone builds even with Wear's older tools installed.
env.GRADLE_OPTS = lib.mkForce "-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. # NativeScript's doctor rejects a valid build-only SDK without an emulator.
# enterTest below checks the actual tools used by our local builds. # enterTest below checks the actual tools used by our local builds.
env.NS_SKIP_ENV_CHECK = "1"; env.NS_SKIP_ENV_CHECK = "1";
+1 -1
View File
@@ -5,7 +5,7 @@ Install Nix with flakes and devenv, then run `devenv shell` in this directory
The committed `devenv.lock` pins the environment inputs. The committed `devenv.lock` pins the environment inputs.
The environment provides Node 22/npm, Java 21, Android SDK/platform 35, The environment provides Node 22/npm, Java 21, Android SDK/platform 35,
build-tools 35.0.0/35.0.1 (app and NativeScript plugins), NDK 27, CMake, build-tools 34.0.0 (Wear OS) and 35.0.0/35.0.1 (phone and NativeScript plugins), NDK 27, CMake,
Git/GitHub CLI, Python and build utilities. `ANDROID_CMAKE_HOME` selects the Git/GitHub CLI, Python and build utilities. `ANDROID_CMAKE_HOME` selects the
Nix-patched CMake/Ninja pair for the native Android libraries (the SDK's bundled Nix-patched CMake/Ninja pair for the native Android libraries (the SDK's bundled
Ninja can crash on NixOS). Other environments keep using the SDK's CMake. Ninja can crash on NixOS). Other environments keep using the SDK's CMake.
+1 -1
View File
@@ -4,7 +4,7 @@ set -euo pipefail
node --version node --version
java -version java -version
test -f "$ANDROID_HOME/platforms/android-35/android.jar" test -f "$ANDROID_HOME/platforms/android-35/android.jar"
for version in 35.0.0 35.0.1; do for version in 34.0.0 35.0.0 35.0.1; do
"$ANDROID_HOME/build-tools/$version/aapt2" version "$ANDROID_HOME/build-tools/$version/aapt2" version
done done
"$ANDROID_HOME/platform-tools/adb" version "$ANDROID_HOME/platform-tools/adb" version