When uploading an appbundle build with Flutter to Google Play Console, I received the error message "You uploaded an AppBundle that was signed in Debug mode. You need to sign in Release mode."
I'm using Flutter version 3.29.2, which suggests using build.gradle.kts instead of build.gradle. Both files are present in folder android/app. The build.gradle.kts was edited following the instructions in the Flutter docs, in order to build for release mode.
But flutter build appbundle seems to use the build.gradle even when build.gradle.kts is present. After editing build.gradle, the appbundle is uploaded without an error message.
I wonder where the choice between both build files is registered.