Skip to content
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.


## 9. License

Expand Down
22 changes: 11 additions & 11 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand All @@ -25,7 +25,7 @@ apply plugin: "com.github.ManifestClasspath"
android {
namespace 'com.microsoft.graph'

compileSdkVersion 36
compileSdkVersion 37

defaultConfig {
versionCode 1
Expand Down Expand Up @@ -56,8 +56,9 @@ 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' // We will not be upgrading gradle to version 9 as it does not support our minimum required version of jdk8
disable 'AndroidGradlePluginVersion'
}
sourceSets {
main {
Expand All @@ -73,15 +74,14 @@ android {


dependencies {
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
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.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: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'
}
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 3 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@
<maven.compiler.target>1.8</maven.compiler.target>

<!-- Dependency versions -->
<microsoft-graph-core.version>3.6.6</microsoft-graph-core.version>
<okhttp.version>4.12.0</okhttp.version>
<microsoft-graph-core.version>4.0.0</microsoft-graph-core.version>
<jakarta-annotation.version>2.1.1</jakarta-annotation.version>
<kiota.version>1.9.2</kiota.version>
<kiota.version>2.0.0</kiota.version>

<!-- Plugin versions -->
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
Expand Down Expand Up @@ -87,13 +86,7 @@
<artifactId>microsoft-graph-core</artifactId>
<version>${microsoft-graph-core.version}</version>
</dependency>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>${okhttp.version}</version>
</dependency>


<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
Expand Down