Skip to content

Commit 176d52e

Browse files
malandr2copybara-github
authored andcommitted
Update samples to use gradle 9
PiperOrigin-RevId: 875208915
1 parent d625ebe commit 176d52e

117 files changed

Lines changed: 734 additions & 692 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
1-
apply plugin: "com.android.application"
1+
plugins {
2+
id 'com.android.application'
3+
}
24

35
android {
4-
namespace 'com.google.android.gms.example.appopendemo'
5-
compileSdkVersion 35
6+
namespace = 'com.google.android.gms.example.appopendemo'
7+
compileSdkVersion(35)
68
defaultConfig {
79
applicationId "com.google.android.gms.example.appopendemo"
8-
minSdkVersion 23
9-
multiDexEnabled true
10-
targetSdkVersion 35
11-
versionCode 1
12-
versionName "1.0"
10+
minSdkVersion(23)
11+
multiDexEnabled = true
12+
targetSdkVersion(35)
13+
versionCode(1)
14+
versionName = "1.0"
1315
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1416
}
1517
buildTypes {
1618
release {
17-
minifyEnabled false
18-
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
19+
minifyEnabled = false
20+
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
1921
}
2022
}
2123
}
2224

2325
dependencies {
24-
implementation 'androidx.appcompat:appcompat:1.7.0'
25-
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
26-
implementation "androidx.lifecycle:lifecycle-process:2.8.3"
26+
implementation('androidx.appcompat:appcompat:1.7.0')
27+
implementation('androidx.constraintlayout:constraintlayout:2.1.4')
28+
implementation("androidx.lifecycle:lifecycle-process:2.8.3")
2729

28-
implementation 'com.google.android.gms:play-services-ads:25.0.0'
29-
implementation 'com.google.android.material:material:1.13.0'
30-
implementation 'com.google.android.ump:user-messaging-platform:4.0.0'
30+
implementation('com.google.android.gms:play-services-ads:25.0.0')
31+
implementation('com.google.android.material:material:1.13.0')
32+
implementation('com.google.android.ump:user-messaging-platform:4.0.0')
3133
}

java/admanager/AppOpenExample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
mavenCentral()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.13.0'
9+
classpath 'com.android.tools.build:gradle:9.0.0'
1010
}
1111
}
1212

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https://services.gradle.org/distributions/gradle-8.14.3-all.zip
3+
distributionUrl=https://services.gradle.org/distributions/gradle-9.1.0-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
1-
apply plugin: 'com.android.application'
1+
plugins {
2+
id 'com.android.application'
3+
}
24

35
android {
4-
namespace 'com.google.android.gms.example.bannerexample'
5-
compileSdkVersion 35
6+
namespace = 'com.google.android.gms.example.bannerexample'
7+
compileSdkVersion(35)
68
defaultConfig {
79
applicationId "com.google.android.gms.example.bannerexample"
8-
minSdkVersion 23
9-
multiDexEnabled true
10-
targetSdkVersion 35
11-
versionCode 1
12-
versionName "1.0"
10+
minSdkVersion(23)
11+
multiDexEnabled = true
12+
targetSdkVersion(35)
13+
versionCode(1)
14+
versionName = "1.0"
1315
}
1416
buildTypes {
1517
release {
16-
minifyEnabled false
17-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
minifyEnabled = false
19+
proguardFiles(getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro')
1820
}
1921
}
2022
}
2123

2224
dependencies {
23-
implementation 'androidx.appcompat:appcompat:1.2.0'
24-
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
25-
implementation 'com.google.android.gms:play-services-ads:25.0.0'
26-
implementation 'com.google.android.material:material:1.13.0'
27-
implementation 'com.google.android.ump:user-messaging-platform:4.0.0'
25+
implementation('androidx.appcompat:appcompat:1.2.0')
26+
implementation('androidx.constraintlayout:constraintlayout:2.2.1')
27+
implementation('com.google.android.gms:play-services-ads:25.0.0')
28+
implementation('com.google.android.material:material:1.13.0')
29+
implementation('com.google.android.ump:user-messaging-platform:4.0.0')
2830
}

java/admanager/BannerExample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
mavenCentral()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.13.0'
9+
classpath 'com.android.tools.build:gradle:9.0.0'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files

java/admanager/BannerExample/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
1515
# This option should only be used with decoupled projects. More details, visit
1616
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1717
# org.gradle.parallel=true
18-
android.enableJetifier=true
1918
android.useAndroidX=true
2019
org.gradle.warning.mode=all

java/admanager/BannerExample/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https://services.gradle.org/distributions/gradle-8.14.3-all.zip
6+
distributionUrl=https://services.gradle.org/distributions/gradle-9.1.0-all.zip
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
apply plugin: 'com.android.application'
1+
plugins {
2+
id 'com.android.application'
3+
}
24

35
android {
4-
namespace 'com.google.android.gms.example.interstitialexample'
5-
compileSdkVersion 35
6+
namespace = 'com.google.android.gms.example.interstitialexample'
7+
compileSdkVersion(35)
68
defaultConfig {
79
applicationId "com.google.android.gms.example.interstitialexample"
8-
minSdkVersion 23
9-
multiDexEnabled true
10-
targetSdkVersion 35
11-
versionCode 1
12-
versionName "1.0"
10+
minSdkVersion(23)
11+
multiDexEnabled = true
12+
targetSdkVersion(35)
13+
versionCode(1)
14+
versionName = "1.0"
1315
}
1416
buildTypes {
1517
release {
16-
minifyEnabled false
17-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
minifyEnabled = false
19+
proguardFiles(getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro')
1820
}
1921
}
2022
}
2123

2224
dependencies {
23-
implementation 'androidx.appcompat:appcompat:1.2.0'
24-
implementation 'com.google.android.gms:play-services-ads:25.0.0'
25-
implementation 'com.google.android.material:material:1.13.0'
26-
implementation 'com.google.android.ump:user-messaging-platform:4.0.0'
25+
implementation('androidx.appcompat:appcompat:1.2.0')
26+
implementation('com.google.android.gms:play-services-ads:25.0.0')
27+
implementation('com.google.android.material:material:1.13.0')
28+
implementation('com.google.android.ump:user-messaging-platform:4.0.0')
2729
}

java/admanager/InterstitialExample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
mavenCentral()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.13.0'
9+
classpath 'com.android.tools.build:gradle:9.0.0'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files

java/admanager/InterstitialExample/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
1515
# This option should only be used with decoupled projects. More details, visit
1616
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1717
# org.gradle.parallel=true
18-
android.enableJetifier=true
1918
android.useAndroidX=true
2019
org.gradle.warning.mode=all

0 commit comments

Comments
 (0)