Skip to content

Commit

Permalink
Fix aapt2 on NixOS
Browse files Browse the repository at this point in the history
  • Loading branch information
niknetniko committed Oct 5, 2024
1 parent 888f995 commit 63ba1ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"android-sdk-license"
];
};
aapt2Override = "${androidComposition.androidsdk}/libexec/android-sdk/build-tools/${androidVersions.buildToolsVersions}/aapt2";
in
{
devShells = rec {
Expand All @@ -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";
Expand All @@ -71,7 +72,7 @@
devshell.startup.link.text = ''
mkdir -p "$PRJ_DATA_DIR/.gradle"
cat <<EOF > "$PRJ_DATA_DIR/.gradle/gradle.properties"
org.gradle.jvmargs="$GRADLE_OPTS"
android.aapt2FromMavenOverride=${aapt2Override}
EOF
'';
};
Expand Down

0 comments on commit 63ba1ff

Please sign in to comment.