I am using a Maven repo inside a Gradle build that relies on BasicAuthentication to access its contents. If the credentials are incorrect or missing then the build fails indirectly, due to missing artefacts. However, I would much prefer it if the build could fail immediately in this case, e.g. by throwing an exception. I'm new to Gradle but despite searching the Gradle documentation I can't seem to find such a facility. I am using Gradle v7.1.1 inside Android Studio. Is this possible?