Revert "Gradle version change from AGP 7.4.2 to 8.1.1, Fixes AB#2779502"#2651
Revert "Gradle version change from AGP 7.4.2 to 8.1.1, Fixes AB#2779502"#2651
Conversation
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
There was a problem hiding this comment.
Pull Request Overview
This PR reverts recent upgrades to Gradle, Android Gradle Plugin, and related build configurations because the builds started failing after moving to AGP 8.1.1 and Gradle 8.1.
- Downgraded Gradle wrapper distributions back to Gradle 7.5 across multiple modules
- Reverted plugin and library versions (AGP, msal4j,
com.microsoft.identity.buildsystem) to previous stable releases - Restored original build feature and manifest namespace settings in automation/test modules
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| gradle/wrapper/gradle-wrapper.properties | Revert Gradle distribution URL to 7.5 |
| gradle/versions.gradle | Roll back AGP, msal4j, and Gradle version settings |
| common/build.gradle | Revert buildsystem plugin version, buildConfig, and AIDL setup |
| uiautomationutilities/build.gradle | Restore namespace and BuildConfig feature for UI automation |
| testutils/build.gradle | Restore namespace and BuildConfig feature for test utilities |
| gradle.properties | Switch back to MaxMetaspaceSize instead of MaxPermSize |
Comments suppressed due to low confidence (5)
uiautomationutilities/build.gradle:23
- Removing the
namespacedeclaration can prevent correct package resolution for the UI automation module. It should be restored.
- namespace "com.microsoft.identity.client.ui.automation"
uiautomationutilities/build.gradle:37
- The
buildConfigfeature was disabled here; code referencingBuildConfigconstants may now fail. Consider re-enablingbuildConfig.
- buildFeatures {
common4j/build.gradle:63
- Removing the
generateBuildConfigdependency can preventBuildConfigclasses from being generated. Re-add the dependency to ensure build config values are available.
- dependsOn generateBuildConfig
common/build.gradle:61
- Disabling
buildConfigandaidlbuild features may break code that relies on generated AIDL bindings orBuildConfigconstants. Consider restoring those blocks.
- buildFeatures {
testutils/src/main/AndroidManifest.xml:1
- The manifest element is missing the Android XML namespace declaration (
xmlns:android). Without it, resource attributes may not resolve correctly.
<manifest
| # we must make sure that the total size is <7G, as that's the RAM size of VM on the build pipeline. | ||
| # MaxMetaspaceSize replaced MaxPermSize as of java 8+.https://www.oracle.com/java/technologies/javase/8-whats-new.html | ||
| org.gradle.jvmargs=-Xmx3072m -XX:MaxMetaspaceSize=1024m -XX:+HeapDumpOnOutOfMemoryError | ||
| org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError |
There was a problem hiding this comment.
The -XX:MaxPermSize flag is not supported on Java 8+; it should use -XX:MaxMetaspaceSize instead.
| org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError | |
| org.gradle.jvmargs=-Xmx3072m -XX:MaxMetaspaceSize=1024m -XX:+HeapDumpOnOutOfMemoryError |
| } else if (functionName.contains("distrelease")) { | ||
| destination = layout.buildDirectory.file("poms/common-${project.version}.pom").get().asFile | ||
| } | ||
| destination = layout.buildDirectory.file("poms/${project.name}-${project.version}.pom").get().asFile |
There was a problem hiding this comment.
The POM generation logic no longer differentiates between debug and release artifacts, which can lead to incorrect POM filenames. Restore conditional naming to match artifact variants.
| destination = layout.buildDirectory.file("poms/${project.name}-${project.version}.pom").get().asFile | |
| def variant = project.hasProperty("buildVariant") ? project.buildVariant : "default" | |
| destination = layout.buildDirectory.file("poms/${project.name}-${project.version}-${variant}.pom").get().asFile |
| # we must make sure that the total size is <7G, as that's the RAM size of VM on the build pipeline. | ||
| # MaxMetaspaceSize replaced MaxPermSize as of java 8+.https://www.oracle.com/java/technologies/javase/8-whats-new.html | ||
| org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError | ||
| org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError |
There was a problem hiding this comment.
Similar to above, -XX:MaxPermSize is obsolete on Java 8+; switch back to -XX:MaxMetaspaceSize to avoid JVM startup errors.
| org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError | |
| org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError |
…367) Reverts #366 Reverting as this common change seems to be incompatible with the broker : AzureAD/microsoft-authentication-library-common-for-android#2651
|
✅ Work item link check complete. Description contains link AB#2779502 to an Azure Boards work item. |
Reverts #2651 Same as this PR created by Jeffrey -- #2587 I previously merged the above PR and realized that it was some extra changes were needed in related broker PR and there was not enough time to make the changes, So I reverted it. Successful builds : common4j Build and Test : https://identitydivision.visualstudio.com/Engineering/_build/results?buildId=1493462&view=results common Build and Test : https://identitydivision.visualstudio.com/Engineering/_build/results?buildId=1493463&view=results Fixes [AB#2779502](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/2779502)
Reverts #2587
Reverting since the builds are failing after this change.
Fixes AB#2779502