Skip to content

Commit 79d0788

Browse files
authored
chore: upgrade to AGP 8.0 (#238)
* chore: compile with java 11 * update codelab requirements
1 parent 6827609 commit 79d0788

File tree

9 files changed

+31
-34
lines changed

9 files changed

+31
-34
lines changed

Diff for: .github/workflows/android.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: set up JDK 11
12+
- name: set up JDK 17
1313
uses: actions/setup-java@v1
1414
with:
15-
java-version: 11
15+
java-version: 17
1616
- name: Build with Gradle
1717
run: ./build.sh

Diff for: build-android-start/app/build.gradle

+9-12
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,24 @@ android {
2727
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2828
}
2929
}
30-
3130
packagingOptions {
32-
exclude 'META-INF/LICENSE'
33-
exclude 'META-INF/LICENSE-FIREBASE.txt'
34-
exclude 'META-INF/NOTICE'
31+
resources {
32+
excludes += ['META-INF/LICENSE', 'META-INF/LICENSE-FIREBASE.txt', 'META-INF/NOTICE']
33+
}
3534
}
3635

36+
3737
compileOptions {
38-
sourceCompatibility JavaVersion.VERSION_1_8
39-
targetCompatibility JavaVersion.VERSION_1_8
38+
sourceCompatibility JavaVersion.VERSION_11
39+
targetCompatibility JavaVersion.VERSION_11
4040
}
41-
4241
kotlinOptions {
43-
jvmTarget = '1.8'
42+
jvmTarget = '11'
4443
}
45-
46-
lintOptions {
47-
// TODO(thatfiredev): Remove this once
48-
// https://github.com/bumptech/glide/issues/4940 is fixed
44+
lint {
4945
disable 'NotificationPermission'
5046
}
47+
5148
}
5249

5350
dependencies {

Diff for: build-android-start/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
mavenLocal()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.4.2'
9+
classpath 'com.android.tools.build:gradle:8.0.0'
1010
classpath 'com.google.gms:google-services:4.3.15'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20"
1212

Diff for: build-android/app/build.gradle

+9-12
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,24 @@ android {
2727
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2828
}
2929
}
30-
3130
packagingOptions {
32-
exclude 'META-INF/LICENSE'
33-
exclude 'META-INF/LICENSE-FIREBASE.txt'
34-
exclude 'META-INF/NOTICE'
31+
resources {
32+
excludes += ['META-INF/LICENSE', 'META-INF/LICENSE-FIREBASE.txt', 'META-INF/NOTICE']
33+
}
3534
}
3635

36+
3737
compileOptions {
38-
sourceCompatibility JavaVersion.VERSION_1_8
39-
targetCompatibility JavaVersion.VERSION_1_8
38+
sourceCompatibility JavaVersion.VERSION_11
39+
targetCompatibility JavaVersion.VERSION_11
4040
}
41-
4241
kotlinOptions {
43-
jvmTarget = '1.8'
42+
jvmTarget = '11'
4443
}
45-
46-
lintOptions {
47-
// TODO(thatfiredev): Remove this once
48-
// https://github.com/bumptech/glide/issues/4940 is fixed
44+
lint {
4945
disable 'NotificationPermission'
5046
}
47+
5148
}
5249

5350
dependencies {

Diff for: build-android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
mavenLocal()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.4.2'
9+
classpath 'com.android.tools.build:gradle:8.0.0'
1010
classpath 'com.google.gms:google-services:4.3.15'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20"
1212

Diff for: build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
mavenCentral()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:7.4.2'
7+
classpath 'com.android.tools.build:gradle:8.0.0'
88
classpath 'com.google.gms:google-services:4.3.15'
99
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20"
1010
}

Diff for: gradle.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
org.gradle.jvmargs=-Xmx6g -XX:MaxPermSize=6g -XX:ReservedCodeCacheSize=2g -Dfile.encoding=UTF-8
1+
org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=6g -XX:ReservedCodeCacheSize=2g -Dfile.encoding=UTF-8
22
org.gradle.parallel=true
33
org.gradle.configureondemand=true
44
org.gradle.caching=true
55

66
android.enableJetifier=true
77
android.useAndroidX=true
8+
android.defaults.buildfeatures.buildconfig=true
9+
android.nonTransitiveRClass=false
10+
android.nonFinalResIds=false

Diff for: gradle/wrapper/gradle-wrapper.properties

+1-1
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-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Diff for: steps/index.lab.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ Welcome to the Friendly Chat codelab. In this codelab, you'll learn how to use t
3232

3333
#### What you'll need
3434

35-
* [Android Studio](https://developer.android.com/studio) version 4.2+.
35+
* [Android Studio](https://developer.android.com/studio) Flamingo (2022.2.1) or later.
3636
* An [Android Emulator](https://developer.android.com/studio/run/emulator#install) with Android 5.0+.
37-
* Node.js version 10 or higher (to use the Emulator Suite).
38-
* Java 8 or higher. To install Java use these [instructions](https://java.com/en/download/help/download_options.xml); to check your version, run `java -version`.
37+
* Node.js version 14 or higher (to use the Emulator Suite).
38+
* Java 11 or higher. To install Java use these [instructions](https://java.com/en/download/help/download_options.xml); to check your version, run `java -version`.
3939
* Familiarity with the Kotlin programming language.
4040

4141
## Get the sample code

0 commit comments

Comments
 (0)