From b69565dfa15b27ff76b0b0e639951c94deb5d193 Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Tue, 17 Nov 2026 15:41:05 +0100 Subject: [PATCH 1/3] feat: remove okhttp because its transitive --- android/build.gradle | 14 +++++++------- pom.xml | 13 +++---------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 25ecad6888c..eda66f5c2f7 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -73,15 +73,15 @@ android { dependencies { - implementation 'com.squareup.okhttp3:okhttp:4.12.0' + implementation 'com.squareup.okhttp3:okhttp-android:5.5.1' implementation 'jakarta.annotation:jakarta.annotation-api:2.1.1' api 'com.microsoft.graph:microsoft-graph-core:3.6.6' - implementation 'com.microsoft.kiota:microsoft-kiota-authentication-azure:1.9.2' - implementation 'com.microsoft.kiota:microsoft-kiota-http-okHttp:1.9.2' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-json:1.9.2' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-text:1.9.2' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-form:1.9.2' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-multipart:1.9.2' + implementation 'com.microsoft.kiota:microsoft-kiota-authentication-azure:1.10.5' + implementation 'com.microsoft.kiota:microsoft-kiota-http-okHttp:1.10.5' + implementation 'com.microsoft.kiota:microsoft-kiota-serialization-json:1.10.5' + implementation 'com.microsoft.kiota:microsoft-kiota-serialization-text:1.10.5' + implementation 'com.microsoft.kiota:microsoft-kiota-serialization-form:1.10.5' + implementation 'com.microsoft.kiota:microsoft-kiota-serialization-multipart:1.10.5' } diff --git a/pom.xml b/pom.xml index ba735e3acc7..c72afab0d7f 100644 --- a/pom.xml +++ b/pom.xml @@ -49,10 +49,9 @@ 1.8 - 3.6.6 - 4.12.0 + 3.6.6-SNAPSHOT 2.1.1 - 1.9.2 + 1.10.5-SNAPSHOT 3.14.0 @@ -87,13 +86,7 @@ microsoft-graph-core ${microsoft-graph-core.version} - - - com.squareup.okhttp3 - okhttp - ${okhttp.version} - - + jakarta.annotation jakarta.annotation-api From 625f8c5a7d71c81664dc6fc8903e6bb0e7dc740e Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Tue, 24 Nov 2026 15:33:52 +0100 Subject: [PATCH 2/3] feat!: align with Kiota 2 and Graph Core 4 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 | 21 +++++++++---------- android/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- pom.xml | 4 ++-- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 40e39623f7a..31afd41b87e 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,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) and 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. + ## 9. License diff --git a/android/build.gradle b/android/build.gradle index eda66f5c2f7..d5a736e7dc9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -9,7 +9,7 @@ buildscript { classpath "com.gradle:gradle-enterprise-gradle-plugin:3.19.2" classpath "gradle.plugin.com.github.viswaramamoorthy:gradle-util-plugins:0.1.0-RELEASE" classpath "com.github.ben-manes:gradle-versions-plugin:0.54.0" - classpath "com.android.tools.build:gradle:8.13.2" + classpath "com.android.tools.build:gradle:9.2.1" } } @@ -25,7 +25,7 @@ apply plugin: "com.github.ManifestClasspath" android { namespace 'com.microsoft.graph' - compileSdkVersion 36 + compileSdkVersion 37 defaultConfig { versionCode 1 @@ -57,7 +57,7 @@ android { disable "GradleDependency" disable "NewerVersionAvailable" disable "KotlinPropertyAccess" // getting false positives because of odata actions & functions (getOrder setOrder) - 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 { main { @@ -73,15 +73,14 @@ android { dependencies { - implementation 'com.squareup.okhttp3:okhttp-android:5.5.1' implementation 'jakarta.annotation:jakarta.annotation-api:2.1.1' - api 'com.microsoft.graph:microsoft-graph-core:3.6.6' + api 'com.microsoft.graph:microsoft-graph-core:4.0.0' - implementation 'com.microsoft.kiota:microsoft-kiota-authentication-azure:1.10.5' - implementation 'com.microsoft.kiota:microsoft-kiota-http-okHttp:1.10.5' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-json:1.10.5' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-text:1.10.5' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-form:1.10.5' - implementation 'com.microsoft.kiota:microsoft-kiota-serialization-multipart:1.10.5' + implementation '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 ea8050294a8..fcdcd22a465 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -22,6 +22,7 @@ org.gradle.jvmargs=-Xmx16g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.parallel=true org.gradle.caching=true +android.useAndroidX=true mavenGroupId = com.microsoft.graph mavenArtifactId = microsoft-graph diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index ff23a68d70f..60d3852ca26 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.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/pom.xml b/pom.xml index c72afab0d7f..cf7285e955b 100644 --- a/pom.xml +++ b/pom.xml @@ -49,9 +49,9 @@ 1.8 - 3.6.6-SNAPSHOT + 4.0.0 2.1.1 - 1.10.5-SNAPSHOT + 2.0.0 3.14.0 From 9db6a31f125b56b94d649919ddb3b91ee1ed809e Mon Sep 17 00:00:00 2001 From: Dennis Melzer Date: Tue, 24 Nov 2026 16:00:15 +0100 Subject: [PATCH 3/3] fix: preserve the SDK Android target version Keep the library target unchanged while documenting the Android build JDK requirement. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- README.md | 2 +- android/build.gradle | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 31afd41b87e..286f23cd66f 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,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) and 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. diff --git a/android/build.gradle b/android/build.gradle index d5a736e7dc9..f221d22858b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -56,6 +56,7 @@ android { disable "ResourceType" // Annotation binding disable "GradleDependency" disable "NewerVersionAvailable" + disable "OldTargetApi" // The consuming app controls the target SDK. disable "KotlinPropertyAccess" // getting false positives because of odata actions & functions (getOrder setOrder) disable 'AndroidGradlePluginVersion' }