Updating Android Studio Gradle Distribution

I was bitten by the infamous

BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60

error while building a React Native app I developed for my employer:

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file '/Volumes/data/home/bigml/weclaire/clairemob/android/settings.gradle' (/Users/sergio/.gradle/caches/6.8.3/scripts/10xp8ypy7gp3jlb1ux3tqqrko).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60

Saying “infamous” because I spent almost one hour reading online how to fix that and — almost incredible to say — I wasted wasted one hour among Android Studio step-by-step help that was not relevant anymore.

Turns out, you just go to ./android/gradle/wrapper/gradle-wrapper.properties and change gradle distributions url, e.g.: distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip.

This will in turn cause a new issue with maven, which is not supported anymore in gradle 7+, so you should make sure you upgrade all dependencies and remove the maven plugin from your project, replacing it with maven-publish. But that is another story.

Year-end encryption export declaration

1. Visit the report generator

2. Fill the data (specify N/A when not sure because it likely does no apply)

3. Choose 5D992 for Export Control Classification Number

4. Select MMKT for Authorization Type