14 September 2025
Secure your Gradle builds with AppArmor
If you have a Linux system with AppArmor, you can use it to secure your Gradle builds.
Here is how I installed it on Ubuntu Linux:
Make sure you have a Java Development Kit installed.
Set the JAVA_HOME environment variable to point to your JDK by creating a file /etc/profile.d/java.sh with this content:
#!/bin/sh export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 Make a manual installation of Gradle in /opt/gradle.
Make it available in PATH:
$ cd /usr/bin $ sudo ln -s .