From 2fa0250f193517f778ff539d74b458d7be55d359 Mon Sep 17 00:00:00 2001 From: Steve Hannah Date: Sat, 25 Jan 2025 09:15:59 -0800 Subject: [PATCH] chore: [3861] Updated play service ads to version 22.6.0 --- .../java/com/codename1/builders/AndroidGradleBuilder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/AndroidGradleBuilder.java b/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/AndroidGradleBuilder.java index b1ddcf4cd5..eeb1c3f10e 100644 --- a/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/AndroidGradleBuilder.java +++ b/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/AndroidGradleBuilder.java @@ -309,7 +309,7 @@ public File getGradleProjectDirectory() { private static final Map defaultPlayServiceVersions = new HashMap<>(); static { // Defaults obtained from https://developers.google.com/android/guides/setup - defaultPlayServiceVersions.put("ads", "19.8.0"); + defaultPlayServiceVersions.put("ads", "22.6.0"); defaultPlayServiceVersions.put("ads-identifier", "18.0.1"); defaultPlayServiceVersions.put("ads-lite", "21.5.0"); defaultPlayServiceVersions.put("afs-native", "19.0.3"); @@ -1098,6 +1098,9 @@ public boolean build(File sourceZip, final BuildRequest request) throws BuildExc String googlePlayObfuscation = ""; String googleAdUnitId = request.getArg("android.googleAdUnitId", request.getArg("google.adUnitId", null)); String googlePlayAdViewCode = ""; + if (playServicesAds) { + minSDK = maxInt("21", minSDK); + } if (googleAdUnitId != null && googleAdUnitId.length() > 0) { minSDK = maxInt("9", minSDK); googlePlayAdsMetaData = "";