Maxim G's comment referencing another question:
Export unsigned apk from a Gradle Project in Android Studio
lead me to a comment to one of the answers:
The output folder only had debug signed apk for me. This post is how I got a truly unsigned apk: entzeroth.com/export-unsigned-android-apk – Keith Entzeroth
The linked site lead me to the answer, which I suppose I should've figured out myself:
debug {
signingConfig null
}
Hopefully it is self explaning why this yields an unsigned debug build.
I think it is redundant to specify this for other builds, as there is no default signing configuration, only for debug, I think.
In practice, I am doing something slightly different:
if (project.hasProperty('debug_force_unsign') &&
property('debug_force_unsign') == 'true') {
debug {
signingConfig null
}
}
The property 'debug_force_unsign' simply allows me to specify exactly when I want the debug build to be unsigned, which is typically only for debug builds created on my build machine. I execute:
gradlew clean assembleDebug -Pdebug_force_unsign=true
to force the debug build to be unsigned. I then sign it at a later step.
If I didn't do this, my debug builds would be unsigned on my dev machine, and I wouldn't be able to easily install them. Basically, it would break the process that happens when I press the RUN button on my IDE, and slow things down.
There are perhaps easier ways to do this entire process, but this solves my current predicament.