From 6225351bcb3015de4ce487fc33060973ceaea9df Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Tue, 17 Nov 2026 15:39:47 +0100 Subject: [PATCH 1/5] remove okhttp deps --- pom.xml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 5329523e..b7a9e6aa 100644 --- a/pom.xml +++ b/pom.xml @@ -55,14 +55,13 @@ 2.1.1 0.13.0 0.24.2 - 4.12.0 1.61.0 - 1.10.4 + 1.10.5-SNAPSHOT 6.1.0 5.23.0 - 1.63.0 + 1.68.0 1.0.6 @@ -150,12 +149,6 @@ ${jwks-rsa.version} - - com.squareup.okhttp3 - okhttp - ${okhttp.version} - - com.azure azure-core From 626a268a2426fe8d5ac14a4f5debdd0489a618c5 Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Fri, 20 Nov 2026 10:53:18 +0100 Subject: [PATCH 2/5] Update kiota.version to 2.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b7a9e6aa..bc5518ee 100644 --- a/pom.xml +++ b/pom.xml @@ -56,7 +56,7 @@ 0.13.0 0.24.2 1.61.0 - 1.10.5-SNAPSHOT + 2.0.0 6.1.0 From 960e223820562d977220538fd22458cd53e264cc Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Tue, 24 Nov 2026 15:33:52 +0100 Subject: [PATCH 3/5] feat!: use Kiota 2 and platform-aware OkHttp Resolve OkHttp transitively and update Android build requirements. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- README.md | 4 ++++ android/build.gradle | 19 +++++++++---------- android/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a63a855e..9d0c4511 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,10 @@ The Microsoft Graph SDK is open for contribution. To contribute to this project, The Microsoft Graph SDK for Java library is supported at runtime for Java 8 and [Android API revision 26](http://source.android.com/source/build-numbers.html) or greater. +Android builds require `compileSdk` 37 or later, Android Gradle Plugin 9.1.1 or later, and AndroidX enabled with `android.useAndroidX=true` in `gradle.properties`. + +Use a repository that serves Gradle module metadata so the Android OkHttp variant is selected. If only Maven POM metadata is available, exclude the transitive `okhttp-jvm` dependency and add `okhttp-android` explicitly. + ## 7. License Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the [MIT license](LICENSE). diff --git a/android/build.gradle b/android/build.gradle index 87841cef..6a540ed9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath "com.gradle:gradle-enterprise-gradle-plugin:3.19.2" - classpath "com.android.tools.build:gradle:8.13.0" + classpath "com.android.tools.build:gradle:9.2.1" classpath "com.github.ben-manes:gradle-versions-plugin:0.54.0" } } @@ -52,7 +52,7 @@ android { checkAllWarnings true warningsAsErrors true lintConfig file("lint.xml") - disable 'AndroidGradlePluginVersion' // We will not be upgrading gradle to version 9 as it does not support our minimum required version of jdk8 + disable 'AndroidGradlePluginVersion' } sourceSets { @@ -77,14 +77,13 @@ dependencies { runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.13.0' implementation 'com.auth0:jwks-rsa:0.24.2' - api 'com.squareup.okhttp3:okhttp:4.12.0' api 'com.azure:azure-core:1.61.0' - api 'com.microsoft.kiota:microsoft-kiota-abstractions:1.10.4' - api 'com.microsoft.kiota:microsoft-kiota-authentication-azure:1.10.4' - implementation 'com.microsoft.kiota:microsoft-kiota-http-okHttp:1.10.4' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-json:1.10.4' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-text:1.10.4' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-form:1.10.4' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-multipart:1.10.4' + api 'com.microsoft.kiota:microsoft-kiota-abstractions:2.0.0' + api 'com.microsoft.kiota:microsoft-kiota-authentication-azure:2.0.0' + api 'com.microsoft.kiota:microsoft-kiota-http-okHttp:2.0.0' + implementation 'com.microsoft.kiota:microsoft-kiota-serialization-json:2.0.0' + implementation 'com.microsoft.kiota:microsoft-kiota-serialization-text:2.0.0' + implementation 'com.microsoft.kiota:microsoft-kiota-serialization-form:2.0.0' + implementation 'com.microsoft.kiota:microsoft-kiota-serialization-multipart:2.0.0' } diff --git a/android/gradle.properties b/android/gradle.properties index 9bb6fa75..5b782d4e 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -22,6 +22,7 @@ org.gradle.jvmargs=-Xmx2g org.gradle.parallel=true org.gradle.caching=true +android.useAndroidX=true mavenGroupId = com.microsoft.graph mavenArtifactId = microsoft-graph-core diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index aaaabb3c..60d3852c 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME From f07605ed85b992e11d3fe7292294a2e1baa4606f Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Tue, 24 Nov 2026 15:53:14 +0100 Subject: [PATCH 4/5] fix: remove obsolete OkHttp lint exclusions Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- android/lint.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/android/lint.xml b/android/lint.xml index 65178f8e..0a383f74 100644 --- a/android/lint.xml +++ b/android/lint.xml @@ -3,13 +3,11 @@ - + - - From 0ea5feaf08ddede2477ca144c9667223cb17ec6b Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Tue, 24 Nov 2026 15:53:53 +0100 Subject: [PATCH 5/5] docs: clarify the Android build JDK requirement Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d0c4511..990f4814 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ The Microsoft Graph SDK is open for contribution. To contribute to this project, The Microsoft Graph SDK for Java library is supported at runtime for Java 8 and [Android API revision 26](http://source.android.com/source/build-numbers.html) or greater. -Android builds require `compileSdk` 37 or later, Android Gradle Plugin 9.1.1 or later, and AndroidX enabled with `android.useAndroidX=true` in `gradle.properties`. +Android builds require `compileSdk` 37 or later, Android Gradle Plugin 9.1.1 or later with JDK 17 or later, and AndroidX enabled with `android.useAndroidX=true` in `gradle.properties`. Use a repository that serves Gradle module metadata so the Android OkHttp variant is selected. If only Maven POM metadata is available, exclude the transitive `okhttp-jvm` dependency and add `okhttp-android` explicitly.