Files
subtracks/flake.nix
T
austinried 967b733925 update the toolchain, devshell, and build configuration
AGP 9.4.1 / Gradle 9.7.1 / Kotlin 2.3.10 (AGP built-in Kotlin), compileSdk and targetSdk 37, Room 3 with KSP schema export, and nushell/navidrome/gonic in the devshell plus a direnv .envrc. Adds a dedicated :app:integrationTest task and excludes the integration class from the unit test tasks.
2026-10-04 00:29:51 +00:00

65 lines
1.7 KiB
Nix

{
description = "Subtracks - Kotlin/Jetpack Compose Android development shell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs =
{ nixpkgs, ... }:
let
systems = [ "x86_64-linux" ];
forEachSystem = nixpkgs.lib.genAttrs systems;
in
{
devShells = forEachSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
config = {
android_sdk.accept_license = true;
allowUnfree = true;
};
};
android = pkgs.androidenv.composeAndroidPackages {
platformVersions = [ "37" ];
buildToolsVersions = [ "37.0.0" ];
platformToolsVersion = "37.0.1";
includeEmulator = false;
includeSystemImages = false;
includeNDK = false;
includeSources = false;
includeCmake = false;
};
androidSdk = android.androidsdk;
in
{
default = pkgs.mkShell {
packages = [
pkgs.jdk21
pkgs.gradle_9
pkgs.git
pkgs.curl
pkgs.unzip
pkgs.nushell
pkgs.navidrome
pkgs.gonic
androidSdk
android.platform-tools
];
ANDROID_HOME = "${androidSdk}/libexec/android-sdk";
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
shellHook = ''
echo "subtracks dev shell"
echo " java: $(java -version 2>&1 | head -n1)"
echo " ANDROID_HOME: $ANDROID_HOME"
'';
};
}
);
};
}