Skip to content

Commit 675aa0a

Browse files
authored
GMA SDK major version update 7.0.0 (#1369)
* Fix Native Ads templates * Updated iOS project, updated inline banner ad unit in example app * Correctly set new low bounds for Flutter and Dart versions * Updated minSdk for Android to make it compatible with Flutter versions * Format fix * Added more contraints on Native Ad template to avoid unexpected button behaviors * Made the release a major release (7.0.0) * Updated Android GMA SDK to 24.9.0 * Modified layout contraints to let CTA button in Native Ad to not be pushed away
1 parent 728de54 commit 675aa0a

File tree

62 files changed

+3442
-2926
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3442
-2926
lines changed

packages/google_mobile_ads/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 7.0.0
2+
* Added character limits expected for Native Ad Templates. Issues [1243](https://github.com/googleads/googleads-mobile-flutter/issues/1243) and [1332](https://github.com/googleads/googleads-mobile-flutter/issues/1332)
3+
* Fixed padding for Native Ads small template. [Issue 1357](https://github.com/googleads/googleads-mobile-flutter/issues/1357)
4+
* Updated to use Gradle plugin 9.2.1 [Issue 1361](https://github.com/googleads/googleads-mobile-flutter/issues/1361)
5+
* Updates dependencies. [Issue 1366](https://github.com/googleads/googleads-mobile-flutter/issues/1366)
6+
* Updates GMA [Android](https://developers.google.com/admob/android/rel-notes) dependency to 24.9.0
7+
* Updates GMA [iOS](https://developers.google.com/admob/ios/rel-notes) dependency to 12.14.0
8+
* Uses latest UMP SDK:
9+
* [Android](https://developers.google.com/admob/android/privacy/release-notes) UMP SDK version 4.0.0.
10+
* [iOS](https://developers.google.com/admob/ios/privacy/download#release_notes) UMP SDK version 3.1.0.
11+
112
## 6.0.0
213
* Updates minimum Flutter SDK to 3.27.0
314
* Updates Dart SDK low bound to 3.6.0.

packages/google_mobile_ads/android/build.gradle

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
group 'io.flutter.plugins.googlemobileads'
2-
version '6.0.0'
2+
version '7.0.0'
33

44
buildscript {
5+
ext {
6+
agp_version = '8.13.1'
7+
}
58
repositories {
69
google()
710
mavenCentral()
811
}
912

1013
dependencies {
11-
classpath 'com.android.tools.build:gradle:8.3.2'
14+
classpath "com.android.tools.build:gradle:$agp_version"
1215
}
1316
}
1417

@@ -22,29 +25,29 @@ rootProject.allprojects {
2225
apply plugin: 'com.android.library'
2326

2427
android {
25-
compileSdk 35
28+
compileSdk 36
2629

2730
if (project.android.hasProperty('namespace')) {
2831
namespace 'io.flutter.plugins.googlemobileads'
2932
}
3033

3134
defaultConfig {
32-
minSdk 23
35+
minSdk 24
3336
}
3437
lintOptions {
3538
disable 'InvalidPackage'
3639
}
3740
dependencies {
38-
api 'com.google.android.gms:play-services-ads:24.1.0'
39-
implementation 'com.google.android.ump:user-messaging-platform:3.2.0'
40-
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
41-
implementation 'androidx.lifecycle:lifecycle-process:2.6.2'
42-
implementation 'com.google.errorprone:error_prone_annotations:2.16'
41+
api 'com.google.android.gms:play-services-ads:24.9.0'
42+
implementation 'com.google.android.ump:user-messaging-platform:4.0.0'
43+
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
44+
implementation 'androidx.lifecycle:lifecycle-process:2.10.0'
45+
implementation 'com.google.errorprone:error_prone_annotations:2.44.0'
4346
testImplementation 'junit:junit:4.13.2'
4447
testImplementation 'org.hamcrest:hamcrest:3.0'
45-
testImplementation 'org.mockito:mockito-core:5.15.2'
46-
testImplementation 'org.robolectric:robolectric:4.14.1'
47-
testImplementation 'androidx.test:core:1.5.0'
48+
testImplementation 'org.mockito:mockito-core:5.20.0'
49+
testImplementation 'org.robolectric:robolectric:4.16'
50+
testImplementation 'androidx.test:core:1.7.0'
4851
}
4952
testOptions {
5053
unitTests {
@@ -54,15 +57,11 @@ android {
5457
}
5558

5659
afterEvaluate {
57-
def containsEmbeddingDependencies = false
58-
for (def configuration : configurations.all) {
59-
for (def dependency : configuration.dependencies) {
60-
if (dependency.group == 'io.flutter' &&
60+
def containsEmbeddingDependencies = configurations.any { configuration ->
61+
configuration.dependencies.any { dependency ->
62+
dependency.group == 'io.flutter' &&
6163
dependency.name.startsWith('flutter_embedding') &&
62-
dependency.isTransitive()) {
63-
containsEmbeddingDependencies = true
64-
break
65-
}
64+
(dependency instanceof ModuleDependency && dependency.isTransitive())
6665
}
6766
}
6867
if (!containsEmbeddingDependencies) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sat May 13 14:37:03 CEST 2023
1+
#Thu Dec 04 10:45:11 PST 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

packages/google_mobile_ads/android/src/main/java/io/flutter/plugins/googlemobileads/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/** Constants used in the plugin. */
1818
public class Constants {
1919
/** Version request agent. Should be bumped alongside plugin versions. */
20-
public static final String REQUEST_AGENT_PREFIX_VERSIONED = "Flutter-GMA-6.0.0";
20+
public static final String REQUEST_AGENT_PREFIX_VERSIONED = "Flutter-GMA-7.0.0";
2121
/** Prefix for news template */
2222
public static final String REQUEST_AGENT_NEWS_TEMPLATE_PREFIX = "News";
2323

packages/google_mobile_ads/android/src/main/res/layout/gnt_medium_template_view.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
android:layout_width="match_parent"
8787
android:layout_height="@dimen/gnt_no_size"
8888
android:layout_weight="0.5"
89+
android:maxLength="25"
8990
android:gravity="left"
9091
android:background="@android:color/transparent"
9192
app:layout_constraintBottom_toTopOf="@+id/row_two"
@@ -197,17 +198,21 @@
197198
android:paddingBottom="@dimen/gnt_default_margin"
198199
android:paddingLeft="@dimen/gnt_default_margin"
199200
android:id="@+id/body"
201+
android:maxLength="90"
202+
android:maxLines="2"
203+
android:ellipsize="end"
200204
app:layout_constraintBottom_toTopOf="@+id/cta"
201205
app:layout_constraintEnd_toEndOf="parent"
202206
app:layout_constraintStart_toStartOf="parent"
203207
app:layout_constraintTop_toBottomOf="@id/middle"
208+
app:layout_constraintHeight_max="50dp"
204209
android:paddingStart="@dimen/gnt_default_margin"
205210
android:layout_marginBottom="@dimen/gnt_small_margin"
206211
/>
207212
<androidx.appcompat.widget.AppCompatButton
208213
android:id="@+id/cta"
209214
android:layout_width="match_parent"
210-
android:layout_height="0dp"
215+
android:layout_height="wrap_content"
211216
android:background="@color/gnt_blue"
212217
android:textColor="@color/gnt_white"
213218
android:layout_marginLeft="5dp"
@@ -217,7 +222,7 @@
217222
app:layout_constraintBottom_toBottomOf="parent"
218223
app:layout_constraintEnd_toEndOf="parent"
219224
app:layout_constraintStart_toStartOf="parent"
220-
app:layout_constraintTop_toBottomOf="@id/body"
225+
app:layout_constraintHeight_max="50dp"
221226
app:layout_constraintHeight_min="35dp"
222227
/>
223228

packages/google_mobile_ads/android/src/main/res/layout/gnt_small_template_view.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
<androidx.constraintlayout.widget.ConstraintLayout
1919
android:layout_width="@dimen/gnt_no_size"
2020
android:layout_height="@dimen/gnt_no_size"
21-
android:layout_marginEnd="@dimen/gnt_default_margin"
22-
android:layout_marginStart="@dimen/gnt_default_margin"
23-
android:layout_marginTop="@dimen/gnt_default_margin"
24-
android:layout_marginBottom="@dimen/gnt_default_margin"
21+
android:paddingEnd="@dimen/gnt_default_margin"
22+
android:paddingStart="@dimen/gnt_default_margin"
23+
android:paddingTop="@dimen/gnt_default_margin"
24+
android:paddingBottom="@dimen/gnt_default_margin"
2525
app:layout_constraintDimensionRatio="H,4:1"
2626
app:layout_constraintEnd_toEndOf="parent"
2727
app:layout_constraintStart_toStartOf="parent"
@@ -65,6 +65,7 @@
6565
android:layout_width="match_parent"
6666
android:layout_height="@dimen/gnt_no_size"
6767
android:layout_weight="@dimen/gnt_text_row_weight"
68+
android:maxLength="25"
6869
app:layout_constraintBottom_toTopOf="@+id/row_two"
6970
app:layout_constraintEnd_toEndOf="parent"
7071
app:layout_constraintStart_toStartOf="parent"

packages/google_mobile_ads/example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if (flutterVersionName == null) {
2323
}
2424

2525
android {
26-
compileSdk 35
26+
compileSdk 36
2727

2828
namespace 'io.flutter.plugins.googlemobileadsexample'
2929

@@ -33,7 +33,7 @@ android {
3333

3434
defaultConfig {
3535
applicationId "io.flutter.plugins.googlemobileadsexample"
36-
minSdkVersion 23
36+
minSdkVersion flutter.minSdkVersion
3737
targetSdkVersion 34
3838
versionCode flutterVersionCode.toInteger()
3939
versionName flutterVersionName
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
org.gradle.jvmargs=-Xmx1536M
1+
org.gradle.jvmargs=-Xmx4G
22
android.enableJetifier=true
33
android.useAndroidX=true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sat May 13 14:40:00 CEST 2023
1+
#Tue Nov 25 09:25:58 PST 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

packages/google_mobile_ads/example/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.3.2" apply false
22-
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
21+
id "com.android.application" version "8.13.1" apply false
22+
id "org.jetbrains.kotlin.android" version "2.2.21" apply false
2323
}
2424

2525
include ":app"

0 commit comments

Comments
 (0)