Google Play Games Leaderboard Plugin
Prerequisite
Google Developer Account.
Android Studio
Cordova (version>=5)
Step 1 : Set up you game in Google Developer Console
Step 2 : Create a new Game Services
Step 3 : Add your game's package name under linked apps and you must need the SHA signature for verification
(You can get that by keytool -list -keystore yourkeystore.keystore -alias aliasname)
Step 4 : Add new Leaderboard and copy the Leaderboard Id and APP_ID(12-13 digit number)
Step 5 : Export your game to cordova (uncheck minify scripts)
Step 6 : Create a new cordova project
(cordova create GAMENAME YOURPACKAGE GAMENAME) Package name should be same as you mentioned in Game Services
Step 7 : Head to GAMENAME folder and add cordova leaderboard plugin
(cordova plugin add github.com/princesanjivy/cordova-plugin-leaderboard.git --variable APP_ID=YOUR_APP_ID)
Step 8 : Build for android
(cordova platform add android)
Step 9 : Open the android project file created in Android Studio
Step 10 : Build the signed APK with same keystore
And you can test and publish your game to Play Store
Leaderboard only works with android after build