console plan play-games-services: agent-first PGS setup (games project, Android credential with the app-signing SHA-1, web OAuth client, owner's Publish) with absolute Play Console and Google Cloud links, and console verify from the page text
This commit is contained in:
parent
ca7289b173
commit
5a5d7fd4e7
8 changed files with 104 additions and 7 deletions
|
|
@ -19,6 +19,7 @@
|
|||
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
||||
import { join, relative } from 'node:path';
|
||||
import type { Language, Platform, ShipConfig } from './config';
|
||||
import { consoleLink } from './console-links';
|
||||
|
||||
export const GC_FORMATS = ['INTEGER', 'DECIMAL_POINT_1_PLACE', 'DECIMAL_POINT_2_PLACE', 'DECIMAL_POINT_3_PLACE', 'ELAPSED_TIME_CENTISECOND',
|
||||
'ELAPSED_TIME_MINUTE', 'ELAPSED_TIME_SECOND', 'MONEY_POUND_DECIMAL', 'MONEY_POUND', 'MONEY_DOLLAR_DECIMAL', 'MONEY_DOLLAR', 'MONEY_EURO_DECIMAL',
|
||||
|
|
@ -347,8 +348,8 @@ export function pgsFindings(config: Pick<ShipConfig, 'games'>, p: PgsProject, ha
|
|||
if (usesPlayGames(config) && !p.gradle.length)
|
||||
out.push({ level: 'warn', id: 'pgs.gradle', msg: 'games.playGames is set but no Gradle file uses com.google.android.gms:play-services-games-v2', fix: 'add implementation "com.google.android.gms:play-services-games-v2:<version>" to the app module' });
|
||||
if (!p.manifest) out.push({ level: 'error', id: 'pgs.manifest', msg: 'no <meta-data android:name="com.google.android.gms.games.APP_ID"> in AndroidManifest.xml: sign-in fails at runtime', fix: 'add <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/game_services_project_id"/> inside <application>' });
|
||||
else if (!p.appId) out.push({ level: 'error', id: 'pgs.app-id', msg: `the manifest's APP_ID (${p.manifest.value}) points at no string resource with the project id`, fix: 'add res/values/games-ids.xml from Play Console > Play Games Services > Setup and management > Configuration > Get resources' });
|
||||
else if (want && p.appId.value !== String(want)) out.push({ level: 'error', id: 'pgs.app-id', msg: `games_APP_ID ${p.appId.value} (${p.appId.file}) differs from games.playGames.appId ${want}`, fix: 'use the resources of the games project linked to this app (Play Console > Play Games Services > Configuration)' });
|
||||
else if (!p.appId) out.push({ level: 'error', id: 'pgs.app-id', msg: `the manifest's APP_ID (${p.manifest.value}) points at no string resource with the project id`, fix: `add res/values/games-ids.xml from ${consoleLink('play.games-services', '> Get resources')}` });
|
||||
else if (want && p.appId.value !== String(want)) out.push({ level: 'error', id: 'pgs.app-id', msg: `games_APP_ID ${p.appId.value} (${p.appId.file}) differs from games.playGames.appId ${want}`, fix: `use the resources of the games project linked to this app: ${consoleLink('play.games-services')}` });
|
||||
else out.push({ level: 'ok', id: 'pgs.app-id', msg: `games_APP_ID ${p.appId.value} (${p.appId.file})${want ? ' matches the config' : ''}` });
|
||||
if (p.appId && !want) out.push({ level: 'warn', id: 'pgs.config-id', msg: `games.playGames.appId is not set (the project has ${p.appId.value})`, fix: `set games.playGames.appId: "${p.appId.value}"` });
|
||||
return out;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue