diff --git a/app/gradle.properties b/app/gradle.properties
index 6743e4c3e5adf77f974be5bdb2ee07f3719e80fe..3c7a8bd3a5d5b84c8171977826456d6087333fbe 100644
--- a/app/gradle.properties
+++ b/app/gradle.properties
@@ -21,11 +21,3 @@ kotlin.code.style=official
 # resources declared in the library itself and none from the library's dependencies,
 # thereby reducing the size of the R class for that library
 android.nonTransitiveRClass=true
-
-# What an atrocious path, you say.  Well, yes.  It doesn't make a ton of sense
-# to have this checked in.  However, it seems like the other properties here
-# should be checked in and also this setting seems to *have* to go in this
-# file (instead of, say, local.properties).  The devShell provided by the
-# flake will rewrite this path at activation time if it needs to be different!
-# So maybe focus on bigger problems for a while.
-android.aapt2FromMavenOverride=/nix/store/n7mv52lj2alq2gkys0skwwgs6c7s1cyl-androidsdk/libexec/android-sdk/build-tools/31.0.0/aapt2
diff --git a/flake.nix b/flake.nix
index a781c48fc6ce63477899145fb1639e900903aa07..101a6caa310a4cf77361db48269f7ce2dcbaa1f0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -89,10 +89,24 @@
 
       getBuildInputs = getInputs: xs: builtins.foldl' (accum: drv: (getInputs drv) ++ accum) [] xs;
 
-      chaquopy-env = mach-nix.mkPython {
-        python = "python39";
-        requirements = ''
-          chaquopy
+      # Make sure gradle uses the aapt2 from our Android SDK.  Otherwise it
+      # downloads one from the internet that doesn't work because it
+      # specifies an interpreter (ld.so) that nothing has ensured will
+      # exist.
+      #
+      # Without this you get a stack of build errors that look a bit like:
+      #
+      # Execution failed for task ':app:processDebugResources'.
+      # > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
+      #    > Failed to transform appcompat-1.3.0.aar (androidx.appcompat:appcompat:1.3.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
+      #       > Execution failed for AarResourcesCompilerTransform: /home/exarkun/.gradle/caches/transforms-3/f5908003b5fc10a9cf0fd543db10ae32/transformed/appcompat-1.3.0.
+      #          > AAPT2 aapt2-7.2.1-7984345-linux Daemon #1: Daemon startup failed
+      #            This should not happen under normal circumstances, please file an issue if it does.
+      ANDROIDSDK = "${androidComposition.androidsdk}/libexec/android-sdk";
+      gradle-wrapper = pkgs.writeShellApplication {
+        name = "gradle";
+        text = ''
+        ${pkgs.gradle}/bin/gradle -Pandroid.aapt2FromMavenOverride=${ANDROIDSDK}/build-tools/${buildToolsVersion}/aapt2 "$@"
         '';
       };
     in {
@@ -125,7 +139,7 @@
         name = "nix-native";
         version = "2022.11.09";
 
-        ANDROIDSDK = "${androidComposition.androidsdk}/libexec/android-sdk";
+        inherit ANDROIDSDK;
         ANDROIDNDK = "${ANDROIDSDK}/ndk-bundle";
 
         ANDROID_SDK_ROOT = ANDROIDSDK;
@@ -134,23 +148,8 @@
         # Deprecated but ... :shrug:
         ANDROID_HOME = ANDROIDSDK;
 
-        # Make sure gradle uses the aapt2 from our Android SDK.  Otherwise it
-        # downloads one from the internet that doesn't work because it
-        # specifies an interpreter (ld.so) that nothing has ensures will
-        # exist.
-        #
-        # Without this you get a stack of build errors that look a bit like:
-        #
-        # Execution failed for task ':app:processDebugResources'.                                                                                                                        #
-        # > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
-        #    > Failed to transform appcompat-1.3.0.aar (androidx.appcompat:appcompat:1.3.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
-        #       > Execution failed for AarResourcesCompilerTransform: /home/exarkun/.gradle/caches/transforms-3/f5908003b5fc10a9cf0fd543db10ae32/transformed/appcompat-1.3.0.
-        #          > AAPT2 aapt2-7.2.1-7984345-linux Daemon #1: Daemon startup failed
-        #            This should not happen under normal circumstances, please file an issue if it does.
-        # GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROIDSDK}/build-tools/${buildToolsVersion}/aapt2";
-
         buildInputs = with pkgs; [
-          gradle
+          gradle-wrapper
           ant
           android-studio
           android-tools
@@ -166,18 +165,6 @@
 
         sdk.dir=${ANDROIDSDK}
         EOF
-
-        sed -i -e 's,aapt2FromMavenOverride=.*,aapt2FromMavenOverride=${ANDROIDSDK}/build-tools/${buildToolsVersion}/aapt2,' app/gradle.properties
-
-        # This probably needs to be set somewhere, but perhaps not here?
-        #
-        # > [CXX5106] NDK was located by using ndk.dir property. This method
-        # > is deprecated and will be removed in a future release. Please delete
-        # > ndk.dir from local.properties and set android.ndkVersion to
-        # > [23.0.7123448] in all native modules in the project.
-        # > https://developer.android.com/r/studio-ui/ndk-dir
-        # android.ndkVersion=${ndkVersion}
-
         '';
       };