Skip to content

chore: upgrade to AGP 8.0 #442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Check Snippets
run: python scripts/checksnippets.py
- name: Install NDK
Expand Down
7 changes: 7 additions & 0 deletions admob/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'devrel.firebase.google.com.firebaseoptions'
}

Expand Down
7 changes: 7 additions & 0 deletions analytics/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.firebase.example.analytics'
}
repositories {
Expand Down
7 changes: 5 additions & 2 deletions appcheck/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.firebase.example.appcheck'
}
Expand Down
7 changes: 7 additions & 0 deletions auth/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.firebase.quickstart.auth'
}

Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.0.0'
classpath 'com.google.gms:google-services:4.3.15'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20"
}
Expand Down Expand Up @@ -79,4 +79,5 @@ task("ktlint", type: JavaExec, group: "verification") {
"--reporter=checkstyle,output=${outputFile}",
"**/*.kt",
]
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED"
}
6 changes: 3 additions & 3 deletions config/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '11'
}
namespace 'com.google.firebase.quickstart.config'
}
Expand Down
7 changes: 7 additions & 0 deletions crashlytics/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.firebase.example.crashlytics'
}

Expand Down
15 changes: 11 additions & 4 deletions database/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@ android {
}
}
packagingOptions {
// Required to avoid clashes in Jackson.
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
resources {
// Required to avoid clashes in Jackson.
excludes += ['META-INF/LICENSE', 'META-INF/LICENSE-FIREBASE.txt', 'META-INF/NOTICE']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.firebase.referencecode.database'
}
Expand Down
7 changes: 7 additions & 0 deletions dl-invites/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.firebase.dynamicinvites'
}

Expand Down
7 changes: 7 additions & 0 deletions dynamic-links/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.firebase.quickstart.dynamiclinks'
}

Expand Down
7 changes: 7 additions & 0 deletions firebaseoptions/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'devrel.firebase.google.com.firebaseoptions'
}

Expand Down
13 changes: 10 additions & 3 deletions firestore/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,24 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

lintOptions {
warning 'InvalidPackage'
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.example.firestore'
lint {
warning 'InvalidPackage'
}
}

repositories {
Expand Down
7 changes: 7 additions & 0 deletions functions/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'devrel.firebase.google.com.functions'
}

Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
org.gradle.jvmargs=-Xmx6g -XX:MaxPermSize=6g -XX:ReservedCodeCacheSize=2g -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=6g -XX:ReservedCodeCacheSize=2g -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true

android.enableJetifier=true
android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
9 changes: 8 additions & 1 deletion inappmessaging/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'devrel.firebase.google.com.firebaseoptions'
lintOptions {
lint {
// TODO(thatfiredev): Remove this once
// https://github.com/bumptech/glide/issues/4940 is fixed
disable 'NotificationPermission'
Expand Down
7 changes: 7 additions & 0 deletions installations/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.samples.snippet'
}

Expand Down
7 changes: 7 additions & 0 deletions messaging/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.firebase.example.messaging'
}

Expand Down
7 changes: 7 additions & 0 deletions perf/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'devrel.firebase.google.com.firebaseoptions'
}

Expand Down
27 changes: 21 additions & 6 deletions storage/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'com.google.devtools.ksp' version '1.8.20-1.0.10'
}

android {
compileSdkVersion 33
Expand All @@ -19,11 +21,25 @@ android {
}
}
namespace 'com.google.firebase.referencecode.storage'
lintOptions {
lint {
// TODO(thatfiredev): Remove this once
// https://github.com/bumptech/glide/issues/4940 is fixed
disable 'NotificationPermission'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}

// Workaround until https://youtrack.jetbrains.com/issue/KT-55947 is fixed
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "11"
}
}
}

dependencies {
Expand All @@ -33,8 +49,7 @@ dependencies {

implementation 'com.firebaseui:firebase-ui-storage:8.0.2'
implementation 'com.github.bumptech.glide:glide:4.15.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
kapt 'com.github.bumptech.glide:compiler:4.15.1'
ksp 'com.github.bumptech.glide:ksp:4.15.1'

implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
}
Expand Down
7 changes: 7 additions & 0 deletions tasks/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.google.firebase.quickstart.tasks'
}

Expand Down
7 changes: 7 additions & 0 deletions test-lab/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'devrel.firebase.google.com.firebaseoptions'
}

Expand Down