Bare Expo - building an APK

I have started a new bare minimum expo app. I can run the debug version on iPhone and Android fine, but I cannot figure out how to build an apk, either via command line or via Android studio.

I also want to sign my app.

I have followed instructions here https://facebook.github.io/react-native/docs/signed-apk-android.html#adding-signing-config-to-your-app-s-gradle-config

And I have also tried building by executing

react-native bundle --entry-file index.js --platform ios --dev false --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

cd android

./gradlew clean assembleRelease

Anything I try, I get some gradle errors which basically seems like configuration issues. Also expo seems to use a deprecated gradle version 4.x?

Is there any tutorial that actually works for expo bare apps in 2020?