Skip to content

Commit 1fc4f21

Browse files
committed
Update AdMob plugin and build preferences
Upgraded admob-plus-cordova to version 2.0.0-alpha.19 and updated PLAY_SERVICES_VERSION to 23.2.0 in utils/config.js. Changed the clean command from 'yarn clean' to 'npm run clean'. Added GradlePluginKotlinEnabled preference to config.xml for improved Android build compatibility.
1 parent b12eec6 commit 1fc4f21

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

config.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@
3232
<preference name="AndroidLaunchMode" value="singleTask" />
3333
<preference name="prerendered-icon" value="false" />
3434
<preference name="androidxEnabled" value="true" />
35+
<preference name="GradlePluginKotlinEnabled" value="true" />
3536
<preference name="android-targetSdkVersion" value="35" />
3637

37-
38+
3839
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
3940
<application android:networkSecurityConfig="@xml/network_security_config" />
4041
<application android:hardwareAccelerated="true" />

utils/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const exec = promisify(require("node:child_process").exec);
8585
`cordova plugin add cordova-plugin-consent@2.4.0 --save`,
8686
);
8787
await exec(
88-
`cordova plugin add admob-plus-cordova@1.28.0 --save --variable APP_ID_ANDROID="${AD_APP_ID}" --variable PLAY_SERVICES_VERSION="21.5.0"`,
88+
`cordova plugin add admob-plus-cordova@2.0.0-alpha.19 --save --variable APP_ID_ANDROID="${AD_APP_ID}" --variable PLAY_SERVICES_VERSION="23.2.0"`,
8989
);
9090
console.log("DONE! Installing admob-plus-cordova");
9191
} else {
@@ -96,7 +96,7 @@ const exec = promisify(require("node:child_process").exec);
9696
}
9797

9898
console.log(`|--- Reinstalling platform ---|`);
99-
const { stderr } = await exec(`yarn clean`);
99+
const { stderr } = await exec(`npm run clean`);
100100
if (stderr) console.error(stderr);
101101
else console.log("DONE! Reinstalling platform");
102102
})(),

0 commit comments

Comments
 (0)