Integrating GPGS 4.0.0 into new project

When trying to integrate the extension-gpgs-4.0.0 into our project, I’m getting this dependency clash:

Type com.google.android.gms.games.AchievementsClient is defined multiple times:
/tmp/.gradle/unpacked/com.google.android.gms-play-services-games-23.1.0.aar/classes.jar:com/google/android/gms/games/AchievementsClient.class,
/tmp/.gradle/unpacked/com.google.android.gms-play-services-games-v2-20.1.2.aar/classes.jar:com/google/android/gms/games/AchievementsClient.class

However it builds fine if i use extension 3.0.2. The problem is we can’t use V1 of google sign in as that’s now removed for new projects.

I initially thought it was the extension-admob we’re using, but we’re also on the latest version of that (3.7.0).
Any thoughts would be greatly appreciated!

Which dependencies are you using in your project?

So I discovered that it’s the latest versions GameAnalytics & extension_gpgs which cause the dependency clashes… see here

Specifically, it’s these two:

https://github.com/GameAnalytics/GA-SDK-DEFOLD/archive/master.zip
https://github.com/defold/extension-gpgs/archive/master.zip

However using the previous tag stops this clash

https://github.com/GameAnalytics/GA-SDK-DEFOLD/archive/refs/tags/4.2.6.zip

Also extension_gpgs could do with some updating as it’s using play-services-games-v2:20.1.2, but since it’s release 21.0.0 is now required for v2 sign in. I’ve re-packed it for our use.

But we will need to fix this, as we’re actually using AGulev’s fork which is the latest GameAnalytics with OSX removed.

I really recommend that you do not use master.zip as a dependency. We warn against this in multiple places:


A dependency can change at any given time and if you depend on master.zip you always get the latest version and run a risk of incompatible dependencies.

The extension source code is available here: GitHub - defold/extension-gpgs: Defold native extension for Google Play Game Services

We highly appreciate pull request! If not that, then please open a feature request / issue in the repository itself. We will also need to review the release notes to verify that there are no breaking changes.

Which one is that? It is not the one you listed in your dependencies above.

1 Like

Yes absoletely agree, generally we’re linking to specific tags when available. I added those links to try and simplify my post :slight_smile:

We’re linking to the AGulev GameAnalytics fork here - not tags for it though.
https://github.com/AGulev/GA-SDK-DEFOLD/archive/master.zip

No probs- more than happy to make a gpgs PR with my update.

I’ll also make a second PR with GameAnalytics changes once I work out why it’s pulling in old gpgs libs.

Many thanks for responding.

1 Like

:heart: