2
votes

I'm developing a game using Game Services and Firebase.

I want to have a debug and release version so I have create two Firebase projects.

From what I have understood and saw :

  • Each new Firebase project create a GCP project linked
  • The right way to get debug and release in Google Play Console Game Services is to link multiple apps
  • In Google Play Console, Game details tab, I can see that my game is linked to GCP project A.

Let's say : project A = debug version and project B = release version

First, in Play Console Game Services I link the app debug version (A), the system create a new entry in OAuth 2.0 Client GCP project A.

But when I want to link the release version (B), the system create a new entry in OAuth 2.0 Client but for the GCP projet A too and not B because the Game is linked to the GCP Project A..


So what is the right way to get two Firebase projects but only one Game in Play Console ?

Can I have two Firebase linked to only one GCP project ?

Should I create two games in Play Console ? One for debug and one for release ?

1

1 Answers

0
votes

I didn't find the perfect solution so I choose to create two games in Play Console, one linked to the GCP/Firebase debug version and one to the release.

I add debug and release Application ID from "Linked apps" to my Gradle buildTypes as resValue so in the AndroidManifest I can use the right APP ID.

build.gradle :

buildTypes {
    release {
        resValue("string", "GAME_SERVICES_APP_ID", '"MyReleaseAppId"')
    }
    debug {
        applicationIdSuffix ".debug"
        resValue("string", "GAME_SERVICES_APP_ID", '"MyDebugAppId"')
    }
}

AndroidManifest :

<meta-data
        android:name="com.google.android.gms.games.APP_ID"
        android:value="@string/GAME_SERVICES_APP_ID" />

I hope that it will be okay when I will go to publish the app !