From 63ba1ffd9f5189971198116b621c05a6e588bb08 Mon Sep 17 00:00:00 2001 From: Niko Strijbol Date: Sat, 5 Oct 2024 21:54:49 +0200 Subject: [PATCH] Fix aapt2 on NixOS --- flake.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 0a85b588e..06c8e793a 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,7 @@ "android-sdk-license" ]; }; + aapt2Override = "${androidComposition.androidsdk}/libexec/android-sdk/build-tools/${androidVersions.buildToolsVersions}/aapt2"; in { devShells = rec { @@ -61,7 +62,7 @@ } { name = "GRADLE_OPTS"; - eval = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidComposition.androidsdk}/libexec/android-sdk/build-tools/${androidVersions.buildToolsVersions}/aapt2"; + eval = "-Pandroid.aapt2FromMavenOverride=${aapt2Override}"; } { name = "GRADLE_HOME"; @@ -71,7 +72,7 @@ devshell.startup.link.text = '' mkdir -p "$PRJ_DATA_DIR/.gradle" cat < "$PRJ_DATA_DIR/.gradle/gradle.properties" - org.gradle.jvmargs="$GRADLE_OPTS" + android.aapt2FromMavenOverride=${aapt2Override} EOF ''; };