Skip to content
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

Upgrade to AGP 8.5.2 #524

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
15 changes: 10 additions & 5 deletions Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ android {
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
namespace 'app.intra'
lintOptions {
// Ignore lint errors that we believe are safe to ignore.
baseline file("lint-baseline.xml")
Expand Down Expand Up @@ -94,6 +95,9 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
buildConfig = true
}
Comment on lines +98 to +100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using it anywhere in the code? If not, I think we can remove this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we are actually using it (code:

)

but, we could change the implementation, instead of using BuildConfig. like, differentiate LogWrapper for release and debug (src/debug/) mode. wdyt?

}

repositories {
Expand Down Expand Up @@ -125,11 +129,12 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation "androidx.viewpager2:viewpager2:1.0.0"
// For Firebase Analytics, etc.
implementation 'com.google.firebase:firebase-analytics:19.0.2' // Last version for API <19
implementation 'com.google.firebase:firebase-perf:20.0.4'
implementation 'com.google.firebase:firebase-crashlytics:18.2.6'
implementation 'com.google.firebase:firebase-crashlytics-ndk:18.2.6'
implementation 'com.google.firebase:firebase-config:21.0.1'
implementation 'com.google.firebase:firebase-analytics:22.1.2'
implementation 'com.google.firebase:firebase-perf:21.0.2'
implementation 'com.google.firebase:firebase-crashlytics:19.2.1'
implementation 'com.google.firebase:firebase-crashlytics-ndk:19.2.1'
implementation 'com.google.firebase:firebase-config:22.0.1'
implementation 'com.google.firebase:firebase-core:21.1.1'

// Go backend (use fileTree instead of files to prevent Android Studio sync errors)
implementation fileTree(goBuildDir) {
Expand Down
8 changes: 4 additions & 4 deletions Android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.android.tools.build:gradle:8.5.2'

// For Firebase Analytics
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:perf-plugin:1.4.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.google.firebase:perf-plugin:1.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
}
dependencyLocking {
lockAllConfigurations()
Expand Down
193 changes: 99 additions & 94 deletions Android/buildscript-gradle.lockfile
Original file line number Diff line number Diff line change
@@ -1,127 +1,132 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
androidx.databinding:databinding-common:7.0.4=classpath
androidx.databinding:databinding-compiler-common:7.0.4=classpath
com.android.databinding:baseLibrary:7.0.4=classpath
com.android.tools.analytics-library:crash:30.0.4=classpath
com.android.tools.analytics-library:protos:30.0.4=classpath
com.android.tools.analytics-library:shared:30.0.4=classpath
com.android.tools.analytics-library:tracker:30.0.4=classpath
com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09=classpath
com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09=classpath
com.android.tools.build:aapt2-proto:7.0.4-7396180=classpath
com.android.tools.build:aaptcompiler:7.0.4=classpath
com.android.tools.build:apksig:7.0.4=classpath
com.android.tools.build:apkzlib:7.0.4=classpath
com.android.tools.build:builder-model:7.0.4=classpath
com.android.tools.build:builder-test-api:7.0.4=classpath
com.android.tools.build:builder:7.0.4=classpath
com.android.tools.build:bundletool:1.6.0=classpath
com.android.tools.build:gradle-api:7.0.4=classpath
com.android.tools.build:gradle:7.0.4=classpath
com.android.tools.build:manifest-merger:30.0.4=classpath
androidx.databinding:databinding-common:8.5.2=classpath
androidx.databinding:databinding-compiler-common:8.5.2=classpath
com.android.databinding:baseLibrary:8.5.2=classpath
com.android.tools.analytics-library:crash:31.5.2=classpath
com.android.tools.analytics-library:protos:31.5.2=classpath
com.android.tools.analytics-library:shared:31.5.2=classpath
com.android.tools.analytics-library:tracker:31.5.2=classpath
com.android.tools.build.jetifier:jetifier-core:1.0.0-beta10=classpath
com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta10=classpath
com.android.tools.build:aapt2-proto:8.5.2-11315950=classpath
com.android.tools.build:aaptcompiler:8.5.2=classpath
com.android.tools.build:apksig:8.5.2=classpath
com.android.tools.build:apkzlib:8.5.2=classpath
com.android.tools.build:builder-model:8.5.2=classpath
com.android.tools.build:builder-test-api:8.5.2=classpath
com.android.tools.build:builder:8.5.2=classpath
com.android.tools.build:bundletool:1.16.0=classpath
com.android.tools.build:gradle-api:8.5.2=classpath
com.android.tools.build:gradle-settings-api:8.5.2=classpath
com.android.tools.build:gradle:8.5.2=classpath
com.android.tools.build:manifest-merger:31.5.2=classpath
com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api=classpath
com.android.tools.ddms:ddmlib:30.0.4=classpath
com.android.tools.layoutlib:layoutlib-api:30.0.4=classpath
com.android.tools.lint:lint-model:30.0.4=classpath
com.android.tools.utp:android-device-provider-gradle-proto:30.0.4=classpath
com.android.tools.utp:android-test-plugin-host-retention-proto:30.0.4=classpath
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.0.4=classpath
com.android.tools:annotations:30.0.4=classpath
com.android.tools:common:30.0.4=classpath
com.android.tools:dvlib:30.0.4=classpath
com.android.tools:repository:30.0.4=classpath
com.android.tools:sdk-common:30.0.4=classpath
com.android.tools:sdklib:30.0.4=classpath
com.android:signflinger:7.0.4=classpath
com.android:zipflinger:7.0.4=classpath
com.google.android.gms:strict-version-matcher-plugin:1.2.2=classpath
com.android.tools.ddms:ddmlib:31.5.2=classpath
com.android.tools.layoutlib:layoutlib-api:31.5.2=classpath
com.android.tools.lint:lint-model:31.5.2=classpath
com.android.tools.lint:lint-typedef-remover:31.5.2=classpath
com.android.tools.utp:android-device-provider-ddmlib-proto:31.5.2=classpath
com.android.tools.utp:android-device-provider-gradle-proto:31.5.2=classpath
com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:31.5.2=classpath
com.android.tools.utp:android-test-plugin-host-apk-installer-proto:31.5.2=classpath
com.android.tools.utp:android-test-plugin-host-coverage-proto:31.5.2=classpath
com.android.tools.utp:android-test-plugin-host-emulator-control-proto:31.5.2=classpath
com.android.tools.utp:android-test-plugin-host-logcat-proto:31.5.2=classpath
com.android.tools.utp:android-test-plugin-host-retention-proto:31.5.2=classpath
com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:31.5.2=classpath
com.android.tools:annotations:31.5.2=classpath
com.android.tools:common:31.5.2=classpath
com.android.tools:dvlib:31.5.2=classpath
com.android.tools:repository:31.5.2=classpath
com.android.tools:sdk-common:31.5.2=classpath
com.android.tools:sdklib:31.5.2=classpath
com.android:signflinger:8.5.2=classpath
com.android:zipflinger:8.5.2=classpath
com.google.android.gms:strict-version-matcher-plugin:1.2.4=classpath
com.google.android:annotations:4.1.1.4=classpath
com.google.api.grpc:proto-google-common-protos:1.12.0=classpath
com.google.api.grpc:proto-google-common-protos:2.17.0=classpath
com.google.auto.value:auto-value-annotations:1.6.2=classpath
com.google.code.findbugs:jsr305:3.0.2=classpath
com.google.code.gson:gson:2.8.6=classpath
com.google.crypto.tink:tink:1.3.0-rc2=classpath
com.google.code.gson:gson:2.10.1=classpath
com.google.crypto.tink:tink:1.7.0=classpath
com.google.dagger:dagger:2.28.3=classpath
com.google.errorprone:error_prone_annotations:2.3.4=classpath
com.google.firebase:firebase-crashlytics-buildtools:2.8.1=classpath
com.google.firebase:firebase-crashlytics-gradle:2.8.1=classpath
com.google.firebase:perf-plugin:1.4.0=classpath
com.google.errorprone:error_prone_annotations:2.18.0=classpath
com.google.firebase:firebase-crashlytics-buildtools:3.0.2=classpath
com.google.firebase:firebase-crashlytics-gradle:3.0.2=classpath
com.google.firebase:perf-plugin:1.4.2=classpath
com.google.flatbuffers:flatbuffers-java:1.12.0=classpath
com.google.gms:google-services:4.3.10=classpath
com.google.gms:google-services:4.4.2=classpath
com.google.guava:failureaccess:1.0.1=classpath
com.google.guava:guava:30.1-jre=classpath
com.google.guava:guava:32.0.1-jre=classpath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=classpath
com.google.j2objc:j2objc-annotations:1.3=classpath
com.google.j2objc:j2objc-annotations:2.8=classpath
com.google.jimfs:jimfs:1.1=classpath
com.google.protobuf:protobuf-java-util:3.10.0=classpath
com.google.protobuf:protobuf-java:3.10.0=classpath
com.google.testing.platform:core-proto:0.0.8-alpha04=classpath
com.googlecode.json-simple:json-simple:1.1=classpath
com.google.protobuf:protobuf-java-util:3.22.3=classpath
com.google.protobuf:protobuf-java:3.22.3=classpath
com.google.testing.platform:core-proto:0.0.9-alpha02=classpath
com.googlecode.juniversalchardet:juniversalchardet:1.0.3=classpath
com.squareup:javapoet:1.10.0=classpath
com.squareup:javawriter:2.5.0=classpath
com.sun.activation:javax.activation:1.2.0=classpath
com.sun.istack:istack-commons-runtime:3.0.8=classpath
com.sun.xml.fastinfoset:FastInfoset:1.2.16=classpath
commons-codec:commons-codec:1.10=classpath
commons-io:commons-io:2.4=classpath
commons-codec:commons-codec:1.11=classpath
commons-io:commons-io:2.13.0=classpath
commons-logging:commons-logging:1.2=classpath
io.grpc:grpc-api:1.21.1=classpath
io.grpc:grpc-context:1.21.1=classpath
io.grpc:grpc-core:1.21.1=classpath
io.grpc:grpc-netty:1.21.1=classpath
io.grpc:grpc-protobuf-lite:1.21.1=classpath
io.grpc:grpc-protobuf:1.21.1=classpath
io.grpc:grpc-stub:1.21.1=classpath
io.netty:netty-buffer:4.1.34.Final=classpath
io.netty:netty-codec-http2:4.1.34.Final=classpath
io.netty:netty-codec-http:4.1.34.Final=classpath
io.netty:netty-codec-socks:4.1.34.Final=classpath
io.netty:netty-codec:4.1.34.Final=classpath
io.netty:netty-common:4.1.34.Final=classpath
io.netty:netty-handler-proxy:4.1.34.Final=classpath
io.netty:netty-handler:4.1.34.Final=classpath
io.netty:netty-resolver:4.1.34.Final=classpath
io.netty:netty-transport:4.1.34.Final=classpath
io.opencensus:opencensus-api:0.21.0=classpath
io.opencensus:opencensus-contrib-grpc-metrics:0.21.0=classpath
it.unimi.dsi:fastutil:8.4.0=classpath
io.grpc:grpc-api:1.57.0=classpath
io.grpc:grpc-context:1.57.0=classpath
io.grpc:grpc-core:1.57.0=classpath
io.grpc:grpc-netty:1.57.0=classpath
io.grpc:grpc-protobuf-lite:1.57.0=classpath
io.grpc:grpc-protobuf:1.57.0=classpath
io.grpc:grpc-stub:1.57.0=classpath
io.netty:netty-buffer:4.1.93.Final=classpath
io.netty:netty-codec-http2:4.1.93.Final=classpath
io.netty:netty-codec-http:4.1.93.Final=classpath
io.netty:netty-codec-socks:4.1.93.Final=classpath
io.netty:netty-codec:4.1.93.Final=classpath
io.netty:netty-common:4.1.93.Final=classpath
io.netty:netty-handler-proxy:4.1.93.Final=classpath
io.netty:netty-handler:4.1.93.Final=classpath
io.netty:netty-resolver:4.1.93.Final=classpath
io.netty:netty-transport-native-unix-common:4.1.93.Final=classpath
io.netty:netty-transport:4.1.93.Final=classpath
io.perfmark:perfmark-api:0.26.0=classpath
jakarta.activation:jakarta.activation-api:1.2.1=classpath
jakarta.xml.bind:jakarta.xml.bind-api:2.3.2=classpath
javax.annotation:javax.annotation-api:1.3.2=classpath
javax.inject:javax.inject:1=classpath
net.java.dev.jna:jna-platform:5.6.0=classpath
net.java.dev.jna:jna:5.6.0=classpath
net.sf.jopt-simple:jopt-simple:4.9=classpath
net.sf.kxml:kxml2:2.3.0=classpath
org.antlr:antlr4:4.5.3=classpath
org.apache.commons:commons-compress:1.20=classpath
org.apache.httpcomponents:httpclient:4.5.6=classpath
org.apache.httpcomponents:httpcore:4.4.10=classpath
org.apache.commons:commons-compress:1.21=classpath
org.apache.httpcomponents:httpclient:4.5.14=classpath
org.apache.httpcomponents:httpcore:4.4.16=classpath
org.apache.httpcomponents:httpmime:4.5.6=classpath
org.bouncycastle:bcpkix-jdk15on:1.56=classpath
org.bouncycastle:bcprov-jdk15on:1.56=classpath
org.checkerframework:checker-qual:3.5.0=classpath
org.codehaus.mojo:animal-sniffer-annotations:1.17=classpath
org.bitbucket.b_c:jose4j:0.9.5=classpath
org.bouncycastle:bcpkix-jdk18on:1.77=classpath
org.bouncycastle:bcprov-jdk18on:1.77=classpath
org.bouncycastle:bcutil-jdk18on:1.77=classpath
org.checkerframework:checker-qual:3.33.0=classpath
org.codehaus.mojo:animal-sniffer-annotations:1.23=classpath
org.glassfish.jaxb:jaxb-runtime:2.3.2=classpath
org.glassfish.jaxb:txw2:2.3.2=classpath
org.jdom:jdom2:2.0.6=classpath
org.jetbrains.intellij.deps:trove4j:1.0.20181211=classpath
org.jetbrains.kotlin:kotlin-reflect:1.4.32=classpath
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.32=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.32=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32=classpath
org.jetbrains.kotlin:kotlin-stdlib:1.4.32=classpath
org.jetbrains:annotations:13.0=classpath
org.json:json:20180813=classpath
org.jetbrains.intellij.deps:trove4j:1.0.20200330=classpath
org.jetbrains.kotlin:kotlin-reflect:1.9.20=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.20=classpath
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.20=classpath
org.jetbrains.kotlin:kotlin-stdlib:1.9.20=classpath
org.jetbrains:annotations:23.0.0=classpath
org.jvnet.staxex:stax-ex:1.8.1=classpath
org.ow2.asm:asm-analysis:9.0=classpath
org.ow2.asm:asm-commons:9.0=classpath
org.ow2.asm:asm-tree:9.0=classpath
org.ow2.asm:asm-util:7.0=classpath
org.ow2.asm:asm:9.0=classpath
org.ow2.asm:asm-analysis:9.6=classpath
org.ow2.asm:asm-commons:9.6=classpath
org.ow2.asm:asm-tree:9.6=classpath
org.ow2.asm:asm-util:9.6=classpath
org.ow2.asm:asm:9.6=classpath
org.slf4j:slf4j-api:1.7.30=classpath
org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2=classpath
xerces:xercesImpl:2.12.0=classpath
xml-apis:xml-apis:1.4.01=classpath
empty=
5 changes: 4 additions & 1 deletion Android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ android.useAndroidX=true
ANDROID_COMPILE_SDK_VERSION=33
ANDROID_BUILD_TOOLS_VERSION=33.0.0

ANDROID_MIN_SDK_VERSION=16
ANDROID_MIN_SDK_VERSION=21
ANDROID_TARGET_SDK_VERSION=33

android.nonTransitiveRClass=false
android.nonFinalResIds=false
Comment on lines +31 to +32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these two settings necessary?

Copy link
Author

@mzennis mzennis Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, starting Android Gradle Plugin (AGP) version 8.0 and above, the default value for:
android.nonTransitiveRClass & android.nonFinalResIds are true.

  • android.nonTransitiveRClass => each module's R class only includes resources defined within that specific module. It does not include resources from its dependencies.
  • android.nonFinalResIds => means that resource IDs are generated as non-final by default, allowing for potential modifications at runtime.

and, we are using those in:
Screenshot 2025-01-24 at 22 00 19

Also, I don't think we need to change how it's done, since I'm worried it might mess up other stuff.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my suggestion is, if we're going to change these, we should do it in a separate PR. wdyt?

Loading