Skip to content

Commit abc2c04

Browse files
committed
Update build hook to be compatible with Tabris.js 3.0
The target destination of the google-service.json changed with Tabris.js 3.0 which is based on cordova-android 7.x.
1 parent d4da6f4 commit abc2c04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/android/copy_google_services.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
const fs = require('fs');
44

5-
const ANDROID_PLATFORM = 'platforms/android';
5+
const APP_MODULE = 'platforms/android/app';
66
const GOOGLE_SERVICES_JSON = 'google-services.json';
77

88
if (!fs.existsSync(GOOGLE_SERVICES_JSON)) {
99
throw new Error(
1010
'No "google-services.json" file found in /cordova.' +
1111
'Required by plugin "tabris-plugin-firebase" (Android).');
1212
} else {
13-
if (fs.existsSync(ANDROID_PLATFORM) && fs.statSync(ANDROID_PLATFORM).isDirectory()) {
13+
if (fs.existsSync(APP_MODULE) && fs.statSync(APP_MODULE).isDirectory()) {
1414
fs.createReadStream(GOOGLE_SERVICES_JSON)
15-
.pipe(fs.createWriteStream(`${ANDROID_PLATFORM}/${GOOGLE_SERVICES_JSON}`));
15+
.pipe(fs.createWriteStream(`${APP_MODULE}/${GOOGLE_SERVICES_JSON}`));
1616
}
1717
}

0 commit comments

Comments
 (0)